apiclient

package
Version: v0.0.0-...-b28e40e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2019 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package apiclient accesses the official Riot API.

Construct a client with the New() function, and call the various client methods to retrieve data from the API.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadRequest           = errors.New("bad request")
	ErrUnauthorized         = errors.New("unauthorized")
	ErrForbidden            = errors.New("forbidden")
	ErrDataNotFound         = errors.New("data not found")
	ErrMethodNotAllowed     = errors.New("method not allowed")
	ErrUnsupportedMediaType = errors.New("unsupported media type")
	ErrRateLimitExceeded    = errors.New("rate limit exceeded")
	ErrInternalServerError  = errors.New("internal server error")
	ErrBadGateway           = errors.New("bad gateway")
	ErrServiceUnavailable   = errors.New("service unavailable")
	ErrGatewayTimeout       = errors.New("gateway timeout")

	ErrBadHTTPStatus = errors.New("bad HTTP status returned by server")
)

Functions

This section is empty.

Types

type BannedChampion

type BannedChampion struct {
	PickTurn   int   `json:"pickTurn"`   // The turn during which the champion was banned
	ChampionID int64 `json:"championID"` // The ID of the banned champion
	TeamID     int64 `json:"teamID"`     // The ID of the team that banned the champion
}

type Champion

type Champion struct {
	RankedPlayEnabled bool  `json:"rankedPlayEnabled",datastore:",noindex"` // Ranked play enabled flag.
	BotEnabled        bool  `json:"botEnabled",datastore:",noindex"`        // Bot enabled flag (for custom games).
	BotMmEnabled      bool  `json:"botMmEnabled",datastore:",noindex"`      // Bot Match Made enabled flag (for Co-op vs. AI games).
	Active            bool  `json:"active",datastore:",noindex"`            // Indicates if the champion is active.
	FreeToPlay        bool  `json:"freeToPlay",datastore:",noindex"`        // Indicates if the champion is free to play. Free to play champions are rotated periodically.
	ID                int64 `json:"id",datastore:",noindex"`                // Champion ID. For static information correlating to champion IDs, please refer to the LoL Static Data API.
}

type ChampionList

type ChampionList struct {
	// contains filtered or unexported fields
}

type ChampionMastery

type ChampionMastery struct {
	ChestGranted                 bool              `json:"chestGranted",datastore:",noindex"`                 // Is chest granted for this champion or not in current season.
	ChampionLevel                int               `json:"championLevel",datastore:",noindex"`                // Champion level for specified player and champion combination.
	ChampionPoints               int               `json:"championPoints",datastore:",noindex"`               // Total number of champion points for this player and champion combination - they are used to determine championLevel.
	ChampionID                   champion.Champion `json:"championID",datastore:",noindex"`                   // Champion ID for this entry.
	PlayerID                     string            `json:"playerID",datastore:",noindex"`                     // Encrypted Player ID for this entry.
	ChampionPointsUntilNextLevel int64             `json:"championPointsUntilNextLevel",datastore:",noindex"` // Number of points needed to achieve next level. Zero if player reached maximum champion level for this champion.
	ChampionPointsSinceLastLevel int64             `json:"championPointsSinceLastLevel",datastore:",noindex"` // Number of points earned since current level has been achieved. Zero if player reached maximum champion level for this champion.
	LastPlayTime                 int64             `json:"lastPlayTime",datastore:",noindex"`                 // Last time this champion was played by this player - in Unix milliseconds time format.
}

type Client

