diff --git a/src/lib.rs b/src/lib.rs index a20b378..800e700 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1114,7 +1114,7 @@ pub struct QueryResponse { pub has_more: Option, pub next_cursor: Option, pub results: Vec, - pub page_or_database: Value, + // pub page_or_database: Value, } #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] @@ -1501,6 +1501,19 @@ pub enum RichText { Unsupported, } +impl RichText { + pub fn plain_text(&self) -> String { + use RichText::*; + match self { + Text { plain_text, .. } | Mention { plain_text, .. } | Equation { plain_text, .. } => { + plain_text + } + Unsupported => "", + } + .to_string() + } +} + #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] pub struct Text { pub content: String, @@ -1687,6 +1700,7 @@ pub enum File { }, External { external: ExternalFile, + caption: Option>, }, #[serde(other)]