notionrs 0.25.0

A Notion API client that provides type-safe request serialization and response deserialization
Documentation
mod integration_tests {

    // # --------------------------------------------------------------------------------
    //
    // query_data_source (struct)
    //
    // # --------------------------------------------------------------------------------

    #[tokio::test]
    async fn query_data_source_with_struct() -> Result<(), notionrs::Error> {
        dotenvy::dotenv().ok();

        let notion_api_key = std::env::var("NOTION_API_KEY_READONLY").unwrap();
        let client = notionrs::Client::new(notion_api_key);
        let res = client
            .query_data_source()
            .typed::<crate::data_source_schema::IntegrationTestDataSourceSchema>()
            .data_source_id(crate::readonly::DATA_SOURCE_ID)
            .send()
            .await?;

        println!("{}", serde_json::to_string(&res)?);

        Ok(())
    }
}