yogarine/boxture-v2-sdk-php

Boxture API v2 的 SDK

0.1.0 2019-06-04 13:13 UTC

This package is auto-updated.

Last update: 2024-09-05 01:25:27 UTC


README

Boxture API v2 的详细文档和测试工具

此 PHP 包由 OpenAPI Generator 项目自动生成

  • API 版本:0.0.1
  • 包版本:0.1.0
  • 构建包:org.openapitools.codegen.languages.PhpClientCodegen

需求

PHP 5.5 及以上版本

安装 & 使用

Composer

要使用 Composer 安装绑定,请将以下内容添加到 composer.json

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/yogarine/boxture-v2-sdk-php.git"
    }
  ],
  "require": {
    "yogarine/boxture-v2-sdk-php": "*@dev"
  }
}

然后运行 composer install

手动安装

下载文件并包含 autoload.php

    require_once('/path/to/boxture-v2-sdk-php/vendor/autoload.php');

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门指南

请遵循 安装过程,然后运行以下操作

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure API key authorization: api_key
$config = Boxture\V2\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Boxture\V2\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new Boxture\V2\Api\HandlingUnitsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$search = 'search_example'; // string | 
$orderField = 'orderField_example'; // string | Exact field name you want to sort the output by
$orderDirection = 'asc'; // string | Sort direction
$page = 1; // int | Page number
$pageSize = 25; // int | Max number of results per page

try {
    $result = $apiInstance->getHandlingUnits($search, $orderField, $orderDirection, $page, $pageSize);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling HandlingUnitsApi->getHandlingUnits: ', $e->getMessage(), PHP_EOL;
}

?>

API 端点文档

所有 URI 都相对于 http://staging.localexpress.nl/api/v2

模型文档

授权文档

api_key

  • 类型:API密钥
  • API密钥参数名:Authorization
  • 位置:HTTP头

作者

support@boxture.com