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 494 days ago
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 497 days ago
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 500 days ago
import { Airtable } from "https://deno.land/x/airtable/mod.ts";
import * as wmill from "https://deno.land/x/windmill@v1.85.0/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 606 days ago
import * as wmill from "https://deno.land/x/windmill@v1.70.1/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 606 days ago