GV14982 / async-airtable

A lightweight npm package to handle working with the Airtable API.
https://www.npmjs.com/package/asyncairtable
MIT License
53 stars 5 forks source link
airtable async hacktoberfest javascript npm promises

Async Airtable

ARCHIVED

I strongly suggest using the current official Airtable SDK as it now supports promises and I don't really have time to maintain this anymore.

Build: Tests Build: Tests npm npm (tag) MIT License

AsyncAirtable is a lightweight npm package to handle working with the Airtable API.

They have an existing library, but it is callback based and can get a little klunky at times, so I wrote this one that is promise based to make your life easier šŸ˜Š.

I also wrote a query builder so, instead of having to write those really annyoying filter formula strings you can just use an object like:

{
  where: {
    name: 'AsyncAirtable',
    $gte: {stars: 13}
  }
}

which will generate the following filterFormula string for you: AND({name} = 'AsyncAirtable', {stars} >= 13)

Requirements

Installation

npm install asyncairtable

Then you should be good to go!šŸ‘

Browser

If you want to use AsyncAirtable in a browser, please use the files in the ./dist folder. There is a regular and a minified version.

They are also available via unpkg.com:

Usage

const AsyncAirtable = require('async-airtable'); // or import { AsyncAirtable } from 'asyncairtable';
const asyncAirtable = new AsyncAirtable(API_KEY, BASE_ID, { ...CONFIG });

Documentation

To setup documentation run: npm run doc

This will generate a docs folder. Just open or serve index.html and you will have the docs!

You can also view them online.

License

MIT