helo_notion_api

Blog collections for publishing to hexo.

Notion API Intergration

集成参考:https://zhuanlan.zhihu.com/p/679456951

1. 创建 API 应用

https://www.notion.so/my-integrations/internal/0a87ea617bb24022a00768e105e871cd

2. 链接到 API 应用

Untitled.png

3. 提取 page_id

比如:https://www.notion.so/septenary/Blog-389408900d2042bb8b837804fef88e54

page_id:389408900d2042bb8b837804fef88e54

4. 接口访问

1
2
3
4
5
6
7
8
const { Client } = require("@notionhq/client")

const notion = new Client({ auth: SECRETS})

; (async () => {
const list = await notion.pages.retrieve({page_id})
console.log(list)
})()