Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update Readme #324

Merged
merged 1 commit into from
Aug 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 18 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,19 @@ base.

To install airtable.js in a node project:

npm install airtable
```sh
npm install airtable
```

Airtable.js is compatible with Node 10 and above.

### Browser

To use airtable.js in the browser, use [airtable.browser.js](https://github.com/Airtable/airtable.js/blob/master/build/airtable.browser.js) which is in the `build` folder.
To use airtable.js in the browser, use [build/airtable.browser.js](build/airtable.browser.js).

For a demo, run:
```

```sh
cd test/test_files
python -m SimpleHTTPServer
```
Expand All @@ -42,23 +45,28 @@ See the [technical requirements](https://support.airtable.com/hc/en-us/articles/

There are three configurable options available:

* `apiKey` - set the token to your secret API token. Visit [your account page](https://airtable.com/account) to create an API token. (`AIRTABLE_API_KEY`)
* `endpointUrl` - the API endpoint to hit. You might want to override
* `apiKey` - set the token to your secret API token. Visit [your account page](https://airtable.com/account) to create an API token. (`AIRTABLE_API_KEY`)
* `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`)
* `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_KEY' })

```js
Airtable.configure({ apiKey: 'YOUR_SECRET_API_KEY' })
```

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

export AIRTABLE_API_KEY=YOUR_SECRET_API_KEY
```sh
export AIRTABLE_API_KEY=YOUR_SECRET_API_KEY
```

You can also override the settings per connection:

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

# Interactive documentation

Expand Down