type Client interface {

	// GetAllChampionMasteries returns all champion mastery entries sorted by
	// number of champion points descending.
	GetAllChampionMasteries(ctx context.Context, r region.Region, summonerID string) ([]ChampionMastery, error)

	// GetChampionMastery returns champion mastery by summoner ID and champion.
	GetChampionMastery(ctx context.Context, r region.Region, summonerID string, champ champion.Champion) (*ChampionMastery, error)

	// GetChampionMasteryScore returns a player's total champion mastery score,
	// which is the sum of individual champion mastery levels.
	GetChampionMasteryScore(ctx context.Context, r region.Region, summonerID string) (int, error)

	// GetChampions returns all champions.
	GetChampions(ctx context.Context, r region.Region) (*ChampionList, error)

	// GetChampionByID returns champion information for a specific champion.
	GetChampionByID(ctx context.Context, r region.Region, champ champion.Champion) (*Champion, error)

	// GetChallengerLeague returns the challenger league for the given queue.
	GetChallengerLeague(context.Context, region.Region, queue.Queue) (*LeagueList, error)

	// GetGrandmasterLeague returns the grandmaster league for the given queue.
	GetGrandmasterLeague(ctx context.Context, r region.Region, q queue.Queue) (*LeagueList, error)

	// GetMasterLeague returns the master league for the given queue.
	GetMasterLeague(context.Context, region.Region, queue.Queue) (*LeagueList, error)

	// GetAllLeaguePositionsForSummoner returns league positions in all queues
	// for the given summoner ID.
	GetAllLeaguePositionsForSummoner(ctx context.Context, r region.Region, summonerID string) ([]LeaguePosition, error)

	// GetLeagueByID returns the league with given ID, including inactive
	// entries.
	GetLeagueByID(ctx context.Context, r region.Region, leagueID string) (*LeagueList, error)

	// ----- League Exp API -----
	GetLeagueExpEntries(ctx context.Context, r region.Region, q queue.Queue, tier string, division string, page int) ([]LeagueEntry, error)

	// GetMatch returns a match by match ID.
	GetMatch(ctx context.Context, r region.Region, matchID int64) (*Match, error)

	GetMatchTimeline(ctx context.Context, r region.Region, matchID int64) (*MatchTimeline, error)

	// GetMatchlist returns a matchlist for games played on a given account ID
	// and filtered using given filter parameters, if any.
	GetMatchlist(ctx context.Context, r region.Region, accountID string, opts *GetMatchlistOptions) (*Matchlist, error)

	// GetRecentMatchlist returns the last 20 matches played on the given account ID.
	GetRecentMatchlist(ctx context.Context, r region.Region, accountID string) (*Matchlist, error)

	// GetFeaturedGames returns a list of featured games.
	GetFeaturedGames(ctx context.Context, r region.Region) (*FeaturedGames, error)

	// GetCurrentGameInfoBySummoner returns current game information for a given
	// summoner ID.
	GetCurrentGameInfoBySummoner(ctx context.Context, r region.Region, summonerID string) (*CurrentGameInfo, error)

	// GetByAccountID returns a summoner by account ID.
	GetByAccountID(ctx context.Context, r region.Region, accountID string) (*Summoner, error)

	// GetBySummonerName returns a summoner by summoner name.
	GetBySummonerName(ctx context.Context, r region.Region, name string) (*Summoner, error)

	// GetBySummonerPUUID returns a summoner by PUUID.
	GetBySummonerPUUID(ctx context.Context, r region.Region, puuid string) (*Summoner, error)

	// GetBySummonerID returns a sumoner by summoner ID.
	GetBySummonerID(ctx context.Context, r region.Region, summonerID string) (*Summoner, error)

	// GetThirdPartyCodeByID returns a string set by the given summoner
	GetThirdPartyCodeByID(ctx context.Context, r region.Region, summonerID string) (string, error)
}

Client accesses the Riot API. Use New() to retrieve a valid instance.

func New

func New(key string, httpClient external.Doer, limiter ratelimit.Limiter) Client

New returns a Client configured for the given API client and underlying HTTP client. The returned Client is threadsafe.

type CurrentGameInfo

