承接 beachcasts/airtable-sdk-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

beachcasts/airtable-sdk-php

Composer 安装命令:

composer require beachcasts/airtable-sdk-php

包简介

Flexible PHP SDK for the Airtable API.

README 文档

README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

This Airtable SDK for PHP makes it easier to leverage the Airtable API leveraging popular PHP conventions.

NOTE: This project is under active development, and is NOT ready for use.

Documentation

Go to: https://beachcasts.github.io/airtable-sdk-php/

Prerequisites

  • Composer installed globally
  • PHP v7.2+

Install

Via Composer

$ composer require beachcasts/airtable-sdk-php

Quick Start

Base usage requires instantiation of the AirtableClient, as shown below:

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>);
NOTES:
  1. Update <your_baseid> and <your_table_name> as needed.
  2. the Config::fromEnvironment

For more details of how to use the AirtableClient, see the /docs, where examples highlight using create(), read(), update(), delete(), and list() methods on/with Airtable data.

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

Airtable-SDK has 3 Test Suites: Full, Unit and Integration, we include a Dev requirement against PHPUnit. Please make sure you run the composer install to get all dependencies.

$ composer install

Unit Tests

Running the unit tests is simply telling phpunit to run the "unit" testsuite

$ vendor/bin/phpunit --testsuite=unit

Integration Tests

Running the integration tests will require an actual account and details from Airtable.

  1. Copy the file tests\.env.default to tests\.env
  2. Log into your Airtable account
  3. Add a base using the Start from scratch method. Let the new base creation retain the default Untitled Base name.
  4. Visit Airtable API docs and select your Base
  5. Copy the Base ID from the Introduction section. Look for The ID of this base is Add this to the tests\.env under the TEST_BASE_ID key
  6. Go to Your account and copy your API Key. Add this to the tests\.env under the AIRTABLE_API_KEY key
  7. If you have changed the default Table name away from Table 1 - update the TEST_TABLE_NAME in the tests\.env

Once the .env is configured, tests can be run with the following command:

$ vendor/bin/phpunit --testsuite=integration

Full Test Suite

To run the full Test Suite, you will need to follow the steps outlined for Integration testing. To Exceute, run the following command:

$ vendor/bin/phpunit --testsuite=full

or

$ vendor/bin/phpunit

Quality Control

To maintain quality control, we maintain use of the following standards:

  • PSR-2 Coding Standard,
  • PSR-4 standard for Autoload locations (via composer)
  • PSR-7 standard for HTTP messages (via GuzzleHttp implementation)

We provide a phpcs.xml.dist within the codebase to validate the Coding standard using Code Sniffer (included as dev dependency in our composer.json manifest)

To run the codesniffer against the codebase, use the following command.

$ vendor/bin/phpcs --standard=phpcs.xml.dist src

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email beachcasts@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 32
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 3
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-03-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固