Skip to content

记录

查询记录。

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.query({
    data_source_id: VIEW_ID
  });
  for (let i of data.results) {
    console.log(i);
  }
})();

联系 math@baima.site