type CurrentGameInfo struct {
	GameID            int64                    `json:"gameID",datastore:",noindex"`            // The ID of the game
	GameStartTime     int64                    `json:"gameStartTime",datastore:",noindex"`     // The game start time represented in epoch milliseconds
	PlatformID        string                   `json:"platformID",datastore:",noindex"`        // The ID of the platform on which the game is being played
	GameMode          string                   `json:"gameMode",datastore:",noindex"`          // The game mode
	MapID             int64                    `json:"mapID",datastore:",noindex"`             // The ID of the map
	GameType          string                   `json:"gameType",datastore:",noindex"`          // The game type
	BannedChampions   []BannedChampion         `json:"bannedChampions",datastore:",noindex"`   // Banned champion information
	Observers         Observer                 `json:"observers",datastore:",noindex"`         // The observer information
	Participants      []CurrentGameParticipant `json:"participants",datastore:",noindex"`      // The participant information
	GameLength        int64                    `json:"gameLength",datastore:",noindex"`        // The amount of time in seconds that has passed since the game started
	GameQueueConfigID int64                    `json:"gameQueueConfigID",datastore:",noindex"` // The queue type (queue types are documented on the Game Constants page)
}

type CurrentGameParticipant

type CurrentGameParticipant struct {
	ProfileIconId int64                              `json:"profileIconId"` // The ID of the profile icon used by this participant
	ChampionId    int64                              `json:"championId"`    // The ID of the champion played by this participant
	SummonerName  string                             `json:"summonerName"`  // The summoner name of this participant
	Runes         []CurrentGameParticipantRuneDTO    `json:"runes"`         // The runes used by this participant
	Bot           bool                               `json:"bot"`           // Flag indicating whether or not this participant is a bot
	TeamId        int64                              `json:"teamId"`        // The team ID of this participant, indicating the participant's team
	Spell2Id      int64                              `json:"spell2Id"`      // The ID of the second summoner spell used by this participant
	Masteries     []CurrentGameParticipantMasteryDTO `json:"masteries"`     // The masteries used by this participant
	Spell1Id      int64                              `json:"spell1Id"`      // The ID of the first summoner spell used by this participant
	SummonerId    string                             `json:"summonerId"`    // The encrypted summoner ID of this participant
	Perks         Perks                              `json:"perks"`
}

type CurrentGameParticipantMasteryDTO

type CurrentGameParticipantMasteryDTO struct {
	MasteryId int64 `json:"masteryId"` // The ID of the mastery
	Rank      int   `json:"rank"`      // The number of points put into this mastery by the user
}

type CurrentGameParticipantRuneDTO

type CurrentGameParticipantRuneDTO struct {
	Count  int   `json:"count"`  // The count of this rune used by the participant
	RuneId int64 `json:"runeId"` // The ID of the rune
}

type FeaturedGameInfoDTO

type FeaturedGameInfoDTO struct {
	GameId            int64                        `json:"gameId"`            // The ID of the game
	GameStartTime     int64                        `json:"gameStartTime"`     // The game start time represented in epoch milliseconds
	PlatformId        string                       `json:"platformId"`        // The ID of the platform on which the game is being played
	GameMode          string                       `json:"gameMode"`          // The game mode
	MapId             int64                        `json:"mapId"`             // The ID of the map
	GameType          string                       `json:"gameType"`          // The game type
	BannedChampions   []BannedChampion             `json:"bannedChampions"`   // 	Banned champion information
	Observers         Observer                     `json:"observers"`         // The observer information
	Participants      []FeaturedGameParticipantDTO `json:"participants"`      //The participant information
	GameLength        int64                        `json:"gameLength"`        // The amount of time in seconds that has passed since the game started
	GameQueueConfigId int64                        `json:"gameQueueConfigId"` // The queue type (queue types are documented on the Game Constants page)
}

type FeaturedGameParticipantDTO

type FeaturedGameParticipantDTO struct {
	ProfileIconId int64  `json:"profileIconId"` // The ID of the profile icon used by this participant
	ChampionId    int64  `json:"championId"`    // The ID of the champion played by this participant
	SummonerName  string `json:"summonerName"`  // The summoner name of this participant
	Bot           bool   `json:"bot"`           // Flag indicating whether or not this participant is a bot
	Spell2Id      int64  `json:"spell2Id"`      // The ID of the second summoner spell used by this participant
	TeamId        int64  `json:"teamId"`        // The team ID of this participant, indicating the participant's team
	Spell1Id      int64  `json:"spell1Id"`      // The ID of the first summoner spell used by this participant
	Perks         Perks  `json:"perks"`
}

