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

easy-airtable

v1.1.3

Published

more easier airtable

Downloads

14

Readme

EasyAirtable.js

The EasyAirtable API provides easier way of accessing your data with airtable. It provides functions like typeorm features and some complicated features.

Installation

Node.js

To install easy-airtable.js in node project:

npm install easy-airtable

Configuration

There are three variables for configure

Airtable

  • 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)
new EasyAirtable({ apiKey: 'YOUR_SECRET_API_TOKEN' })
// or
new EasyAirtable({ endpointUrl: 'https://api-airtable-com-8hw7i1oz63iz.runscope.net/' })

AirtableBase

  • baseId - your baseId for airtable base. you can see this id rom your base url (https://airtable.com/BASE_ID/TABLE_ID) or /help/API documentation.
new EasyAirtable({ apiKey: 'YOUR_SECRET_API_TOKEN' }).getBase('YOUR_BASE_ID')
// or
EasyAirtableBase.fromConfig({ apiKey: 'YOUR_SECRET_API_TOKEN', baseId: 'YOUR_BASE_ID' })

AirtableTable

  • tableId - your tableId for airtable table. you can see this id rom your base url (https://airtable.com/BASE_ID/TABLE_ID) or /help/API documentation.
new EasyAirtable({ apiKey: 'YOUR_SECRET_API_TOKEN' })
  .getTable({ baseId: 'YOUR_BASE_ID', tableId: 'YOUR_TABLE_ID' });
// or
EasyAirtableTable.fromConfig({ 
  apiKey: 'YOUR_SECRET_API_TOKEN', 
  baseId: 'YOUR_BASE_ID', 
  tableId: 'YOUR_TABLE_ID',
})

Usage

Find All

find all records in table

import { EasyAirtableTable } from 'easy-airtable';

const config = {
  apiKey: 'YOUR_SECRET_API_TOKEN',
  baseId: 'YOUR_BASE_ID',
  tableId: 'YOUR_TABLE_ID',
}
const table = EasyAirtableTable.fromConfig(config);
const allRecords = await table.findAll();

Find

find all records in specific conditions in table

import { EasyAirtableTable } from 'easy-airtable';

const config = {
  apiKey: 'YOUR_SECRET_API_TOKEN',
  baseId: 'YOUR_BASE_ID',
  tableId: 'YOUR_TABLE_ID',
}
const table = EasyAirtableTable.fromConfig(config);
const allRecords = await table.findBy({ 'FIELD_NAME1': 'MATCHING_VALUE1', 'FIELD_NAME2': 'MATCHING_VALUE2' });