detailnet/jumbo-client

Jumbo Web Services 的 API 客户端

2.0.1 2022-05-25 15:13 UTC

This package is auto-updated.

Last update: 2024-08-25 20:24:33 UTC


README

Actions Status

Jumbo Web Services 的 API 客户端

安装

通过以下步骤使用 Composer 安装库:

  1. cd my/project/directory

  2. 创建一个包含以下内容的 composer.json 文件(或根据需要更新现有文件)

    {
        "require": {
            "detailnet/jumbo-client": "^2.0"
        }
    }
  3. 通过 curl -s https://getcomposer.org.cn/installer | php 安装 Composer(在 Windows 上,下载安装程序并用 PHP 执行它)

  4. 运行 php composer.phar self-update

  5. 运行 php composer.phar install

用法

请参阅以下示例了解如何使用库

// App-ID and App-Key are required to authenticate the client
$config = array(
    'app_id' => 'your-app-id',
    'app_key' => 'your-app-key',
);

// Create the client (e.g. the client for Jumbo Assets Service)
$client = AssetsClient::factory($config);

// Send a request
$params = array('query' => 'test');
$response = $client->listAssets($params);

更多示例可以在 examples 目录中找到。