85
86const loadEmoji = (code) => {
87 // const api = `https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/svg/${code.toLowerCase()}.svg`
88 const api = `https://cdn.jsdelivr.net/gh/shuding/fluentui-emoji-unicode/assets/${code.toLowerCase()}_color.svg`
89 return fetch(api).then((r) => r.text())
90}
91
11// Initialize Notion client
12export const notion = new Client({
13 auth: Deno.env.get("NOTION_API_KEY"),
14});
15
3// Initialize Notion client
4const notion = new Client({
5 auth: Deno.env.get("NOTION_API_KEY"),
6});
7
3// Initialize Notion client
4const notion = new Client({
5 auth: Deno.env.get("NOTION_API_KEY"),
6});
7
3// Initialize Notion client
4const notion = new Client({
5 auth: Deno.env.get("NOTION_API_KEY"),
6});
7
13 console.log(page.id);
14 // get the cobrowse value from the payload
15 // warning: properties in Notion are capitalized as a convention (see Cobrowse)
16 const cobrowse = (page.properties.Cobrowse.checkbox) ? false : true;
17 // save new cobrowse boolean to Notion page
3// Initialize Notion client
4const notion = new Client({
5 auth: Deno.env.get("NOTION_API_KEY"),
6});
7
3// Initialize Notion client
4const notion = new Client({
5 auth: Deno.env.get("NOTION_API_KEY"),
6});
7
6// Initialize Notion client
7const notion = new Client({
8 auth: Deno.env.get("NOTION_API_KEY"),
9});
10
20 {
21 status: "error",
22 message: "Failed to connect to Notion API",
23 error: error.message,
24 },
7 console.log("click: ", JSON.stringify(clickData));
8
9 fetch("/api/action", {
10 method: "POST",
11 headers: {