Recommend this page to a friend! |
Live Score Client for api-football.com
Welcome to Api-Football! You can use our API to access all API endpoints, which can get information about Football Leagues & Cups.
To install this package tou can use composer:
composer require slvler/livescore-service
php artisan vendor:publish --tag=livescore
'livescore' => [
'base_url' => 'v3.football.api-sports.io',
'api_key' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
],
use slvler\LiveScoreService\LiveScoreClient;
$client = new LiveScoreClient();
Get the list status
$data = $client->general()->getStatus();
Get the list of available countries for the leagues endpoint.
$data = $client->countries()->getAll();
The name and code fields can be used in other endpoints as filters.
$data = $client->countries()->getAll(['code' => 'FR']);
Get the list of available leagues and cups. This endpoint also returns the coverage of each competition, which makes it possible to know what is available for that league or cup.
$variable = $client->leagues()->getLeagues(['season' => '2018', 'id' => '33']);
All seasons are only 4-digit keys, so for a league whose season is 2018-2019 like the English Premier League (EPL), the 2018-2019 season in the API will be 2018.
$variable = $client->leagues()->getLeaguesSeasons();
Get the list of available teams. The team id are unique in the API and teams keep it among all the leagues/cups in which they participate.
$variable = $client->team()->getTeamsInformation(['name' => 'manchester united']);
The team id are unique in the API and teams keep it among all the leagues/cups in which they participate.
$variable = $client->team()->getTeamsStatistics(['league' => '39', 'team' => '33', 'season' => '2019']);
Get the list of seasons available for a team.
$variable = $client->team()->getTeamsSeasons(['team' => '33']);
Get the list of countries available for the teams endpoint.
$variable = $client->team()->getTeamCountries();
Get the list of available venues. The venue id are unique in the API.
$variable = $client->venues()->getVenues(['name' => 'Old Trafford']);
Get the standings for a league or a team. Return a table of one or more rankings according to the league / cup.
$variable = $client->standings()->getStandings([ 'league' => '39', 'season' => '2019']);
Get the rounds for a league or a cup. The round can be used in endpoint fixtures as filters
$variable = $client->fixtures()->getRounds(['league' => '39', 'season' => 2019]);
For all requests to fixtures you can add the query parameter timezone to your request in order to retrieve the list of matches in the time zone of your choice like ?Europe/London?
$variable = $client->fixtures()->getFixtures(['id' => '215662']);
Get heads to heads between two teams.
$variable = $client->fixtures()->getHeadToHead(['h2h' => '33-34']);
Get the statistics for one fixture.
$variable = $client->fixtures()->getStatistics(['fixture' => '215662']);
Get the events from a fixture.
$variable = $client->fixtures()->getEvents(['fixture' => '215662']);
Get the lineups for a fixture. Lineups are available between 20 and 40 minutes before the fixture when the competition covers this feature. You can check this with the endpoint leagues and the coverage field.
$variable = $client->fixtures()->getLineups(['fixture' => '592872']);
Get the players statistics from one fixture.
$variable = $client->fixtures()->getPlayersStatistics(['fixture' => '169080']);
Get the list of players not participating in the fixtures for various reasons such as suspended, injured for example
$variable = $client->injuries()->getInjuries(['league' => '2', 'season' => '2020']);
Get predictions about a fixture. The predictions are made using several algorithms including the poisson distribution, comparison of team statistics, last matches, players etc?
$variable = $client->predictions()->getPredictions(['fixture' => '198772']);
Get all the information about the coachs and their careers.
$variable = $client->coachs()->getCoachs(['id' => '1']);
Get all available seasons for players statistics.
$variable = $client->players()->getSeasons(['player' => '276']);
Get players statistics.
$variable = $client->players()->getPlayers(['id' => '19088', 'season' => '2018']);
Return the current squad of a team when the team parameter is used. When the player parameter is used the endpoint returns the set of teams associated with the player.
$variable = $client->players()->getSquads(['team' => '33']);
Get the 20 best players for a league or cup.
$variable = $client->players()->getTopScorers(['season' => '2018', 'league' => '61']);
Get the 20 best players assists for a league or cup.
$variable = $client->players()->getTopAssists(['season' => '2020', 'league' => '61']);
Get the 20 players with the most yellow cards for a league or cup.
$variable = $client->players()->getTopYellowCards(['season' => '2020', 'league' => '61']);
Get the 20 players with the most red cards for a league or cup.
$variable = $client->players()->getTopRedCards(['season' => '2020', 'league' => '61']);
Get all available transfers for players and teams
$variable = $client->transfer()->getTransfer(['player' => '35845']);
Get all available trophies for a player or a coach.
$variable = $client->trophies()->getTrophies(['player' => '35845']);
Get all available sidelined for a player or a coach.
$variable = $client->sidelined()->getSidelined(['player' => '276']);
This endpoint returns in-play odds for fixtures in progress.
$variable = $client->odds()->getOddsLive();
Get all available bets for in-play odds.
$variable = $client->odds()->getOddsLivBets(['id' => "1"]);
Get odds from fixtures, leagues or date.
$variable = $client->odds()->getOdds(['date' => "2020-05-15"]);
Get the list of available fixtures id for the endpoint odds.
$variable = $client->odds()->getOddsMapping();
Get all available bookmakers.
$variable = $client->odds()->getOddsBookmakers();
Get all available bets for pre-match odds.
$variable = $client->odds()->getOddsBets();
composer test
The MIT License (MIT). Please see License File for more information.
Classes of Hicri | > | Livescore PHP Service | > | Download .zip .tar.gz | > | Support forum | > | Blog | > | Latest changes |
|
Groups | Applications | Files |
Groups |
PHP 5 | Classes using PHP 5 specific features | View top rated classes |
Games | Sports and online games | View top rated classes |
Web services | Web data clipping, SOAP or XML-RPC clients and servers | View top rated classes |
Innovation Award |
March 2023 Nominee Vote |
Football (or soccer like what it is called in some countries) is a very popular sport worldwide. Where there are championship games, many people want to know everything about the games, teams, players, scores, etc... api-football.com provides an API that can return all that kind of information. This package provides a PHP client to retrieve that football game's data from that API. Manuel Lemos |
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.
Files |
File | Role | Description | ||
---|---|---|---|---|
.github (1 directory) | ||||
config (1 file) | ||||
src (2 files, 5 directories) | ||||
tests (1 file) | ||||
composer.json | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
phpunit.xml.dist | Data | Auxiliary data | ||
README.md | Doc. | Documentation |
Files | / | src |
File | Role | Description | ||
---|---|---|---|---|
Api (17 files) | ||||
Exceptions (1 file) | ||||
Facedes (1 file) | ||||
Log (3 files) | ||||
Message (1 file) | ||||
LiveScoreClient.php | Class | Class source | ||
LiveScoreServiceProvider.php | Class | Class source |
Files | / | src | / | Api |
File | Role | Description |
---|---|---|
Api.php | Class | Class source |
Coachs.php | Class | Class source |
Countries.php | Class | Class source |
Fixtures.php | Class | Class source |
General.php | Class | Class source |
Injuries.php | Class | Class source |
Leagues.php | Class | Class source |
Odds.php | Class | Class source |
Players.php | Class | Class source |
Predictions.php | Class | Class source |
Setting.php | Class | Class source |
Sidelined.php | Class | Class source |
Standings.php | Class | Class source |
Teams.php | Class | Class source |
Transfers.php | Class | Class source |
Trophies.php | Class | Class source |
Venues.php | Class | Class source |
Files | / | src | / | Log |
File | Role | Description |
---|---|---|
LiveScore.log | Data | Auxiliary data |
LiveSoccer.log | Data | Auxiliary data |
Record.php | Class | Class source |
Download all files: livescore-service.tar.gz livescore-service.zip NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.
|
Files |
File | Role | Description | ||
---|---|---|---|---|
.github (1 directory) | ||||
config (1 file) | ||||
src (2 files, 5 directories) | ||||
tests (1 file) | ||||
composer.json | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
phpunit.xml.dist | Data | Auxiliary data | ||
README.md | Doc. | Documentation |
Files | / | src |
File | Role | Description | ||
---|---|---|---|---|
Api (17 files) | ||||
Exceptions (1 file) | ||||
Facedes (1 file) | ||||
Log (3 files) | ||||
Message (1 file) | ||||
LiveScoreClient.php | Class | Class source | ||
LiveScoreServiceProvider.php | Class | Class source |
Files | / | src | / | Api |
File | Role | Description |
---|---|---|
Api.php | Class | Class source |
Coachs.php | Class | Class source |
Countries.php | Class | Class source |
Fixtures.php | Class | Class source |
General.php | Class | Class source |
Injuries.php | Class | Class source |
Leagues.php | Class | Class source |
Odds.php | Class | Class source |
Players.php | Class | Class source |
Predictions.php | Class | Class source |
Setting.php | Class | Class source |
Sidelined.php | Class | Class source |
Standings.php | Class | Class source |
Teams.php | Class | Class source |
Transfers.php | Class | Class source |
Trophies.php | Class | Class source |
Venues.php | Class | Class source |
Files | / | src | / | Log |
File | Role | Description |
---|---|---|
LiveScore.log | Data | Auxiliary data |
LiveSoccer.log | Data | Auxiliary data |
Record.php | Class | Class source |
Download all files: livescore-service.tar.gz livescore-service.zip NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.
|