New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

easy-airtable

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easy-airtable

more easier airtable

latest
Source
npmnpm
Version
1.1.3
Version published
Weekly downloads
9
350%
Maintainers
1
Weekly downloads
 
Created
Source

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

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' });

Keywords

airtable

FAQs

Package last updated on 08 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts