import parentClient from "npm:@notionhq/client";
const { Client } = parentClient;
import { load } from "https://deno.land/x/denv@3.0.0/mod.ts";
await load({});
const token = Deno.env.get("NOTION_TOKEN");
async function main() {
console.log(`***token <${token}>`);
const notion = new Client({
auth: token,
});
const response = await notion.databases.query({
database_id: "af446fef53c84862b16c66233adcce3b",
});
console.log("Got response:", response);
}
main()
.then(() => console.log("success"))
.catch((err) => {
console.error(err);
});
import parentClient from "npm:@notionhq/client";
const { Client } = parentClient;
import { load } from "https://deno.land/x/denv@3.0.0/mod.ts";
await load({});
const token = Deno.env.get("NOTION_TOKEN");
async function main() {
console.log(`***token <${token}>`);
const notion = new Client({
auth: token,
});
const response = await notion.databases.query({
database_id: "af446fef53c84862b16c66233adcce3b",
});
console.log("Got response:", response);
}
main()
.then(() => console.log("success"))
.catch((err) => {
console.error(err);
});