sdkfabric/airtable

Airtable PHP SDK managed by SDK Fabric

Maintainers

Package info

github.com/sdk-fabric/airtable-php

Homepage

pkg:composer/sdkfabric/airtable

Transparency log

Fund package maintenance!

chriskapp

Statistics

Installs: 9 901

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

v0.4.2 2024-11-01 15:52 UTC

This package is auto-updated.

Last update: 2026-08-15 21:51:57 UTC


README

This SDK is managed by the SDK Fabric project, a global infrastructure to automatically generate SDKs for every API.

You can find more information about this SDK at TypeHub: https://app.typehub.cloud/d/sdkfabric/airtable

Usage

<?php

require __DIR__ . '/vendor/autoload.php';

$client = new \SdkFabric\Airtable\Client::build('[access_token]');

// Retrieve the user's ID.
$response = $client->meta()->getwhoami();

// List records in a table.
$response = $client->records()->getall('baseId', 'tableIdOrName', 'timeZone', 'userLocale', 1, 1, 'offset', 'view', 'sort', 'filterByFormula', 'cellFormat', 'fields', true, 'recordMetadata');

// Retrieve a single record.
$response = $client->records()->get('baseId', 'tableIdOrName', 'recordId');

// Creates multiple records.
$response = $client->records()->create('baseId', 'tableIdOrName', new RecordCollection());

// Updates a single record.
$response = $client->records()->replace('baseId', 'tableIdOrName', 'recordId', new Record());

// Updates up to 10 records, or upserts them when performUpsert is set.
$response = $client->records()->replaceall('baseId', 'tableIdOrName', new BulkUpdateRequest());

// Updates a single record.
$response = $client->records()->update('baseId', 'tableIdOrName', 'recordId', new Record());

// Updates up to 10 records, or upserts them when performUpsert is set.
$response = $client->records()->updateall('baseId', 'tableIdOrName', new BulkUpdateRequest());

// Deletes a single record.
$response = $client->records()->delete('baseId', 'tableIdOrName', 'recordId');

// Creates a new column and returns the schema for the newly created column.
$response = $client->fields()->create('baseId', 'tableId', new Field());

// Updates the name and/or description of a field.
$response = $client->fields()->update('baseId', 'tableId', 'columnId', new Field());

// Creates a new table and returns the schema for the newly created table.
$response = $client->tables()->create('baseId', new Table());

// Updates the name and/or description of a table.
$response = $client->tables()->update('baseId', 'tableIdOrName', new Table());

// Returns a list of comments for the record from newest to oldest.
$response = $client->comments()->getall('baseId', 'tableIdOrName', 'recordId');

// Creates a comment on a record.
$response = $client->comments()->create('baseId', 'tableIdOrName', 'recordId', new Comment());

// Updates a comment on a record.
$response = $client->comments()->update('baseId', 'tableIdOrName', 'recordId', 'rowCommentId', new Comment());

// Deletes a comment from a record.
$response = $client->comments()->delete('baseId', 'tableIdOrName', 'recordId', 'rowCommentId');