Seneca Notion-Provider is a plugin for Seneca
Provides access to the Notion API using the Seneca provider convention. Notion API entities are represented as Seneca entities so that they can be accessed using the Seneca entity API and messages.
See seneca-entity and the Seneca Data Entities Tutorial for more details on the Seneca entity API.
NOTE: underlying third party SDK needs to be replaced as out of date and has a security issue.
This open source module is sponsored and supported by Voxgig. |
---|
// Setup - get the key value (<SECRET>) separately from a vault or
// environment variable.
Seneca()
// Get API keys using the seneca-env plugin
.use('env', {
var: {
$NOTION_TOKEN: String,
}
})
.use('provider', {
provider: {
notion: {
keys: {
authToken: {
value: '$NOTION_TOKEN'
},
}
}
}
})
.use('notion-provider')
let pageId = await seneca.entity('provider/notion/page')
.load$('<notion_page_id>');
Console.log('PAGE', pageId)
pageId.properties.checkMe.checkbox = false;
pageId = await pageId.save$()
Console.log('UPDATED PAGE', pageId)
$ npm install @seneca/notion-provider @seneca/env
None.
- "role":"entity","base":"notion","cmd":"list","name":"database","zone":"provider"
- "role":"entity","base":"notion","cmd":"list","name":"page","zone":"provider"
- "role":"entity","base":"notion","cmd":"load","name":"database","zone":"provider"
- "role":"entity","base":"notion","cmd":"load","name":"page","zone":"provider"
- "role":"entity","base":"notion","cmd":"save","name":"database","zone":"provider"
- "role":"entity","base":"notion","cmd":"save","name":"page","zone":"provider"
- "sys":"provider","get":"info","provider":"notion"
No description provided.
List Noion page data into an entity.
{}
No description provided.
Load Notion page data into an entity.
{}
No description provided.
Update/Save Notion page data into an entity.
{}
Get information about the Notion SDK.
Check out our sponsors and supporters, Voxgig, on their website here.
The SenecaJS org encourages participation. If you feel you can help in any way, be it with bug reporting, documentation, examples, extra testing, or new features, feel free to create an issue, or better yet - submit a Pull Request. For more information on contribution, please see our Contributing Guide.
Check out the SenecaJS roadmap here!