Appearance
表
查看单表。
import { Client } from '@notionhq/client';
const TOKEN = 'ntn_123456';
const TABLE_ID = 'abc123';
const notion = new Client({ auth: TOKEN });
(async () => {
const data = await notion.databases.retrieve({
database_id: TABLE_ID
});
console.log(data);
})();查看单表。
import { Client } from '@notionhq/client';
const TOKEN = 'ntn_123456';
const VIEW_ID = 'ab12';
const notion = new Client({ auth: TOKEN });
(async () => {
const data = await notion.dataSources.retrieve({
data_source_id: VIEW_ID
});
console.log(data.properties);
})();