Download the PHP package pcbowers/php-airtable without Composer

On this page you can find all versions of the php package pcbowers/php-airtable. 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 php-airtable

PHP Airtable Wrapper

PHP Airtable Wrapper for the Airtable API

Recent Updates

NEW You can now do updates that allow elements to be removed if necessary. See updateRecords for more details.

NEW Typecast is now an option by default. New select options will be automatically created rather than throwing errors.

Getting Started

Follow these steps to successfully implement this PHP Airtable Wrapper.

NOTE: The Airtable API allows one to implement basic CRUD functions on records, but does not allow you to make changes to the schema of the tables. Use their interface to make changes to the schema

Getting your API Key and Base ID

Two tokens are required to use this wrapper: an api token, and a base id. Follow these steps to get the token:

  1. Login to Airtable and click your profile picture.
  2. Click on "Accounts".

  1. Scroll down to "<> API".
  2. Copy the personal API Key.

  1. Navigate to the base you want to access with this wrapper.
  2. Click on the Help icon.
  3. Click on "<> API Documentation".

  1. Look at the URL and find the portion of the url that begins with 'app'.
  2. Copy your base ID.

Class Installation

You can either use composer or download the classes directly. To download using composer, run the following command:

If you are using composer, run the autoloader to include the various classes in your project:

If you downloaded the classes directly, include the airtable.php file:

Initialize the Class

Use the following code snippet with your API Key and Base ID to begin using the wrapper:

Examples

A number of examples are placed below to help use this wrapper. The examples assume that the class has already been initiated.

getApiKey & getBaseId

Returns the API Key and Base ID respectively for a specific instance.

Code Example:
Result:

listRecords

Returns a list of records from a given table. Empty fields from records are not returned.

A special parameter not included on the Airtable API has been added called . This paramater defaults to true but can be set to false. It allows you to return just 1 page of results instead of looping through all of them.

This has been tested on an Airtable base with a table containing 50,000 records and 31 columns of data. Due to varying internet connections and usages of the data, speeds cannot be estimated. However, the broader the search, the slower this will run. Therefore, in some use cases, it may be important to set checkOffset to false to increase load times even though you will only get a portion of the data. Alternatively, you can set the lower. Ideally, you want to keep your requests at a maximum of 1 page which can be calculated by . It is recommended that this number stay at 5 or less for optimal load speeds.

Code Template:
Code Example:
Result:

retrieveRecord

Retrieves a specific record from a given table. Empty fields from record are not returned.

Code Template:
Code Example:
Result:

createRecord

Create a record in a given table.

Code Template:
Code Example:
Result:

updateRecord

Update a specific record from a given table.

Code Template:
Code Example:
Result:

deleteRecord

Deletes a specific record from a given table.

Code Template:
Code Example:
Result:

getLastLog & getLog

Error logging is supported so that your program does not crash on request errors. Any of the functions that require Curl Requests will return false on failure or the record(s) at hand on success. On top of that, each failure or success is logged within the wrapper instance. The following code shows how to access the log:

Code:
Result:

All versions of php-airtable with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
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 pcbowers/php-airtable contains the following files

Loading the files please wait ....