get-notion-contents
Get contents from notion
Installation
$ npm i -S get-notion-contents
⚠️ Prerequisite
You need a token to use this package if you want to get private contents.
You can get it from Notion.so cookie. the key of it is token_v2
.
Development
$ export NOTION_TOKEN="<<YOUR_NOTION_TOKEN>>"$ npm start
Return type of methods
getUser()
Promise<>
getPageIds(skipChildren: boolean = false)
Promise<string>
getPageById(id: string)
Promise<>
getPages()
Promise<Array<>>
How to use
; // create instance of Notion.; ;
Option
- prefix: add prefix into relative links
- removeStyle: remove inline styles