imemento/http
Composer 安装命令:
composer require imemento/http
包简介
iMemento HTTP Helpers
README 文档
README
Abstracts the communication between API and clients. It is framework independent.
Install
composer require imemento/http
Usage
Service.php is an abstract class extended by all the other SDKs and exposes useful REST methods. It manages service and user permissions behind the scenes.
use iMemento\Http\Service; // Example: class DestinationsService extends Service { public function getDestinations() { return $this->_get('/destinations'); } } $config = [ 'service_id' => 'destinations', 'endpoint' => 'http://api-destinations.dev/api/v1/', 'host' => 'api-destinations.dev', ]; $destinations = new DestinationsService(Issuer $issuer, array $config); $destinations->getDestinations(); //returns an array of top destinations
统计信息
- 总下载量: 2.39k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-01-07