我正在尝试获取我的 Notion 工作区的所有页面,但是当我的个人工作区中有页面时,搜索方法返回一个空响应。
代码 :
import { Client, LogLevel } from '@notionhq/client'
const notion = new Client({
auth: '<hidden>',
logLevel: LogLevel.DEBUG
})
const databasesQuery = await notion.search({})
console.log(databasesQuery)
输出
@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 }