glide
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v95View latest version
Effects and utility functions for working with Glide API 2.0.
Set glide environment variable to authenticate. If using effect, you can also provide a layer constructed with Glide.layer.
Simplest case, use runIngest with an async fetch:
import * as Glide from "https://esm.town/v/dvdsgl/glide";
await Glide.importTable({
table: "abc123-def456-ghi789",
getRows: async function*() {
// yield Row[] to add them to the stash
yield [{ Name: "David" }];
},
});
Load 20k pull requests:
import * as Glide from "https://esm.town/v/dvdsgl/glide";
await Glide.importTable({
table: "abc123-def456-ghi789",
getRows: async function*() {
const octokit = new Octokit({ auth: "..." });
for await (
const { data: prs } of octokit.paginate.iterator(octokit.rest.pulls.list, {
owner: "glideapps",
repo: "glide",
state: "all"
})
) yield prs;
},
});
Migrated from folder: glide/glide
