diff --git a/api_types.go b/api_types.go index 431aa67..bdf5457 100644 --- a/api_types.go +++ b/api_types.go @@ -153,3 +153,23 @@ type Player struct { ContractUntil time.Time 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 +} diff --git a/req_competition_leaguetable.go b/req_competition_leaguetable.go index db9f046..80714c1 100644 --- a/req_competition_leaguetable.go +++ b/req_competition_leaguetable.go @@ -11,7 +11,7 @@ func (r CompetitionLeagueTableRequest) Matchday(matchday uint16) CompetitionLeag } // 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") if err != nil { return diff --git a/req_soccerseason_leaguetable.go b/req_soccerseason_leaguetable.go index 51c31e3..8ea058b 100644 --- a/req_soccerseason_leaguetable.go +++ b/req_soccerseason_leaguetable.go @@ -15,7 +15,7 @@ func (r SoccerSeasonLeagueTableRequest) Matchday(matchday uint16) SoccerSeasonLe // DEPRECATED. // // 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") if err != nil { return