Skip to content

Commit

Permalink
add endpoint to get event for sports
Browse files Browse the repository at this point in the history
  • Loading branch information
SethSharp committed Jul 28, 2024
1 parent fb422a1 commit 3c032e7
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/OddsClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ public function getSports(): Response
return $this->get('/sports');
}

/**
* @param SportsEnum $sport
* @return Response
*/
public function getOddsForSport(SportsEnum $sport): Response
{
return $this->get("/sports/$sport->value/odds");
}

/**
* @param SportsEnum $sport
* @return Response
Expand All @@ -81,9 +90,9 @@ public function getScoresForSport(SportsEnum $sport): Response
* @param SportsEnum $sport
* @return Response
*/
public function getOddsForSport(SportsEnum $sport): Response
public function getEventsForSport(SportsEnum $sport): Response
{
return $this->get("/sports/$sport->value/odds");
return $this->get("/sports/{$sport->name}/events");
}

/**
Expand Down

0 comments on commit 3c032e7

Please sign in to comment.