npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@lsagetlethias/node-airtable

v0.5.0

Published

Based on the he official [Airtable JavaScript library](https://github.com/lsagetlethias/airtable.js).

Downloads

3

Readme

Based on the he official Airtable JavaScript library.

Airtable.js

The Airtable API provides a simple way of accessing your data. Whether it's contacts, sales leads, inventory, applicant information or todo items, the vocabulary of the interactions closely matches your data structure. You will use your table names to address tables, column names to access data stored in those columns. In other words, the Airtable API is your own RESTful API for your base.

Installation

Node.js

To install Airtable.js in a node project:

npm install @lsagetlethias/node-airtable
yarn add @lsagetlethias/node-airtable

Airtable.js is compatible with Node 18 and above.

Configuration

There are three configurable options available:

  • apiKey - your secret API token. Visit /create/tokens to create a personal access token. OAuth access tokens can also be used.
  • endpointUrl - the API endpoint to hit. You might want to override it if you are using an API proxy (e.g. runscope.net) to debug your API calls. (AIRTABLE_ENDPOINT_URL).
  • requestTimeout - the timeout in milliseconds for requests. The default is 5 minutes (300000).

You can set the options globally via Airtable.configure:

Airtable.configure({ apiKey: 'YOUR_SECRET_API_TOKEN' })

Globally via process env (e.g. in 12factor setup):

export AIRTABLE_API_KEY=YOUR_SECRET_API_TOKEN

You can also override the settings per connection:

const airtable = new Airtable({endpointUrl: 'https://api-airtable-com-8hw7i1oz63iz.runscope.net/'})

Interactive documentation

Go to https://airtable.com/api to see the interactive API documentation for your Airtable bases. Once you select a base, click the "JavaScript" tab to see code snippets using Airtable.js. It'll have examples for all operations you can perform against your base using this library.

You can also view non-interactive API documentation at https://airtable.com/developers/web/api.

Promises

As of original lib's v0.5.0 all of the methods that would take a done callback would return a Promise if you don't pass in a done callback.

Now all methods are Promise-based only.

For example:

// not supported anymore
table.select().firstPage(result => { ... })

is equivalent to

table.select().firstPage().then(result => { ... })