type FeaturedGames

type FeaturedGames struct {
	ClientRefreshInterval int64                 `json:"clientRefreshInterval",datastore:",noindex"` // The suggested interval to wait before requesting FeaturedGames again
	GameList              []FeaturedGameInfoDTO `json:"gameList",datastore:",noindex"`              // 	The list of featured games
}

type GetMatchlistOptions

type GetMatchlistOptions struct {
	Queue      []queue.Queue       `json:"queue"`
	Season     []season.Season     `json:"season"`
	Champion   []champion.Champion `json:"champion"`
	BeginTime  *time.Time          `json:"beginTime"`
	EndTime    *time.Time          `json:"endTime"`
	BeginIndex *int                `json:"beginIndex"`
	EndIndex   *int                `json:"endIndex"`
}

GetMatchlistOptions provides filtering options for GetMatchlist. The zero value means that the option will not be used in filtering.

type Interval

type Interval struct {
	Begin int `json:"begin"`
	End   int `json:"end"`
}

Interval represents a range of game time, measured in minutes.

The value 999 is used to represent an endpoint that is coded as the literal string "end"

type IntervalValue

type IntervalValue struct {
	Interval Interval `json:"interval"`
	Value    float64  `json:"value"`
}

type IntervalValues

type IntervalValues []IntervalValue

IntervalValues represents a mapping from intervals to values.

func (*IntervalValues) UnmarshalJSON

func (i *IntervalValues) UnmarshalJSON(b []byte) error

type LeagueEntry

type LeagueEntry struct {
	QueueType    string     `json:"queueType",datastore:",noindex"`
	SummonerName string     `json:"summonerName",datastore:",noindex"`
	HotStreak    bool       `json:"hotStreak",datastore:",noindex"`
	MiniSeries   MiniSeries `json:"miniSeries",datastore:",noindex"`
	Wins         int        `json:"wins",datastore:",noindex"`
	Veteran      bool       `json:"veteran",datastore:",noindex"`
	Losses       int        `json:"losses",datastore:",noindex"`
	Rank         string     `json:"rank",datastore:",noindex"`
	LeagueID     string     `json:"leagueId",datastore:",noindex"`
	Inactive     bool       `json:"inactive",datastore:",noindex"`
	FreshBlood   bool       `json:"freshBlood",datastore:",noindex"`
	LeagueName   string     `json:"leagueName",datastore:",noindex"`
	SummonerId   string     `json:"summonerId",datastore:",noindex"`
	Tier         tier.Tier  `json:"tier",datastore:",noindex"`
	LeaguePoints int        `json:"leaguePoints",datastore:",noindex"`
}

type LeagueItem

type LeagueItem struct {
	Rank         string     `json:"rank"`
	HotStreak    bool       `json:"hotStreak"`
	MiniSeries   MiniSeries `json:"miniSeries"`
	Wins         int        `json:"wins"`
	Veteran      bool       `json:"veteran"`
	Losses       int        `json:"losses"`
	FreshBlood   bool       `json:"freshBlood"`
	SummonerName string     `json:"summonerName"`
	Inactive     bool       `json:"inactive"`
	SummonerID   string     `json:"summonerID"`
	LeaguePoints int        `json:"leaguePoints"`
}

type LeagueList

type LeagueList struct {
	LeagueID string       `json:"leagueID",datastore:",noindex"`
	Tier     tier.Tier    `json:"tier",datastore:",noindex"`
	Entries  []LeagueItem `json:"entries",datastore:",noindex"`
	Queue    queue.Queue  `json:"queue",datastore:",noindex"`
	Name     string       `json:"name",datastore:",noindex"`
}

type LeaguePosition

