2016-06-12 22:39:00 +00:00
|
|
|
package footballdata
|
|
|
|
|
|
|
|
type SoccerSeasonRequest struct{ request }
|
|
|
|
|
|
|
|
// Executes the request.
|
|
|
|
func (r SoccerSeasonRequest) Do() (s SoccerSeason, err error) {
|
|
|
|
d, _, err := r.doJson("GET")
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
err = d.Decode(&s)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Prepares a request to fetch the complete list of soccer seasons.
|
|
|
|
func (c *Client) SoccerSeason(id uint64) SoccerSeasonRequest {
|
2016-06-13 17:47:09 +00:00
|
|
|
return SoccerSeasonRequest{c.req("soccerseasons/%d", id)}
|
2016-06-12 22:39:00 +00:00
|
|
|
}
|