2016-06-12 22:39:00 +00:00
|
|
|
package footballdata
|
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
|
|
|
|
type SoccerSeasonLeagueTableRequest struct{ request }
|
|
|
|
|
2016-07-09 18:59:24 +00:00
|
|
|
// DEPRECATED.
|
|
|
|
//
|
2016-06-25 21:22:52 +00:00
|
|
|
// Matchday modifies the request to specify a match day.
|
2016-06-12 22:39:00 +00:00
|
|
|
func (r SoccerSeasonLeagueTableRequest) Matchday(matchday uint16) SoccerSeasonLeagueTableRequest {
|
2016-06-25 10:15:58 +00:00
|
|
|
r.urlValues.Set("matchday", fmt.Sprintf("%d", matchday))
|
2016-06-12 22:39:00 +00:00
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
2016-07-09 18:59:24 +00:00
|
|
|
// DEPRECATED.
|
|
|
|
//
|
2016-06-25 21:22:52 +00:00
|
|
|
// Do executes the request.
|
2016-07-09 19:26:07 +00:00
|
|
|
func (r SoccerSeasonLeagueTableRequest) Do() (s LeagueTable, err error) {
|
2016-06-12 22:39:00 +00:00
|
|
|
d, _, err := r.doJson("GET")
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
err = d.Decode(&s)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2016-07-09 18:59:24 +00:00
|
|
|
// DEPRECATED.
|
|
|
|
//
|
2016-06-26 10:24:59 +00:00
|
|
|
// LeagueTableOfSoccerSeason prepares a new request to fetch the league table of a given soccer season.
|
2016-06-26 10:57:14 +00:00
|
|
|
func (c *Client) LeagueTableOfSoccerSeason(soccerSeasonId uint64) SoccerSeasonLeagueTableRequest {
|
2016-06-13 17:47:09 +00:00
|
|
|
return SoccerSeasonLeagueTableRequest{c.req("soccerseasons/%d/leagueTable", soccerSeasonId)}
|
2016-06-12 22:39:00 +00:00
|
|
|
}
|