zubat/challonge-laravel

非官方API,用于与Laravel接口的Challonge得分板生成器。

1.0.3 2022-10-13 06:04 UTC

This package is auto-updated.

Last update: 2024-09-13 10:14:57 UTC


README

用于与Laravel 5.x接口的Challonge API的包

安装

composer require ZUBAT/Challonge-laravel

在.env中添加 CHALLONGE_KEY=<your key>

更新config\app.php

提供者 ZUBAT\Challonge\ChallongeServiceProvider::class,

外观 'Challonge' => 'ZUBAT\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个小组赛的支持

ZUBAT - zubat.ru 衍生自 - interludic.com.au