notionrs 0.13.0

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

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

        let data_source_id =
            std::env::var("NOTION_IT_DATA_SOURCE_ID").unwrap_or_else(|_| String::new());

        let notion_api_key = std::env::var("NOTION_TOKEN").unwrap();
        let client = notionrs::Client::new(notion_api_key);

        // # --------------------------------------------------------------------------------
        //
        // retrieve_data_source
        //
        // # --------------------------------------------------------------------------------

        let request = client.retrieve_data_source().data_source_id(data_source_id);

        let response = request.send().await?;

        println!("{}", serde_json::to_string(&response).unwrap());

        Ok(())
    }
}