Skip to content

Instantly share code, notes, and snippets.

@m4rk3r
Last active Apr 5, 2021
Embed
What would you like to do?
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