naymin / api-football
laravel 的 api-football.com API 容器(高度灵感来源于 grambas/football-data)
dev-master
2019-08-20 04:34 UTC
Requires
- guzzlehttp/guzzle: ~6.0
This package is auto-updated.
Last update: 2024-09-20 16:09:37 UTC
README
api-football.com API 容器 for Laravel (高度灵感来源于 grambas/football-data)
需求
- "guzzlehttp/guzzle": "~6.0"
安装
通过 Composer
$ composer require naymin/api-football
用法
有关过滤器、结构和 API 的更多信息:api-football.com 文档
将您的 API 密钥添加到环境文件
APIFOOTBALL_API_KEY=
添加到 config/app.php
'providers' => [
Naymin\APIfootball\APIFootballServiceProvider::class,
]
'aliases' => [
'Football' =>Naymin\APIfootball\Facades\APIFootballFacade::class,
]
示例
##COMPETITION/LEAGUE /** * List one particular competition. * * @param integer $leagueID * @return Collection */ Football::getLeague(int $leagueID) /** * Show Standings for a particular competition * @param integer $leagueID * @return Collection */ Football::getLeagueStandings(int $leagueID) /** * List all matches for a particular competition. * * @param integer $leagueID * @return Collection */ Football::getLeagueMatches(int $leagueID) ##FIXTURES/MATCHES /** * List matches across (a set of) competitions. * * @return Collection */ Football::getMatches() /** * Show one particular match. * * @param integer $matchID * @return Collection */ Football::getMatche(int $matchID) ##TEAM /** * Show one particular team. * * @param integer $teamID * @return Collection */ Football::getTeam(int $teamID) /** * Show all matches for a particular team. * * @param integer $teamID * @return Collection */ Football::getMatchesForTeam(int $teamID) /** * List all matches for a particular competition wthdate * * @param integer $leagueID * @param date $date * @return Collection */ Football::getLeagueMatchesWithDate(int $leagueID,$date)
许可协议
MIT 许可协议 (MIT)。请参阅 许可文件 了解更多信息。