承接 zlt/airtable 相关项目开发

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

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

zlt/airtable

最新稳定版本:v0.2.1

Composer 安装命令:

composer require zlt/airtable

包简介

Easy To Use PHP SDK for Airtable API

README 文档

README

This package also supports easy to use Search feature which is implemented under the hood of filterByFormula parameter. Check here for more details.

Table Of Contents

Installation

$ composer require zlt/airtable

Usage

  • Initialize

    $client = new Client('token');

    The base api endpoint is https://api.airtable.com/v0/ . You can change it by specifying the second parameter of the constructor.

     $client = new Client('token','custom-endpoint');
  • How to get appId, tableId and viewId

    The format of the url is https://airtable.com/{appId}/{tableId}/{viewId} .

  • Set appId

    $client->setAppId('appId');
  • Set tableId

    $client->setTable('tableId');
  • Create a record

    $client->create([
        'field1' => 'value1',
        'field2' => 'value2',
    ]);
  • Create multiple records

    $client->createMany([[
        'field1' => 'value1',
        'field2' => 'value2',
    ],[
        'field1' => 'value1',
        'field2' => 'value2',
    ]]);
  • Get a record

    $client->get('recordId'); 
  • Get multiple records

    $client->get(['recordId1','recordId2']); 
  • Get all records in table

    $client->all();
  • Update a record

    $client->update('recordId',[
        'field1' => 'value1',
        'field2' => 'value2',
    ]);
  • Update multiple records

    $client->updateMany([
        'recordId1' => [
            'field1' => 'value1',
            'field2' => 'value2',
        ],
        'recordId2' => [
            'field1' => 'value1',
            'field2' => 'value2',
        ],
    ]);
  • Delete a record

    $client->delete('recordId');
  • Delete multiple records

    $client->deleteMany(['recordId1','recordId2']);
  • Search

    You can perform operations such as where, whereOr, whereNot, and and.

    $client->search()
            ->whereNot('Name', 'Doe')
            ->whereOr('Name', 'John')
            ->and(function ($search) {
                return $search->where('Status', 'Active');
            })
            ->get()

Support me

I would be really appreciated if you buy me a coffee via Binance. 😄😄

binancePayQR

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固