{"id":16728103,"url":"https://github.com/armetiz/airtable-php","last_synced_at":"2025-06-29T17:03:45.700Z","repository":{"id":62487135,"uuid":"61356131","full_name":"armetiz/airtable-php","owner":"armetiz","description":"Manipulate AirTable API using PHP","archived":false,"fork":false,"pushed_at":"2023-03-14T00:01:45.000Z","size":14,"stargazers_count":20,"open_issues_count":0,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-10T20:49:12.001Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/armetiz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-17T07:55:43.000Z","updated_at":"2025-04-03T01:26:03.000Z","dependencies_parsed_at":"2024-10-28T11:34:35.745Z","dependency_job_id":"d0852e7f-cf21-4bb3-bee7-0e81be98d89a","html_url":"https://github.com/armetiz/airtable-php","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/armetiz/airtable-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armetiz%2Fairtable-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armetiz%2Fairtable-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armetiz%2Fairtable-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armetiz%2Fairtable-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/armetiz","download_url":"https://codeload.github.com/armetiz/airtable-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armetiz%2Fairtable-php/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262632322,"owners_count":23340212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T23:08:44.021Z","updated_at":"2025-06-29T17:03:45.661Z","avatar_url":"https://github.com/armetiz.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Airtable for PHP\n\nBasic SDK to deal with airtable records.\n\n## Installation\n\nTell composer to require this bundle by running:\n\n``` bash\ncomposer require armetiz/airtable-php\n```\n\n## Usage\n\n```php\n$key   = \"APP_KEY\"; // Generated from : https://airtable.com/account\n$base  = \"BASE_ID\"; // Find it on : https://airtable.com/api\n$table = \"TABLE_NAME\"; // Find it on : https://airtable.com/api\n\n$airtable = new Airtable($key, $base);\n\n$records = $airtable-\u003efindRecords($table);\n```\n\n**Available methods**\n\n* Airtable::createTableManipulator(string $table): TableManipulator\n* Airtable::getRecord(string $table, string $id)\n* Airtable::createRecord(string $table, array $fields)\n* Airtable::setRecord(string $table, array $criteria = [], array $fields)\n* Airtable::updateRecord(string $table, array $criteria = [], array $fields)\n* Airtable::containsRecord(string $table, array $criteria = [])\n* Airtable::flushRecords(string $table)\n* Airtable::deleteRecord(string $table, array $criteria = [])\n* Airtable::findRecord(string $table, array $criteria = [])\n* Airtable::findRecords(string $table, array $criteria = [])\n\n## Example\n\nSimple member indexer that encapsulate Airtable within simple API.\nCan be used to start a CRM on Airtable.\n\nNote: Because Airtable doesn't allow schema manipulation using their public API, you should configure table using the WebUI with the following\n\n* Id : text\n* Firstname : text\n* Lastname : text\n* Email : email\n* CreatedAt : Date and time\n* Picture : Attachments\n\n\n```php\n$key   = \"APP_KEY\"; // Generated from : https://airtable.com/account\n$base  = \"BASE_ID\"; // Find it on : https://airtable.com/api\n$table = \"TABLE_NAME\"; // Find it on : https://airtable.com/api\n\n$airtable = new Airtable($key, $base);\n\n$records = $airtable-\u003efindRecords($table);\n```\n\n```php\nuse Armetiz\\AirtableSDK\\Airtable as AirtableClient;\n\nclass MemberIndex\n{\n    private $airtable;\n\n    public function __construct(AirtableClient $airtableClient, string $table)\n    {\n        $this-\u003eairtable = $airtableClient-\u003ecreateTableManipulator($table);\n    }\n\n    public function clear()\n    {\n        $this-\u003eairtable-\u003eflushRecords();\n    }\n\n    public function save(array $data)\n    {\n        $criteria = [\"Id\" =\u003e $data[\"id\"]];\n        $fields   = [\n            \"Id\"                    =\u003e $data[\"id\"],\n            \"Firstname\"             =\u003e $data[\"firstName\"],\n            \"Lastname\"              =\u003e $data[\"lastName\"],\n            \"Email\"                 =\u003e $data[\"email\"],\n            \"CreatedAt\"             =\u003e (string)$data[\"createdAt\"],\n        ];\n\n        if ($this-\u003eairtable-\u003econtainsRecord($criteria)) {\n            $this-\u003eairtable-\u003eupdateRecord($criteria, $fields);\n        } else {\n            $this-\u003eairtable-\u003ecreateRecord($fields);\n        }\n    }\n\n    public function delete($id)\n    {\n        $this-\u003eairtable-\u003edeleteRecord([\"Id\" =\u003e $id]);\n    }\n}\n```\n\n## Testing\n\nNot implemented yet.\n\n## License\n\nThis library is under the MIT license. [See the complete license](https://github.com/armetiz/airtable-php/blob/master/LICENSE).\n\n## Credits\n\nAuthor - [Thomas Tourlourat](http://www.wozbe.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmetiz%2Fairtable-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farmetiz%2Fairtable-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmetiz%2Fairtable-php/lists"}