Edits history of script submission #353 for ' Search by Title (notion)'

  • deno
    One script reply has been approved by the moderators
    Ap­pro­ved
    import { removeObjectEmptyFields } from "https://deno.land/x/[email protected]/mod.ts";
    import { Client } from "npm:@notionhq/client";
    
    /**
     * Learn more at
     * https://developers.notion.com/reference/post-search
     */
    type Notion = {
      token: string;
    };
    export async function main(
      auth: Notion,
      query?: string,
      filter?: { property: string; value: string },
      sort?: { timestamp: string; direction: string },
      start_cursor?: string,
      page_size?: number,
    ) {
      const client = new Client({ auth: auth.token });
      const args = removeObjectEmptyFields({
        query,
        filter,
        sort,
        start_cursor,
        page_size,
      });
      return await client.search(args);
    }
    

    Submitted by hugo697 391 days ago

  • deno
    import { removeObjectEmptyFields } from "https://deno.land/x/[email protected]/mod.ts";
    import { Client } from "npm:@notionhq/client";
    
    /**
     * Learn more at
     * https://developers.notion.com/reference/post-search
     */
    type Notion = {
      token: string;
    };
    export async function main(
      auth: Notion,
      query?: string,
      filter?: { property: string; value: string },
      sort?: { timestamp: string; direction: string },
      start_cursor?: string,
      page_size?: number,
    ) {
      const client = new Client({ auth: auth.token });
      const args = removeObjectEmptyFields({
        query,
        filter,
        sort,
        start_cursor,
        page_size,
      });
      return await client.search(args);
    }
    

    Submitted by admin 1027 days ago

  • deno
    import { Resource } from "https://deno.land/x/[email protected]/mod.ts";
    import { removeObjectEmptyFields } from "https://deno.land/x/[email protected]/mod.ts";
    import { Client } from "npm:@notionhq/client";
    
    /**
     * Learn more at
     * https://developers.notion.com/reference/post-search
     */
    export async function main(
      auth: Resource<"notion">,
      query?: string,
      filter?: { property: string; value: string },
      sort?: { timestamp: string; direction: string },
      start_cursor?: string,
      page_size?: number,
    ) {
      const client = new Client({ auth: auth.token });
      const args = removeObjectEmptyFields({
        query,
        filter,
        sort,
        start_cursor,
        page_size,
      });
      return await client.search(args);
    }
    

    Submitted by adam186 1134 days ago