fvgestao / generic-api-client
PHP 通用 API 客户端
0.1.4
2022-07-14 20:03 UTC
Requires
- php: >=5.6
- guzzlehttp/guzzle: ^7.0.1
- guzzlehttp/promises: ~1.0
- guzzlehttp/psr7: ~1.0
- mtdowling/jmespath.php: ~2.2
Requires (Dev)
- ext-dom: *
- ext-json: *
- ext-openssl: *
- ext-pcre: *
- ext-simplexml: *
- ext-spl: *
- andrewsville/php-token-reflection: ^1.4
- behat/behat: ~3.0
- doctrine/cache: ~1.4
- nette/neon: ^2.3
- phpunit/phpunit: ~4.0
Suggests
- ext-curl: To send requests using cURL
- ext-openssl: Allows working with CloudFront private distributions and verifying received SNS messages
- doctrine/cache: To use the DoctrineCacheAdapter
README
资源
功能
- 提供易于使用的 HTTP 客户端
- 基于 Guzzle 构建,并利用其许多功能,包括持久连接、异步请求、中间件等。
- 提供便利功能,包括通过 分页器、等待器 和简单的 结果对象 实现易于分页的结果。
- 提供多部分上传工具
安装
composer require abdala/generic-api-client
快速示例
CloudFlare 客户端
示例项目: https://github.com/abdala/cloudflare-client
<?php $client = new CloudFlare\Client([ 'version' => '4', 'key' => 'your key', 'email' => 'email@domain.com' ]); echo $client->listZones();