

TEST_BLOCK_HEADING_ID: Some heading block id inside the page specified above.TEST_BLOCK_ID: Some block id inside the page specified above.TEST_PAGE_ID: Some page id inside the database specified above.TEST_DATABASE_ID: The database id where you will be working on.env file on the root directory with the next variables:

To be able to run the tests you will have to have a.
#Notion python api how to#
Some errors that I have encounter and still don't know how to solve because are errors that also occur on Postman are: Create page with chidren Title: Text('NotionClient (v1): Page test'), Parent: Parent.database(id: 'YOUR_DATABASE_ID'), Append blocks children // Create children instance:Ĭhildren children = Children.withBlocks([
#Notion python api code#
To see code to create the page above or see more examples go here. NotionDatabasesClient databases = NotionDatabasesClient(token: 'YOUR_TOKEN') Ī page created and filled using only this package: NotionClient notion = NotionClient(token: 'YOUR_TOKEN') They are used like the main client but the methods are class methods instead of class properties methods. You can also use individual request group class like NotionPagesClient or NotionDatabasesClient. NotionClient notion = NotionClient(token: 'YOUR SECRET TOKEN FROM INTEGRATIONS PAGE') You only have to create a new instance of the NotionClient class and all the API requests will be available as class methods. You can find how to use it in its documentation. Important: The methods return a NotionResponse. See the ROADMAP file to see what is coming next.
