linuskohl / org-football-data-api
Installs: 29
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 1
Open Issues: 0
pkg:composer/linuskohl/org-football-data-api
Requires
- guzzlehttp/guzzle: ^6.2
- netresearch/jsonmapper: ~1.1.1
This package is not auto-updated.
Last update: 2025-10-26 07:58:02 UTC
README
Unofficial Football-Data.org PHP API client
Documentation available here and here.
Able to serialize responses to custom models via JSON mapper.
Requirements
- "guzzlehttp/guzzle": "^6.2"
- "netresearch/jsonmapper": "~1.1.1"
Install
Via Composer
$ composer require linuskohl/org-football-data-api dev-master
License
The MIT License (MIT). Please see License File for more information.
Documentation
Class: \linuskohl\orgFootballDataApi\Client
| 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 |
Additional Documentation
League Codes
| 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 |
Undocumented
| League-Code | Country | League |
|---|---|---|
| ENL | England | English National League |
| EL2 | England | League Two |
| BSA | Brazil | Campeonato Brasileiro da Serie A |