mehr-it / otto-quantities-api-client
使用 Swagger 生成的 Otto 数量 API 的 PHP 客户端
2.0.1
2020-12-14 10:37 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2|^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2024-09-14 19:31:33 UTC
README
数量接口
此 PHP 包由 Swagger Codegen 项目自动生成
- API 版本:2.0.0
- 构建包:io.swagger.codegen.v3.generators.php.PhpClientCodegen
要求
PHP 5.5 及以上
安装与使用
Composer
要通过 Composer 安装绑定,请将以下内容添加到 composer.json
{
"repositories": [
{
"type": "git",
"url": "https://github.com/mehr-it/otto-quantities-api-client.git"
}
],
"require": {
"mehr-it/otto-quantities-api-client": "*@dev"
}
}
然后运行 composer install
手动安装
下载文件并包含 autoload.php
require_once('/path/to/./vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门
请遵循 安装过程,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); $apiInstance = new MehrIt\OttoQuantitiesApiClient\Api\AvailableQuantityApi( // 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() ); $body = array(new \MehrIt\OttoQuantitiesApiClient\Model\AvailableQuantityRequestDTOV2()); // \MehrIt\OttoQuantitiesApiClient\Model\AvailableQuantityRequestDTOV2[] | availableQuantityRequestDTO try { $result = $apiInstance->storeAvailableQuantitiesUsingPOST($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AvailableQuantityApi->storeAvailableQuantitiesUsingPOST: ', $e->getMessage(), PHP_EOL; } ?>
API 端点文档
所有 URI 都相对于 https://available-quantity-gateway.develop.availability.platform.otto.de/
模型文档
授权文档
所有端点都不需要授权。