notion-sdk 0.0.0

A rust implementation of the nvd-yew.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::search::SearchRequest;
use crate::{Error, NotionApi, Object};

const ROUTER: &str = "search";

impl NotionApi {
    /// Retrieve a user
    pub async fn search(&self, query: SearchRequest) -> Result<Object, Error> {
        let u = format!("{}/{}", self.base_path, ROUTER);
        self.request(self.client.post(u).json(&query)).await
    }
}