type LeaguePosition struct {
	QueueType    string     `json:"queueType",datastore:",noindex"`
	SummonerName string     `json:"summonerName",datastore:",noindex"`
	HotStreak    bool       `json:"hotStreak",datastore:",noindex"`
	MiniSeries   MiniSeries `json:"miniSeries",datastore:",noindex"`
	Wins         int        `json:"wins",datastore:",noindex"`
	Veteran      bool       `json:"veteran",datastore:",noindex"`
	Losses       int        `json:"losses",datastore:",noindex"`
	Rank         string     `json:"rank",datastore:",noindex"`
	LeagueID     string     `json:"leagueId",datastore:",noindex"`
	Inactive     bool       `json:"inactive",datastore:",noindex"`
	FreshBlood   bool       `json:"freshBlood",datastore:",noindex"`
	LeagueName   string     `json:"leagueName",datastore:",noindex"`
	Position     string     `json:"position",datastore:",noindex"`
	Tier         tier.Tier  `json:"tier",datastore:",noindex"`
	LeaguePoints int        `json:"leaguePoints",datastore:",noindex"`
}

type Mastery

type Mastery struct {
	MasteryID int `json:"masteryID"`
	Rank      int `json:"rank"`
}

type Match

type Match struct {
	SeasonID              season.Season         `json:"seasonID",datastore:",noindex"`              // SeasonID is the ID associated with the current season of league.
	QueueID               queue.Queue           `json:"queueID",datastore:",noindex"`               // QueueID is a constant that refers to the queue.
	GameID                int64                 `json:"gameID",datastore:",noindex"`                // GameID is the ID of the requested game.
	ParticipantIdentities []ParticipantIdentity `json:"participantIdentities",datastore:",noindex"` // Array of player identities in requested game.
	GameVersion           string                `json:"gameVersion",datastore:",noindex"`           // Version that the game was played on.
	PlatformID            string                `json:"platformID",datastore:",noindex"`            // PlatformID
	GameMode              string                `json:"gameMode",datastore:",noindex"`              // GameMode
	MapID                 int                   `json:"mapID",datastore:",noindex"`                 // MapID is a constant of the map played on.
	GameType              string                `json:"gameType",datastore:",noindex"`              // GameType
	Teams                 []TeamStats           `json:"teams",datastore:",noindex"`                 // Teams
	Participants          []Participant         `json:"participants",datastore:",noindex"`          // Participants
	GameDuration          types.Milliseconds    `json:"gameDuration",datastore:",noindex"`          // GameDuration is the duration of the game in milliseconds
	GameCreation          types.Milliseconds    `json:"gameCreation",datastore:",noindex"`          // GameCreation is when game was created in epoch
}

type MatchEvent

type MatchEvent struct {
	EventType               string             `json:"eventType"`
	TowerType               string             `json:"towerType"`
	TeamID                  int                `json:"teamID"`
	AscendedType            string             `json:"ascendedType"`
	KillerID                int                `json:"killerID"`
	LevelUpType             string             `json:"levelUpType"`
	PointCaptured           string             `json:"pointCaptured"`
	AssistingParticipantIDs []int              `json:"assistingParticipantIDs"`
	WardType                string             `json:"wardType"`
	MonsterType             string             `json:"monsterType"`
	Type                    event.Event        `json:"type"`
	SkillSlot               int                `json:"skillSlot"`
	VictimID                int                `json:"victimID"`
	Timestamp               types.Milliseconds `json:"timestamp"`
	AfterID                 int                `json:"afterID"`
	MonsterSubType          string             `json:"monsterSubType"`
	LaneType                lane.Type          `json:"laneType"`
	ItemID                  int                `json:"itemID"`
	ParticipantID           int                `json:"participantID"`
	BuildingType            string             `json:"buildingType"`
	CreatorID               int                `json:"creatorID"`
	Position                MatchPosition      `json:"position"`
	BeforeID                int                `json:"beforeID"`
}

type MatchFrame

type MatchFrame struct {
	Timestamp         types.Milliseconds `json:"timestamp"`
	ParticipantFrames ParticipantFrames  `json:"participantFrames"`
	Events            []MatchEvent       `json:"events"`
}

