Download the PHP package guym4c/airtable-client without Composer

On this page you can find all versions of the php package guym4c/airtable-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package airtable-client

airtable-client

A modern PHP API client for Airtable.

Install

via Composer:

Usage

Get yourself an instance of the client:

You can now access CRUD (create, read, update, delete) operations on the tables in your base.

Records

The client will provide an instance of a Record after Get, Create and Update operations. Record exposes getters for the table it is in, its Airtable ID, the JSON data array, and the time that it was fetched from Airtable.

You can also access fields in the record as properties of the Record:

Where your Airtable field names have spaces in, you can use the curly brace syntax - $record->{'field name with spaces'};.

Fields that relate to other tables in the base are automatically detected. If you are accessing the field as a property, the client does not know which table the relation is directed towards, and will return you a Loader that you can pass the table name to and resolve the relation.

You can also just call $record->load($field, $table); to get straight to the related record.

Listing records

You can get more than 1 record by calling $airtable->list($table). You can filter these results by passing an extra Filter parameter - see your base's API docs for details on what the properties of Filter do.

There are two filter shorthand methods: search($table, $field, $value) and find($table, $field, $value). search() performs an Airtable search for $value in $table.$field, and as such will return substring matches. find() will only return exact matches.

As list() results are paginated, list() returns the completed Request object to you. You can then either get the list of Records that were fetched using getRecords(), or move to the next page using nextPage(). Bear in mind that the page pointer will eventually reset on Airtable's end.

Batch jobs

$airtable->createAll() and $airtable->updateAll() allow requests to be batched. You can pass as many arrays and records to these methods respectively, and the client will use batch requests to create them all.

Rate limits

Airtable's API is rate-limited to 5 queries per second. If you exceed this limit, the client will throttle requests, blocking as it does. If this rate is exceeded on Airtable's end and you are put into the 30-second penalty box, calls to the API will raise an exception.

Caching

Commonly, you may have some tables within your base where data is more stagnant. To prevent these from affecting your rate limit, you may provide the client constructor an implementation of the Doctrine Cache interface, and an array of tables you consider 'cachable'.

The client will respond to requests that have no filters or sorts applied from the cache, and attempt to respond to get(), search() and find() too. You can clear the cache by calling the client's flushCache() method. A table's cache will also be dropped when records are created, modified or deleted by the client.

Cachable tables must have less than 101 records, as the client will not cache tables that Airtable paginates.

Advanced

The client constructor exposes additional parameters for advanced usage.

If you are using the client across multiple applications, you may come up against the rate limit if your clients all attempt to contact Airtable at once. The last three constructor parameters are provided to enable you to proxy requests to Airtable through a central throttle.


All versions of airtable-client with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^7.0.1
ext-json Version *
davedevelopment/stiphle Version ^0.9.2
shrikeh/teapot Version ^2.3
doctrine/cache Version ^1.8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package guym4c/airtable-client contains the following files

Loading the files please wait ....