Skip to content

Instantly share code, notes, and snippets.

@m4rk3r
Last active April 5, 2021 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m4rk3r/39a07cf6fb87a5b0a5ed60387c3f60ef to your computer and use it in GitHub Desktop.
Save m4rk3r/39a07cf6fb87a5b0a5ed60387c3f60ef to your computer and use it in GitHub Desktop.
let poemFragments = {
noun: [],
verb: [],
adjective: [],
emotion: [],
};
var Airtable = require('airtable');
var base = new Airtable({apiKey: 'keyzwwUOzmCKuXxbq'}).base('appIQorANZvYFOqnN');
base('Poem fragments').select({}).eachPage(gotPageOfFragments, gotAllFragments);
function gotPageOfFragments(records, fetchNextPage) {
// fetch any more pages if they exist
fetchNextPage();
}
function gotAllFragments(err) {
// report an error, you'd want to do something better than this in production
if (err) {
console.log("error loading fragments");
console.error(err);
return;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment