-
-
Save m4rk3r/39a07cf6fb87a5b0a5ed60387c3f60ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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