interludic / challonge-laravel
用于与Laravel连接Challonge括号生成器API的非官方API。
v1.0.4
2017-07-04 02:32 UTC
Requires
- guzzlehttp/guzzle: ^6.0
This package is auto-updated.
Last update: 2024-09-07 08:10:52 UTC
README
用于通过Laravel 5.x与[Challonge] API接口的包
安装
composer require interludic/challonge-laravel
在.env文件中添加CHALLONGE_KEY=<your key>
更新你的config\app.php
提供者 Interludic\Challonge\ChallongeServiceProvider::class,
外观 'Challonge' => 'Interludic\Challonge\Facades\Challonge'
使用
try {
$comp = Challonge::getTournament($challongeId);
if((!empty($comp)) && (($comp->state == "complete") || ($comp->state == "underway") || ($comp->state == "group_stages_underway"))){
$standings = Challonge::getStandings($challongeId);
// $standings['progress'] //Progress of group stage
}
} catch (Exception $e) {
Log::warning('Challonge failed to load standings!', ['challonge'=>$challongeId]);
}
待办事项
- 配置设置
- 添加支持超过1个小组赛阶段
Interludic - interludic.com.au 分支自 - team-reflex.com [Challonge]: http://api.challonge.com/v1