Fix return value of LeagueTable methods.
parent
fca8f38221
commit
0c3d78739e
20
api_types.go
20
api_types.go
|
@ -153,3 +153,23 @@ type Player struct {
|
||||||
ContractUntil time.Time
|
ContractUntil time.Time
|
||||||
MarketValue string
|
MarketValue string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Contains the league table for a season.
|
||||||
|
type LeagueTable struct {
|
||||||
|
LeagueCaption string
|
||||||
|
Matchday uint16
|
||||||
|
Standing []TeamLeagueStatistics
|
||||||
|
}
|
||||||
|
|
||||||
|
// Contains statistical information about a team's performance in a league.
|
||||||
|
type TeamLeagueStatistics struct {
|
||||||
|
Rank uint8
|
||||||
|
Team string
|
||||||
|
TeamId uint64
|
||||||
|
PlayedGames uint16
|
||||||
|
CrestURI string
|
||||||
|
Points uint16
|
||||||
|
Goals uint16
|
||||||
|
GoalsAgainst uint16
|
||||||
|
GoalDifference uint8
|
||||||
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ func (r CompetitionLeagueTableRequest) Matchday(matchday uint16) CompetitionLeag
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do executes the request.
|
// Do executes the request.
|
||||||
func (r CompetitionLeagueTableRequest) Do() (s Competition, err error) {
|
func (r CompetitionLeagueTableRequest) Do() (s LeagueTable, err error) {
|
||||||
d, _, err := r.doJson("GET")
|
d, _, err := r.doJson("GET")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
|
|
@ -15,7 +15,7 @@ func (r SoccerSeasonLeagueTableRequest) Matchday(matchday uint16) SoccerSeasonLe
|
||||||
// DEPRECATED.
|
// DEPRECATED.
|
||||||
//
|
//
|
||||||
// Do executes the request.
|
// Do executes the request.
|
||||||
func (r SoccerSeasonLeagueTableRequest) Do() (s SoccerSeason, err error) {
|
func (r SoccerSeasonLeagueTableRequest) Do() (s LeagueTable, err error) {
|
||||||
d, _, err := r.doJson("GET")
|
d, _, err := r.doJson("GET")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue