Skip to content

Instantly share code, notes, and snippets.

@davo
Created April 9, 2018 19:28
Show Gist options
  • Save davo/f0e390625cf606942e6555e82cb16ccb to your computer and use it in GitHub Desktop.
Save davo/f0e390625cf606942e6555e82cb16ccb to your computer and use it in GitHub Desktop.
Airtable.js Query
const requestContent = (tableId, tableName) => {
let _content = []
return new Promise((resolve, reject) =>
base(tableId)
.select({
view: tableName
})
.eachPage(
rows =>
rows.forEach((row, index) => {
_content.push(row.fields)
return resolve(_content)
}),
_err => reject(_err)
)
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment