jasonLaster / abuses

4 stars 3 forks source link

add script to update videos.json #11

Closed jasonLaster closed 4 years ago

jasonLaster commented 4 years ago
  1. fetch json from airtable
  2. update videos.json
jasonLaster commented 4 years ago
var Airtable = require('airtable');
var base = new Airtable({
    apiKey: ''
}).base('appZbn3MLkrGwrxAz');

base('Incidents').select({
    maxRecords: 1000,
    view: "Website"
}).eachPage(function page(records, fetchNextPage) {
    // This function (`page`) will get called for each page of records.

    records.forEach(function(record) {
        console.log('Retrieved', record.get('Incident ID'), );
    });

    // To fetch the next page of records, call `fetchNextPage`.
    // If there are more records, `page` will get called again.
    // If there are no more records, `done` will get called.
    fetchNextPage();

}, function done(err) {
    if (err) { console.error(err); return; }
});
dmnd commented 4 years ago

This is done