forevermatt / budget-data-api-php-client
0.3.0
2021-04-15 22:56 UTC
Requires
- php: >=7.3
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- behat/behat: ^3.8
- friendsofphp/php-cs-fixer: ^2.18
- squizlabs/php_codesniffer: ^3.5
README
用于持久化预算数据的API
此PHP包由Swagger Codegen项目自动生成
- API版本:0.2.0
- 构建包:io.swagger.codegen.v3.generators.php.PhpClientCodegen
需求
PHP 7.3及更高版本
安装与使用
Composer
要通过Composer安装绑定,请运行以下命令
composer require forevermatt/budget-data-api-php-client
手动安装
下载文件并包含autoload.php
require_once('/path/to/budget-data-api-php-client/vendor/autoload.php');
测试
要运行单元测试
composer install
vendor/bin/behat .
入门指南
请按照安装过程进行操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); $apiInstance = new BudgetData\ApiClient\Api\DefaultApi( // 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 = new \BudgetData\ApiClient\Model\Account(); // \BudgetData\ApiClient\Model\Account | try { $apiInstance->accountPost($body); } catch (Exception $e) { echo 'Exception when calling DefaultApi->accountPost: ', $e->getMessage(), PHP_EOL; } $apiInstance = new BudgetData\ApiClient\Api\DefaultApi( // 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() ); try { $result = $apiInstance->accountsGet(); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->accountsGet: ', $e->getMessage(), PHP_EOL; } ?>
API端点文档
所有URI均相对于https://virtserver.swaggerhub.com/forevermatt/budget-data/0.1.3
模型文档
授权文档
所有端点均不需要授权。