Edits history of script submission #349 for ' List Users (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";
    
    /**
     * @param start_cursor If supplied, only results starting after the cursor will be returned.
     *
     * @param page_size The number of items in the response. Maximum is `100`.
     *
     * Learn more at
     * https://developers.notion.com/reference/get-users
     */
    type Notion = {
      token: string;
    };
    export async function main(
      auth: Notion,
      start_cursor?: string | undefined,
      page_size?: number | undefined,
    ) {
      const client = new Client({ auth: auth.token });
      const args = removeObjectEmptyFields({
        page_size,
        start_cursor,
      });
      return await client.users.list(args);
    }
    

    Submitted by hugo697 376 days ago

  • deno
    import { removeObjectEmptyFields } from "https://deno.land/x/[email protected]/mod.ts";
    import { Client } from "npm:@notionhq/client";
    
    /**
     * @param start_cursor If supplied, only results starting after the cursor will be returned.
     *
     * @param page_size The number of items in the response. Maximum is `100`.
     *
     * Learn more at
     * https://developers.notion.com/reference/get-users
     */
    type Notion = {
      token: string;
    };
    export async function main(
      auth: Notion,
      start_cursor?: string | undefined,
      page_size?: number | undefined,
    ) {
      const client = new Client({ auth: auth.token });
      const args = removeObjectEmptyFields({
        page_size,
        start_cursor,
      });
      return await client.users.list(args);
    }
    

    Submitted by admin 1012 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";
    
    /**
     * @param start_cursor If supplied, only results starting after the cursor will be returned.
     *
     * @param page_size The number of items in the response. Maximum is `100`.
     *
     * Learn more at
     * https://developers.notion.com/reference/get-users
     */
    export async function main(
      auth: Resource<"notion">,
      start_cursor?: string | undefined,
      page_size?: number | undefined,
    ) {
      const client = new Client({ auth: auth.token });
      const args = removeObjectEmptyFields({
        page_size,
        start_cursor,
      });
      return await client.users.list(args);
    }
    

    Submitted by adam186 1119 days ago