Edits history of script submission #357 for ' Get Record (airtable)'

  • deno
    One script reply has been approved by the moderators
    Ap­pro­ved
    import { Airtable } from "https://deno.land/x/airtable/mod.ts";
    
    type Airtable = {
      apiKey: string;
    };
    
    type AirtableTable = {
      baseId: string;
      tableName: string;
    };
    export async function main(
      atCon: Airtable,
      atTable: AirtableTable,
      recordId?: string,
    ) {
      const airtable = new Airtable({ ...atCon, ...atTable });
    
      if (recordId) {
        const record = await airtable.find(recordId);
        return { result: record };
      } else {
        const records = await airtable.select().all();
        return { result: records };
      }
    }
    

    Submitted by hugo697 382 days ago

  • deno
    import { Airtable } from "https://deno.land/x/airtable/mod.ts";
    
    type Airtable = {
      apiKey: string;
    };
    
    type AirtableTable = {
      baseId: string;
      tableName: string;
    };
    export async function main(
      atCon: Airtable,
      atTable: AirtableTable,
      recordId?: string,
    ) {
      const airtable = new Airtable({ ...atCon, ...atTable });
    
      if (recordId) {
        const record = await airtable.find(recordId);
        return { result: record };
      } else {
        const records = await airtable.select().all();
        return { result: records };
      }
    }
    

    Submitted by hugo697 1012 days ago

  • deno
    import { Airtable } from "https://deno.land/x/airtable/mod.ts";
    
    type Airtable = {
      apiKey: string;
    };
    
    type AirtableTable = {
      baseId: string;
      tableName: string;
    };
    export async function main(
      at_con: Airtable,
      at_table: AirtableTable,
      recordId?: string,
    ) {
      const airtable = new Airtable({ ...at_con, ...at_table });
    
      if (recordId) {
        const record = await airtable.find(recordId);
        return { result: record };
      } else {
        const records = await airtable.select().all();
        return { result: records };
      }
    }
    

    Submitted by admin 1014 days ago

  • deno
    import { Airtable } from "https://deno.land/x/airtable/mod.ts";
    
    type Airtable = {
      apiKey: string;
    };
    
    type AirtableTable = {
      baseId: string;
      tableName: string;
    };
    export async function main(at_con: Airtable, at_table: AirtableTable, recordId?: string) {
      const airtable = new Airtable({...at_con, ...at_table});
    
      if (recordId) {
          const record = await airtable.find(recordId);
          return {result: record};
      } else {
          const records = await airtable.select().all();
          return {result: records};
      }
    }
    

    Submitted by admin 1018 days ago

  • deno
    import { Airtable } from "https://deno.land/x/airtable/mod.ts";
    import * as wmill from "https://deno.land/x/[email protected]/mod.ts";
    
    export async function main(at_con: wmill.Resource<"airtable">, at_table: wmill.Resource<"airtable_table">, recordId?: string) {
        const airtable = new Airtable({...at_con, ...at_table});
    
        const record = await airtable.find(recordId)
      
        return {result: record};
    }

    Submitted by henri186 1124 days ago

  • deno
    import * as wmill from "https://deno.land/x/[email protected]/mod.ts";
    import { Airtable } from "https://deno.land/x/airtable/mod.ts";
    
    export async function main(at_con: wmill.Resource<"airtable">, at_table: wmill.Resource<"airtable_table">, recordId?: string) {
        const airtable = new Airtable({...at_con, ...at_table});
    
        if (recordId) {
            const record = await airtable.find(recordId);
            return {result: record};
        } else {
            const records = await airtable.select().all();
            return {result: records};
        }
    }
    

    Submitted by henri186 1124 days ago