jimbojsb/github-repo-events
Composer 安装命令:
composer require jimbojsb/github-repo-events
包简介
A standalone client for parsing the Github Repo Events API
README 文档
README
This library will allow you to poll the Github events API rather than using a web hook.
Usage
Basic usage on a public repo
$eventsStream = new GithubRepoEvents\RepsitoryEventStream("user/repo"); foreach ($eventsStream as $event) { // do stuff with events }
Add an API key for increased quota or access to private repos
$eventsStream = new GithubRepoEvents\RepsitoryEventStream("user/repo", "githubApiKey"); foreach ($eventsStream as $event) { // do stuff with events }
Use ETags to avoid quota hits
// costs from quota $eventsStream = new GithubRepoEvents\RepsitoryEventStream("user/repo", "githubApiKey"); foreach ($eventsStream as $event) { // do stuff with events } $etag = $eventStream->getEtag(); // does not cost from quota, assuming the stream has no new events $eventsStream = new GithubRepoEvents\RepsitoryEventStream("user/repo", "githubApiKey"); $eventStream->setEtag($etag); foreach ($eventsStream as $event) { // do stuff with events }
统计信息
- 总下载量: 19
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-02-17