20/04
2017
Wallogit.com
2017 © Pedro Peláez
Unofficial Football-Data.org PHP API client
Documentation available here and here.
Able to serialize responses to custom models via JSON mapper.
, (*1)
, (*2)
Via Composer, (*3)
bash
$ composer require linuskohl/org-football-data-api dev-master, (*4)
The MIT License (MIT). Please see License File for more information., (*5)
| Visibility | Function |
|---|---|
| public |
__construct(string $auth_token=null) : void Constructor |
| public | getCompetitions(integer $season=null, bool/boolean $cached=true) : \linuskohl\orgFootballDataApi\models\Competition[]/null |
| public | getCompetitionsRaw(integer $season=null, bool/boolean $cached=true) : mixed |
| public |
getFixture(integer $fixture_id, integer $head2head=10, bool/boolean $cached=true) : \linuskohl\orgFootballDataApi\models\Fixture Get fixture by id |
| public |
getFixtureRaw(integer $fixture_id, integer $head2head=10, bool/boolean $cached=true) : mixed Get fixture by id |
| public |
getFixtures(string $time_frame=null, string[] $leagues=null, bool/boolean $cached=true) : \linuskohl\orgFootballDataApi\models\Fixture[] Get fixtures |
| public | getFixturesByCompetition(mixed $competition_id, string $time_frame=null, integer $matchday=null, bool/boolean $cached=true) : \linuskohl\orgFootballDataApi\models\Fixture[] |
| public | getFixturesByCompetitionRaw(mixed $competition_id, string $time_frame=null, integer $matchday=null, bool/boolean $cached=true) : mixed |
| public | getFixturesByTeam(mixed $team_id, integer $season=null, string $time_frame=null, string $venue=null, bool/boolean $cached=true) : \linuskohl\orgFootballDataApi\models\Fixture[] |
| public | getFixturesByTeamRaw(mixed $team_id, integer $season=null, string $time_frame=null, string $venue=null, bool/boolean $cached=true) : mixed |
| public |
getFixturesRaw(string $time_frame=null, string[] $leagues=null, bool/boolean $cached=true) : mixed Get fixtures |
| public | getLeagueTable(integer $competition_id, \linuskohl\orgFootballDataApi\unknown $matchday=null) : mixed |
| public |
getPlayer(integer $team_id, bool/boolean $cached=true) : \linuskohl\orgFootballDataApi\models\Player[] Get list of all players of a team |
| public |
getPlayerRaw(integer $team_id, bool/boolean $cached=true) : mixed Get list of all players of a team |
| public |
getTeam(integer $team_id, bool/boolean $cached=true) : \linuskohl\orgFootballDataApi\models\Team Get team object |
| public |
getTeamRaw(integer $team_id, bool/boolean $cached=true) : mixed Get team object |
| public | getTeamsByCompetition(integer $competition_id, bool/boolean $cached=true) : \linuskohl\orgFootballDataApi\models\Team[] |
| public | getTeamsByCompetitionRaw(integer $competition_id, bool/boolean $cached=true) : mixed |
| public | setCache(mixed $cache) : void |
| protected static |
generateCacheKey(string $url, mixed $parameters) : string Generate a key to cache the query |
| protected |
get(string $url, array/mixed[] $parameters=array(), bool/boolean $cached=true) : string Get data from API or cache |
| protected |
sendRequest(string $url, mixed[] $parameters) : string Send request to API |
| League-Code | Country | League |
|---|---|---|
| BL1 | Germany | 1. Bundesliga |
| BL2 | Germany | 2. Bundesliga |
| BL3 | Germany | 3. Bundesliga |
| DFB | Germany | Dfb-Cup |
| PL | England | Premiere League |
| EL1 | England | League One |
| ELC | England | Championship |
| FAC | England | FA-Cup |
| SA | Italy | Serie A |
| SB | Italy | Serie B |
| PD | Spain | Primera Division |
| SD | Spain | Segunda Division |
| CDR | Spain | Copa del Rey |
| FL1 | France | Ligue 1 |
| FL2 | France | Ligue 2 |
| DED | Netherlands | Eredivisie |
| PPL | Portugal | Primeira Liga |
| GSL | Greece | Super League |
| CL | Europe | Champions-League |
| EL | Europe | UEFA-Cup |
| EC | Europe | European-Cup of Nations |
| WC | World | World-Cup |
| League-Code | Country | League |
|---|---|---|
| ENL | England | English National League |
| EL2 | England | League Two |
| BSA | Brazil | Campeonato Brasileiro da Serie A |