type MatchParticipantFrame

type MatchParticipantFrame struct {
	TotalGold           int           `json:"totalGold"`
	TeamScore           int           `json:"teamScore"`
	ParticipantID       int           `json:"participantID"`
	Level               int           `json:"level"`
	CurrentGold         int           `json:"currentGold"`
	MinionsKilled       int           `json:"minionsKilled"`
	DominionScore       int           `json:"dominionScore"`
	Position            MatchPosition `json:"position"`
	XP                  int           `json:"xP"`
	JungleMinionsKilled int           `json:"jungleMinionsKilled"`
}

type MatchPosition

type MatchPosition struct {
	Y int `json:"y"`
	X int `json:"x"`
}

type MatchReference

type MatchReference struct {
	Lane       lane.Lane          `json:"lane"`
	GameID     int64              `json:"gameID"`
	Champion   champion.Champion  `json:"champion"`
	PlatformID string             `json:"platformID"`
	Season     season.Season      `json:"season"`
	Queue      queue.Queue        `json:"queue"`
	Role       string             `json:"role"`
	Timestamp  types.Milliseconds `json:"timestamp"`
}

type MatchTimeline

type MatchTimeline struct {
	Frames        []MatchFrame       `json:"frames",datastore:",noindex"`
	FrameInterval types.Milliseconds `json:"frameInterval",datastore:",noindex"`
}

type Matchlist

type Matchlist struct {
	Matches    []MatchReference `json:"matches",datastore:",noindex"`
	TotalGames int              `json:"totalGames",datastore:",noindex"`
	StartIndex int              `json:"startIndex",datastore:",noindex"`
	EndIndex   int              `json:"endIndex",datastore:",noindex"`
}

type MiniSeries

type MiniSeries struct {
	Wins     int    `json:"wins"`
	Losses   int    `json:"losses"`
	Target   int    `json:"target"`
	Progress string `json:"progress"`
}

type Observer

type Observer struct {
	EncryptionKey string `json:"encryptionKey"` // Key used to decrypt the spectator grid game data for playback
}

type Participant

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                 []Mastery           `json:"masteries"`
	HighestAchievedSeasonTier string              `json:"highestAchievedSeasonTier"`
	Spell1ID                  int                 `json:"spell1ID"`
	ChampionID                champion.Champion   `json:"championID"`
}

type ParticipantFrames

type ParticipantFrames struct {
	Frames []MatchParticipantFrame `json:"frames"`
}

ParticipantFrames stores frames corresponding to each participant. The order is not defined (i.e. do not assume the order is ascending by participant ID).

func (*ParticipantFrames) UnmarshalJSON

func (p *ParticipantFrames) UnmarshalJSON(b []byte) error

type ParticipantIdentity

type ParticipantIdentity struct {
	Player        Player `json:"player"`
	ParticipantID int    `json:"participantID"`
}

type ParticipantStats

