我试图获取我的 Notion 工作区的所有页面,但搜索方法返回空响应,而我的个人工作区上有页面。
代码 :
import { Client, LogLevel } from '@notionhq/client'
const notion = new Client({
auth: '<hidden>',
logLevel: LogLevel.DEBUG
})
const databasesQuery = await notion.search({})
console.log(databasesQuery)
Run Code Online (Sandbox Code Playgroud)
输出
@notionhq/client info: request start { method: 'post', path: 'search' }
@notionhq/client info: request success { method: 'post', path: 'search' }
{ object: 'list', results: [], next_cursor: null, has_more: false }
Run Code Online (Sandbox Code Playgroud) notion-api ×1