這款用於PHP的可使用的SDK使利用流行的PHP約定的可播放API更容易。
注意:該項目正在積極開發中,尚未準備好使用。
轉到:https://beachcasts.github.io/airtable-sdk-php/
通過作曲家
$ composer require beachcasts/airtable-sdk-php基本使用需要實例化airtableClient,如下所示:
require_once ( ' vendor/autoload.php ' );
use Beachcasts Airtable AirtableClient ;
use Beachcasts Airtable Config ;
// Add details to your environment - see documentation for recomendations
$ airtableClient = new AirtableClient (Config:: fromEnvironment (), <your_baseid>);
$ table = $ airtableClient -> getTable (<your_table_name>);<your_baseid>和<your_table_name> 。Config::fromEnvironment有關如何使用airtableClient的更多詳細信息,請參見 /docs,其中示例使用create() , read() ,read(), update() , delete()和list()方法 /with /with list(with /with list(with)使用可用數據。
有關最近發生了變化的更多信息,請參見ChangElog。
Airtable-SDK有3個測試套件:完整,單位和集成,我們包括針對Phpunit的DEV要求。請確保運行作曲家安裝以獲得所有依賴關係。
$ composer install運行單元測試只是告訴Phpunit運行“單元”測試套件
$ vendor/bin/phpunit --testsuite=unit運行集成測試將需要一個實際帳戶和詳細信息。
tests.env.default複製到tests.envStart from scratch方法Add a base 。讓新的基礎創建保留默認的Untitled Base名。BaseThe ID of this base is將其添加到TEST_BASE_ID鍵下的tests.envAIRTABLE_API_KEY鍵下的tests.envTable 1更新TEST_TABLE_NAME tests.env中一旦配置了.env,就可以使用以下命令進行測試:
$ vendor/bin/phpunit --testsuite=integration要運行完整的測試套件,您將需要按照概述的步驟進行集成測試。為了示例,請運行以下命令:
$ vendor/bin/phpunit --testsuite=full或者
$ vendor/bin/phpunit為了維持質量控制,我們維持以下標準的使用:
我們在代碼庫中提供phpcs.xml.dist ,以使用代碼sniffer驗證編碼標準(在我們的Composer.json清單中作為Dev依賴項包括在內)
要針對代碼庫運行codesniffer,請使用以下命令。
$ vendor/bin/phpcs --standard=phpcs.xml.dist src有關詳細信息,請參見貢獻和code_of_conduct。
如果發現任何與安全有關的問題,請發送電子郵件至[email protected],而不是使用問題跟踪器。
麻省理工學院許可證(麻省理工學院)。請參閱許可證文件以獲取更多信息。