gianarb/gstatus
最新稳定版本:0.0.1
Composer 安装命令:
composer require gianarb/gstatus
包简介
SDK PHP to Github Status API
README 文档
README
Little library to manage Github Status API
<?php use Gstatus\Client; use Gstatus\Request\Status; use Zend\Http\Client as HttpClient; require 'vendor/autoload.php'; $status = new Status("gianarb", "gstatus"); $status->setStatusFor("1ab5f09eb4e736890b17b7abdb80ed3e368a478f", [ "state" => "failure", "target_url" => "http://gianarb.it", "description" => "D'oh!", "context" => "my/test", ]); $client = new Client($token); $client->setHttpClient(new HttpClient()); $response = $client->send($status); if ($response->getStatusCode() != 200) { throw new \RuntimeException("D'oh!!"); }
With the DiC
<?php $status = new Status("gianarb", "gstatus"); $status->setStatusFor("1ab5f09eb4e736890b17b7abdb80ed3e368a478f", [ "state" => "failure", "target_url" => "http://gianarb.it", "description" => "D'oh!", "context" => "my/test", ]); $client = $container->get("github.client"); $client->send($status);
Install
composer install gianarb/gstatus
Github Docs
Change Http Adapter
This lib use Zend\Http see docs Default it use socker adapter but support:
- Proxy
- Curl
$zfclient = new \Zend\Http\Client(); $zfclient->setAdapter(new \Zend\Http\Client\Adapter\Curl()); $client = new \Gstatus\Client("token");
统计信息
- 总下载量: 210
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-12-12