notion_api 0.0.1-beta1 notion_api: ^0.0.1-beta1 copied to clipboard
A client for the public beta of the Notion API
Notion API client for dart.
Using #
Important: The methods return a http.Response
. You can find how to use it in its documentation.
You can see some examples here.
NotionClient
class #
You only have to create a new instance of the NotionClient
class and all the API requests will be available as class methods.
NotionClient notion = NotionClient(token: 'YOUR SECRET TOKEN FROM INTEGRATIONS PAGE');
Individual classes #
You can also use individual request group class like NotionPagesClient
or NotionDatabasesClient
. They are used like the main client but the methods are class methods instead of class properties methods.
Example
// With main class
NotionClient notion = NotionClient(token: 'YOUR_TOKEN');
notion.databases.fetchAll();
// With individual class
NotionDatabasesClient databases = NotionDatabasesClient(token: 'YOUR_TOKEN');
databases.fetchAll();