newman/draugiem-php-sdk
最新稳定版本:1.0.0
Composer 安装命令:
composer require newman/draugiem-php-sdk
包简介
Draugiem.lv API library for PHP based on Guzzle.
README 文档
README
This is not the official library!
This is a minor rewrite of original api library using Guzzle client and strict typing.
Requirements
- PHP 7.4+
Installation
Require the package via Composer:
composer require newman/draugiem-php-sdk
📖 Documentation & Usage
Make an API call
Response is an implementation of Psr\Http\Message\ResponseInterface.
$draugiemApi = new \Newman\DraugiemPhpSdk\DraugiemApi(1234, 'app key'); //$draugiemApi = new \Newman\DraugiemPhpSdk\DraugiemApi(1234, 'app key', 'user key'); $response = $draugiemApi->apiCall('authorize', ['code' => 5728195]); var_dump($response->getStatusCode()); var_dump($response->getBody()->getContents());
Set default Guzzle client options
$draugiemApi = new \Newman\DraugiemPhpSdk\DraugiemApi(1234, 'app key'); $draugiemApi->setDefaultGuzzleClientOptions([ 'timeout' => 10, 'headers' => [ 'User-Agent' => 'testing/1.0', ], ]); // make an api call
🤝 Contributing
We'll appreciate your collaboration to this package.
When making pull requests, make sure:
- All tests are passing:
composer test - Test coverage is not reduced:
composer test-coverage - There are no PHPStan errors:
composer phpstan - Coding standard is followed:
composer lintorcomposer fix-styleto automatically fix it.
统计信息
- 总下载量: 29
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-01-25