Edits history of script submission #351 for ' Retrieve Page (notion)'

  • deno
    One script reply has been approved by the moderators
    Ap­pro­ved
    import { Client } from "npm:@notionhq/client";
    
    /**
     * Learn more at
     * https://developers.notion.com/reference/retrieve-a-page
     */
    type Notion = {
      token: string;
    };
    export async function main(
      auth: Notion,
      page_id: string,
      filter_properties?: string[],
    ) {
      const client = new Client({ auth: auth.token });
      if (!filter_properties?.filter(Boolean).length) {
        filter_properties = undefined;
      }
      return await client.pages.retrieve({
        page_id,
        filter_properties,
      });
    }
    

    Submitted by hugo697 367 days ago

  • deno
    import { Client } from "npm:@notionhq/client";
    
    /**
     * Learn more at
     * https://developers.notion.com/reference/retrieve-a-page
     */
    type Notion = {
      token: string;
    };
    export async function main(
      auth: Notion,
      page_id: string,
      filter_properties?: string[],
    ) {
      const client = new Client({ auth: auth.token });
      if (!filter_properties?.filter(Boolean).length) {
        filter_properties = undefined;
      }
      return await client.pages.retrieve({
        page_id,
        filter_properties,
      });
    }
    

    Submitted by admin 1003 days ago

  • deno
    import { Resource } from "https://deno.land/x/[email protected]/mod.ts";
    import { Client } from "npm:@notionhq/client";
    
    /**
     * Learn more at
     * https://developers.notion.com/reference/retrieve-a-page
     */
    export async function main(
      auth: Resource<"notion">,
      page_id: string,
      filter_properties?: string[],
    ) {
      const client = new Client({ auth: auth.token });
      if (!filter_properties?.filter(Boolean).length) {
        filter_properties = undefined;
      }
      return await client.pages.retrieve({
        page_id,
        filter_properties,
      });
    }
    

    Submitted by adam186 1110 days ago