0
Retrieve Block
One script reply has been approved by the moderators Verified
Created by paulsjasmin 893 days ago Viewed 9130 times
0
Submitted by adam186 Deno
Verified 570 days ago
1
import { Client } from "npm:@notionhq/client";
2

3
/**
4
 * Learn more at
5
 * https://developers.notion.com/reference/retrieve-a-block
6
 */
7
type Notion = {
8
  token: string;
9
};
10
export async function main(auth: Notion, block_id: string) {
11
  const client = new Client({ auth: auth.token });
12
  return await client.blocks.retrieve({ block_id });
13
}
14