naymin / football-data
football-data.org API 版本 2 容器 For Laravel
dev-master
2018-08-14 09:59 UTC
Requires
- guzzlehttp/guzzle: ^6.3
This package is auto-updated.
Last update: 2024-09-20 16:09:42 UTC
README
football-data.org API 版本 2 容器 For Laravel
要求
- "guzzlehttp/guzzle": "~6.0"
安装
通过 Composer
$ composer require grambas/football-data dev-master
使用
更多关于过滤器、结构和 API 的信息: football-data.org 文档
将您的 API 密钥添加到 env 文件
FootballData_API_KEY=
添加到 config/app.php
'providers' => [
Grambas\FootballData\FootballDataServiceProvider::class,
]
'aliases' => [
'Football' => Grambas\FootballData\Facades\FootballDataFacade::class,
]
示例
//COMPETITION Football::LeagueTable($id) //Show League Table / current standing Football::LeagueTable($id,$matchday) //Show League Table / current standing with filters Football::getLeagues(); //List all available competitions. Football::getLeagues($year); //List all available competitions with filter Football::getLeagueTeams($id) //List all teams for a certain competition. //FIXTURES Football::getCompetitionFixtures($id) //List all fixtures for a certain competition. Football::getCompetitionFixtures($id,$matchday,$timeFrame) //List all fixtures for a certain competition with filters. Football::getFixture($id) //Show one fixture. Football::getFixture($id, $head2head) //Show one fixture. Variable head2head ist number of games to analyse Football::getFixturesOfSet() //List fixtures across a set of competitions Football::getFixturesOfSet($leagueCode, $timeFrame) //List fixtures across a set of competitions with filters Football::getTeamFixtures($id) // Show all fixtures for a certain team. Football::getTeamFixtures($id, $season, $timeFrame, $venue) // Show all fixtures for a certain team with filters. Example:Football::getTeamFixtures(66, "2015","n99","home") //TEAM Football::getTeam($id) //Show one team. //PLAYERS Football::getTeamPlayers($id) //Show all players for a certain team.
许可证
MIT 许可证 (MIT)。更多信息请参阅 许可证文件。