aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorGravatar Shashank Pachava <spachava753@gmail.com> 2022-05-18 01:02:56 -0400
committerGravatar GitHub <noreply@github.com> 2022-05-17 22:02:56 -0700
commit8160fea0ffa1f074538ec5fd73b317bc9d023d6e (patch)
treeecd9288aa409051e57695b638f416540eb77cbe5 /src/lib.rs
parenta0106b557ee1af347b7c422be3364dd6d0fac945 (diff)
downloadnotion-8160fea0ffa1f074538ec5fd73b317bc9d023d6e.tar.gz
notion-8160fea0ffa1f074538ec5fd73b317bc9d023d6e.tar.zst
notion-8160fea0ffa1f074538ec5fd73b317bc9d023d6e.zip
Upgrade notion version (#39)
* Upgrade constant * Fix lint * Change module file tree Changed around module file tree, but module structure hasn't changed. Converted models.rs to mod.rs under models folder * Minor refactoring * Add MentionObject for rich text mention types * Add new fields to BlockCommon. Modify existing field model Text. Add heading 1 test Add created_by and last_edited_by fields to BlockCommon. Change field text to rich_text for model Text to handle breaking change in API version 2022-02-22 * Differentiate between unsupported and unknown block types * Change text field to rich_text in paragraph block * Add callout block. Add file and emoji object * Fix as_id for unsupported block * Fix lint issues * Move quote block to follow documentation order. Add color field to TextAndChildren struct * Add color field to ToDoFields struct * Formatting * Add caption field to code block Add caption field to code block. Create enum CodeLanguage for code block. Reorder code block to reflect documentation * Add child database block * Create embed block * Refactor notion file object struct name * Create image block * Create video block * Create file block * Fix video block field * Create pdf block * Change text field to rich_text in TodoFields for Notion API version 2022-02-22 * Create bookmark block * Create divider block * Create table of contents block * Create breadcrumb block * Create column list and column block * Create link preview block * Create template block * Formatting * Create link to page block * Fix ColumnListFields struct * Create table and table row block * Fix AsIdentifier trait impl for Block * Create synced block
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib.rs b/src/lib.rs
index ac45a35..ae2ed46 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -9,19 +9,17 @@ use tracing::Instrument;
pub mod ids;
pub mod models;
-pub use chrono;
-#[cfg(test)]
-mod tests;
+pub use chrono;
-const NOTION_API_VERSION: &str = "2021-08-16";
+const NOTION_API_VERSION: &str = "2022-02-22";
/// An wrapper Error type for all errors produced by the [`NotionApi`](NotionApi) client.
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("Invalid Notion API Token: {}", source)]
InvalidApiToken {
- source: reqwest::header::InvalidHeaderValue,
+ source: header::InvalidHeaderValue,
},
#[error("Unable to build reqwest HTTP client: {}", source)]