anthonypauwels/airtable
最新稳定版本:0.1.0
Composer 安装命令:
composer require anthonypauwels/airtable
包简介
An Airtable Client
README 文档
README
An Airtable Client.
Installation
Require this package with composer.
composer require anthonypauwels/airtable
Laravel without auto-discovery:
If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php:
Anthonypauwels\AirTable\Laravel\ServiceProvider::class,
Then add this line to your facades in config/app.php:
'AirTable' => Anthonypauwels\AirTable\Laravel\AirTable::class,
Usage
use Anthonypauwels\AirTable\AirTable; $airTable = new AirTable( [ 'key' => 'key**************', 'base' => 'app**************', 'url' => AirTable::API_URL, ] ); $recordsA = $airTable->table('Your table')->view('View')->get(); $recordsB = $airTable->table('Another table')->where('key', '=', 'value' )->view('In view this view')->get();
With Laravel
Define your environment variables into your .env file :
AIRTABLE_KEY="key**************" AIRTABLE_BASE="app**************"
The package provides by default a Facade for Laravel application. You can call methods directly using the Facade or use the alias instead.
use Anthonypauwels\AirTable\Laravel\AirTable; $recordsA = AirTable::table('Your table')->view('View')->get();
API documentation
AirTable
/** * Get a builder for a table from the default base */ function table(string $table_name): Builder; /** * Get a base */ function on(string $base_id): Base;
Base
/** * Get a builder for a table */ function table(string $table_name): Builder;
Client
/** * Count the number of elements inside the query */ function count(): int; /** * If AirTable must perform an automatic data conversion from string values */ function typecast(bool $value): Builder; /** * Delay between request */ function delay(int $value): Builder; /** * Search for specific fields from records */ function fields(array|string $fields): Builder; /** * Filter records using a logical where operation */ function where(string $field, mixed $operator, $value = null): Builder; /** * Filter records using a raw query */ function whereRaw(string $formula): Builder; /** * Get records from a specific view */ function view(string $view_name): Builder; /** * Order records by a field and direction */ function orderBy(string $field, string $direction = 'asc'): Builder; /** * Set the limit value to get a limited number of records */ function limit(int $value): Builder; /** * Alias to limit method */ function take(int $value): Builder; /** * Set the offset value to get records from a specific page */ function offset(int $value): Builder; /** * Alias to offset method */ function skip(int $value): Builder; /** * Get records with a limit of 100 by page */ function get(): array; /** * Method alias to get, return all records */ function all(): array; /** * Get the first record */ function first(): array; /** * Find a record using his ID */ function find(string $id): array; /** * Insert a record */ function insert(array $data): array; /** * Update a record or many records. Destructive way */ function update(array|string $id, array $data = null): array; /** * Patch a single record or many records */ function patch(array|string $id, array $data = null): array; /** * Delete a single record */ function delete(string $id): array;
Requirement
PHP 8.0 or above
anthonypauwels/airtable 适用场景与选型建议
anthonypauwels/airtable 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 08 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「client」 「airtable」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 anthonypauwels/airtable 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 anthonypauwels/airtable 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 anthonypauwels/airtable 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Manipulate Airtable API using PHP
Mock PSR-18 HTTP client
Asynchronous MQTT client built on React
AirTable API client for PHP
A flexible yet simple to use Automad extension that let's you easily integrate Airtable bases into your site by using Handlebars templates
Client for Google Directions API to add interpolated points to a route consisting of given coordinates.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-08-30