Fix return value of LeagueTable methods.

develop
Icedream 2016-07-09 21:26:07 +02:00
parent fca8f38221
commit 0c3d78739e
Signed by: icedream
GPG Key ID: 1573F6D8EFE4D0CF
3 changed files with 22 additions and 2 deletions

View File

@ -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
}

View File

@ -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

View File

@ -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