Skip to content

Commit

Permalink
added function to fetch standing
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel committed Sep 19, 2018
1 parent 5187c09 commit 50c251c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion FootballData.php
Expand Up @@ -66,9 +66,18 @@ public function findMatchesByCompetitionAndMatchday($c, $m) {

return json_decode($response);
}

public function findStandingsByCompetition($id) {
$resource = 'competitions/' . $id . '/standings';
$response = file_get_contents($this->baseUri . $resource, false,
stream_context_create($this->reqPrefs));

return json_decode($response);
}


public function findHomeMatchesByTeam($teamId) {
$resource = 'teams/' . $teamId . '/matches/?venue=home';
$resource = 'teams/' . $teamId . '/matches/?venue=HOME';
//http://api.football-data.org/v2/teams/62/matches?venue=home

$response = file_get_contents($this->baseUri . $resource, false,
Expand Down Expand Up @@ -118,4 +127,6 @@ public function searchTeam($keyword) {

return json_decode($response);
}


}

0 comments on commit 50c251c

Please sign in to comment.