PHP code example of rastor / expected-goals-client
1. Go to this page and download the library: Download rastor/expected-goals-client library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rastor / expected-goals-client example snippets
use ExpectedGoalsClient\ExpectedGoalsClient;
$client = new ExpectedGoalsClient('Your API Key');
$countries = $client->getCountries(); // list of countries
$leagues = $client->getTournaments($countryId); // list of tournaments for specified country
$seasons = $client->getSeasons($leagueId); // list of seasons for specified tournament
$fixtures = $client->getFixtures($seasonId); // list of fixtures for specified season
$fixture = $client->getFixture($fixtureId); // get one fixture