func (r *MatchReference) GetChampion(client *datadragon.Client) (datadragon.ChampionDataExtended, error) {
	return client.GetChampionByID(strconv.Itoa(r.Champion))
}
GetChampion returns the champion played in this match
package lol
import (
	"sort"
	"strconv"
	"github.com/KnutZuidema/golio/datadragon"
	"github.com/KnutZuidema/golio/static"
)
type ChampionInfo struct {
	FreeChampionIDsForNewPlayers []int `json:"freeChampionIDsForNewPlayers"`
	FreeChampionIDs              []int `json:"freeChampionIDs"`
	MaxNewPlayerLevel            int   `json:"maxNewPlayerLevel"`
}
func (i *ChampionInfo) GetChampionsForNewPlayers(client *datadragon.Client) ([]datadragon.ChampionDataExtended, error) {
	res := make([]datadragon.ChampionDataExtended, 0, len(i.FreeChampionIDsForNewPlayers))
	for _, id := range i.FreeChampionIDsForNewPlayers {
		champion, err := client.GetChampionByID(strconv.Itoa(id))
		if err != nil {
			return nil, err
		}
		res = append(res, champion)
	}
	return res, nil
}
func (i *ChampionInfo) GetChampions(client *datadragon.Client) ([]datadragon.ChampionDataExtended, error) {
	res := make([]datadragon.ChampionDataExtended, 0, len(i.FreeChampionIDsForNewPlayers))
	for _, id := range i.FreeChampionIDs {
		champion, err := client.GetChampionByID(strconv.Itoa(id))
		if err != nil {
			return nil, err
		}
		res = append(res, champion)
	}
	return res, nil
}
type ChampionMastery struct {
	ChestGranted                 bool   `json:"chestGranted"`
	ChampionLevel                int    `json:"championLevel"`
	ChampionPoints               int    `json:"championPoints"`
	ChampionID                   int    `json:"championId"`
	ChampionPointsUntilNextLevel int    `json:"championPointsUntilNextLevel"`
	LastPlayTime                 int    `json:"lastPlayTime"`
	TokensEarned                 int    `json:"tokensEarned"`
	ChampionPointsSinceLastLevel int    `json:"championPointsSinceLastLevel"`
	SummonerID                   string `json:"summonerId"`
}
func (m *ChampionMastery) GetSummoner(client *Client) (*Summoner, error) {
	return client.Summoner.GetByID(m.SummonerID)
}
func (m *ChampionMastery) GetChampion(client *datadragon.Client) (datadragon.ChampionDataExtended, error) {
	return client.GetChampionByID(strconv.Itoa(m.ChampionID))
}
type LeagueList struct {
	LeagueID      string        `json:"leagueId"`
	Tier          string        `json:"tier"`
	Entries       []*LeagueItem `json:"entries"`
	Queue         string        `json:"queue"`
	Name          string        `json:"name"`
	sortedEntries []*LeagueItem
}
func (l *LeagueList) GetRank(i int) *LeagueItem {
	if l.sortedEntries == nil || len(l.sortedEntries) != len(l.Entries) {
		l.sortedEntries = make([]*LeagueItem, len(l.Entries))
		copy(l.sortedEntries, l.Entries)
		sort.Slice(l.sortedEntries, func(i, j int) bool {
			return l.sortedEntries[i].LeaguePoints > l.sortedEntries[j].LeaguePoints
		})
	}
	return l.sortedEntries[i]
}
type LeagueItem struct {
	QueueType    string      `json:"queueType"`
	SummonerName string      `json:"summonerName"`
	HotStreak    bool        `json:"hotStreak"`
	MiniSeries   *MiniSeries `json:"miniSeries"`
	Wins         int         `json:"wins"`
	Veteran      bool        `json:"veteran"`
	Losses       int         `json:"losses"`
	FreshBlood   bool        `json:"freshBlood"`
	Inactive     bool        `json:"inactive"`
	Tier         string      `json:"tier"`
	Rank         string      `json:"rank"`
	SummonerID   string      `json:"summonerId"`
	LeaguePoints int         `json:"leaguePoints"`
}
func (i *LeagueItem) GetSummoner(client *Client) (*Summoner, error) {
	return client.Summoner.GetByID(i.SummonerID)
}
type MiniSeries struct {
	Progress string `json:"progress"`
	Losses   int    `json:"losses"`
	Target   int    `json:"target"`
	Wins     int    `json:"wins"`
}
type Match struct {
	SeasonID int `json:"seasonId"`
	QueueID int `json:"queueId"`
	GameID  int `json:"gameId"`
	ParticipantIdentities []*ParticipantIdentity `json:"participantIdentities"`
	GameVersion string `json:"gameVersion"`
	PlatformID string `json:"platformId"`
	GameMode string `json:"gameMode"`
	MapID int `json:"mapId"`
	GameType string `json:"gameType"`
	Teams []*TeamStats `json:"teams"`
	Participants []*Participant `json:"participants"`
	GameDuration int `json:"gameDuration"`
	GameCreation int `json:"gameCreation"`
}
func (m *Match) GetSeason(client *static.Client) (static.Season, error) {
	return client.GetSeason(m.SeasonID)
}
func (m *Match) GetQueue(client *static.Client) (static.Queue, error) {
	return client.GetQueue(m.QueueID)
}
func (m *Match) GetMap(client *static.Client) (static.Map, error) {
	return client.GetMap(m.MapID)
}
func (m *Match) GetGameType(client *static.Client) (static.GameType, error) {
	return client.GetGameType(m.GameType)
}
func (m *Match) GetGameMode(client *static.Client) (static.GameMode, error) {
	return client.GetGameMode(m.GameMode)
}
type ParticipantIdentity struct {
	Player        *Player `json:"player"`
	ParticipantID int     `json:"participantId"`
}
type Player struct {
	CurrentPlatformID string `json:"currentPlatformId"`
	SummonerName      string `json:"summonerName"`
	MatchHistoryURI   string `json:"matchHistoryUri"`
	PlatformID string `json:"platformId"`
	CurrentAccountID string `json:"currentAccountId"`
	ProfileIcon      int    `json:"profileIcon"`
	SummonerID string `json:"summonerId"`
	AccountID string `json:"accountId"`
}
func (p *Player) GetSummoner(client *Client) (*Summoner, error) {
	return client.Summoner.GetByID(p.SummonerID)
}
func (p *Player) GetProfileIcon(client *datadragon.Client) (datadragon.ProfileIcon, error) {
	return client.GetProfileIcon(p.ProfileIcon)
}
type TeamStats struct {
	FirstDragon bool `json:"firstDragon"`
	FirstInhibitor bool `json:"firstInhibitor"`
	Bans []*TeamBan `json:"bans"`
	BaronKills int `json:"baronKills"`
	FirstRiftHerald bool `json:"firstRiftHerald"`
	FirstBaron bool `json:"firstBaron"`
	RiftHeraldKills int `json:"riftHeraldKills"`
	FirstBlood bool `json:"firstBlood"`
	TeamID int `json:"teamId"`
	FirstTower bool `json:"firstTower"`
	VilemawKills int `json:"vilemawKills"`
	InhibitorKills int `json:"inhibitorKills"`
	TowerKills int `json:"towerKills"`
	DominionVictoryScore int `json:"dominionVictoryScore"`
	Win string `json:"win"`
	DragonKills int `json:"dragonKills"`
}
type TeamBan struct {
	PickTurn int `json:"pickTurn"`
	ChampionID int `json:"championId"`
}
func (b *TeamBan) GetChampion(client *datadragon.Client) (datadragon.ChampionDataExtended, error) {
	return client.GetChampionByID(strconv.Itoa(b.ChampionID))
}
type Participant struct {
	Stats         *ParticipantStats `json:"stats"`
	ParticipantID int               `json:"participantId"`
	Runes []*Rune `json:"runes"`
	Timeline *ParticipantTimeline `json:"timeline"`
	TeamID int `json:"teamId"`
	Spell2ID int `json:"spell2Id"`
	Masteries []*LegacyMastery `json:"masteries"`
	HighestAchievedSeasonTier string `json:"highestAchievedSeasonTier"`
	Spell1ID   int `json:"spell1Id"`
	ChampionID int `json:"championId"`
}
func (p *Participant) GetChampion(client *datadragon.Client) (datadragon.ChampionDataExtended, error) {
	return client.GetChampionByID(strconv.Itoa(p.ChampionID))
}
func (p *Participant) GetSpell1(client *datadragon.Client) (datadragon.SummonerSpell, error) {
	return client.GetSummonerSpell(strconv.Itoa(p.Spell1ID))
}
func (p *Participant) GetSpell2(client *datadragon.Client) (datadragon.SummonerSpell, error) {
	return client.GetSummonerSpell(strconv.Itoa(p.Spell2ID))
}
type ParticipantStats struct {
	FirstBloodAssist                bool `json:"firstBloodAssist"`
	VisionScore                     int  `json:"visionScore"`
	MagicDamageDealtToChampions     int  `json:"magicDamageDealtToChampions"`
	DamageDealtToObjectives         int  `json:"damageDealtToObjectives"`
	TotalTimeCrowdControlDealt      int  `json:"totalTimeCrowdControlDealt"`
	IntestTimeSpentLiving           int  `json:"intestTimeSpentLiving"`
	TotalScoreRank                  int  `json:"totalScoreRank"`
	NeutralMinionsKilled            int  `json:"neutralMinionsKilled"`
	DamageDealtToTurrets            int  `json:"damageDealtToTurrets"`
	PhysicalDamageDealtToChampions  int  `json:"physicalDamageDealtToChampions"`
	NodeCapture                     int  `json:"nodeCapture"`
	LargestMultiKill                int  `json:"largestMultiKill"`
	TotalUnitsHealed                int  `json:"totalUnitsHealed"`
	WardsKilled                     int  `json:"wardsKilled"`
	LargestCriticalStrike           int  `json:"largestCriticalStrike"`
	LargestKillingSpree             int  `json:"largestKillingSpree"`
	NodeNeutralizeAssist            int  `json:"nodeNeutralizeAssist"`
	TeamObjective                   int  `json:"teamObjective"`
	MagicDamageDealt                int  `json:"magicDamageDealt"`
	NeutralMinionsKilledTeamJungle  int  `json:"neutralMinionsKilledTeamJungle"`
	DamageSelfMitigated             int  `json:"damageSelfMitigated"`
	MagicalDamageTaken              int  `json:"magicalDamageTaken"`
	FirstInhibitorKill              bool `json:"firstInhibitorKill"`
	TrueDamageTaken                 int  `json:"trueDamageTaken"`
	NodeNeutralize                  int  `json:"nodeNeutralize"`
	CombatPlayerScore               int  `json:"combatPlayerScore"`
	GoldSpent                       int  `json:"goldSpent"`
	TrueDamageDealt                 int  `json:"trueDamageDealt"`
	ParticipantID                   int  `json:"participantId"`
	TotalDamageTaken                int  `json:"totalDamageTaken"`
	PhysicalDamageDealt             int  `json:"physicalDamageDealt"`
	SightWardsBoughtInGame          int  `json:"sightWardsBoughtInGame"`
	TotalDamageDealtToChampions     int  `json:"totalDamageDealtToChampions"`
	PhysicalDamageTaken             int  `json:"physicalDamageTaken"`
	TotalPlayerScore                int  `json:"totalPlayerScore"`
	Win                             bool `json:"win"`
	ObjectivePlayerScore            int  `json:"objectivePlayerScore"`
	TotalDamageDealt                int  `json:"totalDamageDealt"`
	NeutralMinionsKilledEnemyJungle int  `json:"neutralMinionsKilledEnemyJungle"`
	WardsPlaced                     int  `json:"wardsPlaced"`
	TurretKills                     int  `json:"turretKills"`
	FirstBloodKill                  bool `json:"firstBloodKill"`
	TrueDamageDealtToChampions      int  `json:"trueDamageDealtToChampions"`
	GoldEarned                      int  `json:"goldEarned"`
	KillingSprees                   int  `json:"killingSprees"`
	UnrealKills                     int  `json:"unrealKills"`
	AltarsCaptured                  int  `json:"altarsCaptured"`
	FirstTowerAssist                bool `json:"firstTowerAssist"`
	FirstTowerKill                  bool `json:"firstTowerKill"`
	ChampLevel                      int  `json:"champLevel"`
	NodeCaptureAssist               int  `json:"nodeCaptureAssist"`
	InhibitorKills                  int  `json:"inhibitorKills"`
	FirstInhibitorAssist            bool `json:"firstInhibitorAssist"`
	VisionWardsBoughtInGame         int  `json:"visionWardsBoughtInGame"`
	AltarsNeutralized               int  `json:"altarsNeutralized"`
	TotalHeal                       int  `json:"totalHeal"`
	TotalMinionsKilled              int  `json:"totalMinionsKilled"`
	TimeCCingOthers                 int  `json:"timeCCingOthers"`
	PerkPrimaryStyle int `json:"perkPrimaryStyle"`
	PerkSubStyle int `json:"perkSubStyle"`
	Perk0     int `json:"perk0"`
	Perk0Var1 int `json:"perk0Var1"`
	Perk0Var2 int `json:"perk0Var2"`
	Perk0Var3 int `json:"perk0Var3"`
	Perk1     int `json:"perk1"`
	Perk1Var1 int `json:"perk1Var1"`
	Perk1Var2 int `json:"perk1Var2"`
	Perk1Var3 int `json:"perk1Var3"`
	Perk2     int `json:"perk2"`
	Perk2Var1 int `json:"perk2Var1"`
	Perk2Var2 int `json:"perk2Var2"`
	Perk2Var3 int `json:"perk2Var3"`
	Perk3     int `json:"perk3"`
	Perk3Var1 int `json:"perk3Var1"`
	Perk3Var2 int `json:"perk3Var2"`
	Perk3Var3 int `json:"perk3Var3"`
	Perk4     int `json:"perk4"`
	Perk4Var1 int `json:"perk4Var1"`
	Perk4Var2 int `json:"perk4Var2"`
	Perk4Var3 int `json:"perk4Var3"`
	Perk5     int `json:"perk5"`
	Perk5Var1 int `json:"perk5Var1"`
	Perk5Var2 int `json:"perk5Var2"`
	Perk5Var3 int `json:"perk5Var3"`
	PlayerScore0 int `json:"playerScore0"`
	PlayerScore1 int `json:"playerScore1"`
	PlayerScore2 int `json:"playerScore2"`
	PlayerScore3 int `json:"playerScore3"`
	PlayerScore4 int `json:"playerScore4"`
	PlayerScore5 int `json:"playerScore5"`
	PlayerScore6 int `json:"playerScore6"`
	PlayerScore7 int `json:"playerScore7"`
	PlayerScore8 int `json:"playerScore8"`
	PlayerScore9 int `json:"playerScore9"`
	Item0 int `json:"item0"`
	Item1 int `json:"item1"`
	Item2 int `json:"item2"`
	Item3 int `json:"item3"`
	Item4 int `json:"item4"`
	Item5 int `json:"item5"`
	Item6 int `json:"item6"`
	Deaths      int `json:"deaths"`
	Assists     int `json:"assists"`
	Kills       int `json:"kills"`
	DoubleKills int `json:"doubleKills"`
	TripleKills int `json:"tripleKills"`
	QuadraKills int `json:"quadraKills"`
	PentaKills  int `json:"pentaKills"`
}
func (s *ParticipantStats) GetItem0(client *datadragon.Client) (datadragon.Item, error) {
	return client.GetItem(strconv.Itoa(s.Item0))
}
func (s *ParticipantStats) GetItem1(client *datadragon.Client) (datadragon.Item, error) {
	return client.GetItem(strconv.Itoa(s.Item1))
}
func (s *ParticipantStats) GetItem2(client *datadragon.Client) (datadragon.Item, error) {
	return client.GetItem(strconv.Itoa(s.Item2))
}
func (s *ParticipantStats) GetItem3(client *datadragon.Client) (datadragon.Item, error) {
	return client.GetItem(strconv.Itoa(s.Item3))
}
func (s *ParticipantStats) GetItem4(client *datadragon.Client) (datadragon.Item, error) {
	return client.GetItem(strconv.Itoa(s.Item4))
}
func (s *ParticipantStats) GetItem5(client *datadragon.Client) (datadragon.Item, error) {
	return client.GetItem(strconv.Itoa(s.Item5))
}
func (s *ParticipantStats) GetItem6(client *datadragon.Client) (datadragon.Item, error) {
	return client.GetItem(strconv.Itoa(s.Item6))
}
type Rune struct {
	RuneID int `json:"runeId"`
	Rank   int `json:"rank"`
}
type ParticipantTimeline struct {
	Lane          string `json:"lane"`
	ParticipantID int    `json:"participantId"`
	CsDiffPerMinDeltas map[string]float64 `json:"csDiffPerMinDeltas"`
	GoldPerMinDeltas map[string]float64 `json:"goldPerMinDeltas"`
	XpDiffPerMinDeltas map[string]float64 `json:"xpDiffPerMinDeltas"`
	CreepsPerMinDeltas map[string]float64 `json:"creepsPerMinDeltas"`
	XpPerMinDeltas map[string]float64 `json:"xpPerMinDeltas"`
	Role string `json:"role"`
	DamageTakenDiffPerMinDeltas map[string]float64 `json:"damageTakenDiffPerMinDeltas"`
	DamageTakenPerMinDeltas map[string]float64 `json:"damageTakenPerMinDeltas"`
}
type LegacyMastery struct {
	MasteryID int `json:"masteryId"`
	Rank      int `json:"rank"`
}
type Matchlist struct {
	Matches    []*MatchReference `json:"matches"`
	TotalGames int               `json:"totalGames"`
	StartIndex int               `json:"startIndex"`
	EndIndex   int               `json:"endIndex"`
}
type MatchReference struct {
	Lane       string `json:"lane"`
	GameID     int    `json:"gameId"`
	Champion   int    `json:"champion"`
	PlatformID string `json:"platformId"`
	Season     int    `json:"season"`
	Queue      int    `json:"queue"`
	Role       string `json:"role"`
	Timestamp  int    `json:"timestamp"`
}