type ParticipantStats struct {
	PhysicalDamageDealt             int64 `json:"physicalDamageDealt"`
	NeutralMinionsKilledTeamJungle  int   `json:"neutralMinionsKilledTeamJungle"`
	MagicDamageDealt                int64 `json:"magicDamageDealt"`
	TotalPlayerScore                int   `json:"totalPlayerScore"`
	Deaths                          int   `json:"deaths"`
	Win                             bool  `json:"win"`
	NeutralMinionsKilledEnemyJungle int   `json:"neutralMinionsKilledEnemyJungle"`
	AltarsCaptured                  int   `json:"altarsCaptured"`
	LargestCriticalStrike           int   `json:"largestCriticalStrike"`
	TotalDamageDealt                int64 `json:"totalDamageDealt"`
	MagicDamageDealtToChampions     int64 `json:"magicDamageDealtToChampions"`
	VisionWardsBoughtInGame         int   `json:"visionWardsBoughtInGame"`
	DamageDealtToObjectives         int64 `json:"damageDealtToObjectives"`
	LargestKillingSpree             int   `json:"largestKillingSpree"`
	Item1                           int   `json:"item1"`
	QuadraKills                     int   `json:"quadraKills"`
	TeamObjective                   int   `json:"teamObjective"`
	TotalTimeCrowdControlDealt      int   `json:"totalTimeCrowdControlDealt"`
	LongestTimeSpentLiving          int   `json:"longestTimeSpentLiving"`
	WardsKilled                     int   `json:"wardsKilled"`
	FirstTowerAssist                bool  `json:"firstTowerAssist"`
	FirstTowerKill                  bool  `json:"firstTowerKill"`
	Item2                           int   `json:"item2"`
	Item3                           int   `json:"item3"`
	Item0                           int   `json:"item0"`
	FirstBloodAssist                bool  `json:"firstBloodAssist"`
	VisionScore                     int64 `json:"visionScore"`
	WardsPlaced                     int   `json:"wardsPlaced"`
	Item4                           int   `json:"item4"`
	Item5                           int   `json:"item5"`
	Item6                           int   `json:"item6"`
	TurretKills                     int   `json:"turretKills"`
	TripleKills                     int   `json:"tripleKills"`
	DamageSelfMitigated             int64 `json:"damageSelfMitigated"`
	ChampLevel                      int   `json:"champLevel"`
	NodeNeutralizeAssist            int   `json:"nodeNeutralizeAssist"`
	FirstInhibitorKill              bool  `json:"firstInhibitorKill"`
	GoldEarned                      int   `json:"goldEarned"`
	MagicalDamageTaken              int64 `json:"magicalDamageTaken"`
	Kills                           int   `json:"kills"`
	DoubleKills                     int   `json:"doubleKills"`
	NodeCaptureAssist               int   `json:"nodeCaptureAssist"`
	TrueDamageTaken                 int64 `json:"trueDamageTaken"`
	NodeNeutralize                  int   `json:"nodeNeutralize"`
	FirstInhibitorAssist            bool  `json:"firstInhibitorAssist"`
	Assists                         int   `json:"assists"`
	UnrealKills                     int   `json:"unrealKills"`
	NeutralMinionsKilled            int   `json:"neutralMinionsKilled"`
	ObjectivePlayerScore            int   `json:"objectivePlayerScore"`
	CombatPlayerScore               int   `json:"combatPlayerScore"`
	DamageDealtToTurrets            int64 `json:"damageDealtToTurrets"`
	AltarsNeutralized               int   `json:"altarsNeutralized"`
	PhysicalDamageDealtToChampions  int64 `json:"physicalDamageDealtToChampions"`
	GoldSpent                       int   `json:"goldSpent"`
	TrueDamageDealt                 int64 `json:"trueDamageDealt"`
	TrueDamageDealtToChampions      int64 `json:"trueDamageDealtToChampions"`
	ParticipantID                   int   `json:"participantID"`
	PentaKills                      int   `json:"pentaKills"`
	TotalHeal                       int64 `json:"totalHeal"`
	TotalMinionsKilled              int   `json:"totalMinionsKilled"`
	FirstBloodKill                  bool  `json:"firstBloodKill"`
	NodeCapture                     int   `json:"nodeCapture"`
	LargestMultiKill                int   `json:"largestMultiKill"`
	SightWardsBoughtInGame          int   `json:"sightWardsBoughtInGame"`
	TotalDamageDealtToChampions     int64 `json:"totalDamageDealtToChampions"`
	TotalUnitsHealed                int   `json:"totalUnitsHealed"`
	InhibitorKills                  int   `json:"inhibitorKills"`
	TotalScoreRank                  int   `json:"totalScoreRank"`
	TotalDamageTaken                int64 `json:"totalDamageTaken"`
	KillingSprees                   int   `json:"killingSprees"`
	TimeCCingOthers                 int64 `json:"timeCCingOthers"`
	PhysicalDamageTaken             int64 `json:"physicalDamageTaken"`

	Perk0     int64 `json:"perk0"`
	Perk0Var1 int   `json:"perk0Var1"`
	Perk0Var2 int   `json:"perk0Var2"`
	Perk0Var3 int   `json:"perk0Var3"`

	Perk1     int64 `json:"perk1"`
	Perk1Var1 int   `json:"perk1Var1"`
	Perk1Var2 int   `json:"perk1Var2"`
	Perk1Var3 int   `json:"perk1Var3"`

	Perk2     int64 `json:"perk2"`
	Perk2Var1 int   `json:"perk2Var1"`
	Perk2Var2 int   `json:"perk2Var2"`
	Perk2Var3 int   `json:"perk2Var3"`

	Perk3     int64 `json:"perk3"`
	Perk3Var1 int   `json:"perk3Var1"`
	Perk3Var2 int   `json:"perk3Var2"`
	Perk3Var3 int   `json:"perk3Var3"`

	Perk4     int64 `json:"perk4"`
	Perk4Var1 int   `json:"perk4Var1"`
	Perk4Var2 int   `json:"perk4Var2"`
	Perk4Var3 int   `json:"perk4Var3"`

	Perk5     int64 `json:"perk5"`
	Perk5Var1 int   `json:"perk5Var1"`
	Perk5Var2 int   `json:"perk5Var2"`
	Perk5Var3 int   `json:"perk5Var3"`

	PerkPrimaryStyle int64 `json:"perkPrimaryStyle"`
	PerkSubStyle     int64 `json:"perkSubStyle"`
}

