Edits history of script submission #22479 for ' Retrieve Block (notion)'

  • bun
    One script reply has been approved by the moderators
    Ap­pro­ved
    import { Client } from "@notionhq/client";
    
    /**
     * Learn more at
     * https://developers.notion.com/reference/retrieve-a-block
     */
    type Notion = {
      token: string;
    };
    export async function main(auth: Notion, block_id: string) {
      const client = new Client({ auth: auth.token });
      return await client.blocks.retrieve({ block_id });
    }
    

    Submitted by hugo989 16 days ago