2016-06-12 22:39:00 +00:00
|
|
|
package footballdata
|
|
|
|
|
|
|
|
type SoccerSeasonTeamsRequest struct{ request }
|
|
|
|
|
|
|
|
// Executes the request.
|
|
|
|
func (r SoccerSeasonTeamsRequest) Do() (s TeamList, err error) {
|
|
|
|
d, _, err := r.doJson("GET")
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
err = d.Decode(&s)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Prepares a new request to fetch the league table of a given soccer season.
|
|
|
|
func (c *Client) TeamsOfSoccerSeason(soccerSeasonId uint64) SoccerSeasonTeamsRequest {
|
2016-06-13 17:47:09 +00:00
|
|
|
return SoccerSeasonTeamsRequest{c.req("soccerseasons/%d/leagueTable", soccerSeasonId)}
|
2016-06-12 22:39:00 +00:00
|
|
|
}
|