type ParticipantTimeline

type ParticipantTimeline struct {
	Lane                        lane.Lane      `json:"lane"`
	ParticipantID               int            `json:"participantID"`
	CSDiffPerMinDeltas          IntervalValues `json:"cSDiffPerMinDeltas"`
	GoldPerMinDeltas            IntervalValues `json:"goldPerMinDeltas"`
	XPDiffPerMinDeltas          IntervalValues `json:"xPDiffPerMinDeltas"`
	CreepsPerMinDeltas          IntervalValues `json:"creepsPerMinDeltas"`
	XPPerMinDeltas              IntervalValues `json:"xPPerMinDeltas"`
	Role                        string         `json:"role"`
	DamageTakenDiffPerMinDeltas IntervalValues `json:"damageTakenDiffPerMinDeltas"`
	DamageTakenPerMinDeltas     IntervalValues `json:"damageTakenPerMinDeltas"`
}

type Perks

type Perks struct {
	PerkIDs      []int64 `json:"perkIDs"`
	PerkStyle    int64   `json:"perkStyle"`
	PerkSubStyle int64   `json:"perkSubStyle"`
}

type Player

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"`
}

type Rune

type Rune struct {
	RuneID int `json:"runeID"`
	Rank   int `json:"rank"`
}

type Summoner

type Summoner struct {
	ProfileIconID int    `json:"profileIconID",datastore:",noindex"` // ID of the summoner icon associated with the summoner.
	Name          string `json:"name",datastore:",noindex"`          // Summoner name.
	PUUID         string `json:"puuid",datastore:",noinex"`          // PUUID is the player universally unique identifier.
	SummonerLevel int64  `json:"summonerLevel",datastore:",noindex"` // Summoner level associated with the summoner.
	AccountID     string `json:"accountID",datastore:",noindex"`     // Encrypted account ID.
	ID            string `json:"id",datastore:",noindex"`            // Encrypted summoner ID.
	RevisionDate  int64  `json:"revisionDate",datastore:",noindex"`  // Date summoner was last modified specified as epoch milliseconds. The following events will update this timestamp: profile icon change, playing the tutorial or advanced tutorial, finishing a game, summoner name change
}

type TeamBans

type TeamBans struct {
	PickTurn   int               `json:"pickTurn"`
	ChampionID champion.Champion `json:"championID"`
}

type TeamStats

type TeamStats struct {
	FirstDragon          bool       `json:"firstDragon"`
	FirstInhibitor       bool       `json:"firstInhibitor"`
	Bans                 []TeamBans `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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL