notion_api 0.0.1-prealpha1 notion_api: ^0.0.1-prealpha1 copied to clipboard
Notion API client for dart.
Notion API client for dart.
Using #
You only have to create a new instance of the NotionClient class and all the API requests will be available as class methods.
Note: Maybe they will be separated onto separated classes, idk yet.
NotionClient notion = NotionClient(token: 'YOUR SECRET TOKEN FROM INTEGRATIONS PAGE');
Methods #
20/May/2021
: The methods return a http.Response
. You can find how to use it in its documentation.
Creating pages
Page page = Page(databaseId: 'YOUR DATABASE ID');
page.title = Text(content: 'The title of the new page');
notion.createPage(page);
Retrieving pages
notion.retrievePage(test_page_id);