riotclient

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2019 License: MIT Imports: 1 Imported by: 6

Documentation

Overview

Package riotclient provides the Riot API Client interfaces

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BannedChampionDTO

type BannedChampionDTO struct {
	TeamID     int64 `json:"teamId"`
	ChampionID int64 `json:"championId"`
	PickTurn   int   `json:"pickTurn"`
}

BannedChampionDTO contain the banned champions in a currently running match

type Champion

type Champion struct {
	Version string        `json:"version"`
	ID      string        `json:"id"`
	Key     string        `json:"key"`
	Name    string        `json:"name"`
	Title   string        `json:"title"`
	Blurb   string        `json:"blurb"`
	Info    ChampionInfo  `json:"info"`
	Image   ChampionImage `json:"image"`
	Tags    []string      `json:"tags"`
	Partype string        `json:"partype"`
	Stats   ChampionStats `json:"stats"`

	Roles []string `json:"roles"`

	Timestamp time.Time `json:"timestamp"`
}

Champion stores champion data in the format coming from DataDragon + TimeStamp

type ChampionImage

type ChampionImage struct {
	Full   string `json:"full"`
	Sprite string `json:"sprite"`
	Group  string `json:"group"`
	X      int    `json:"x"`
	Y      int    `json:"y"`
	W      int    `json:"w"`
	H      int    `json:"h"`
}

ChampionImage contains information related to fetch the champion image

type ChampionInfo

type ChampionInfo struct {
	Attack     int `json:"attack"`
	Defense    int `json:"defense"`
	Magic      int `json:"magic"`
	Difficulty int `json:"difficulty"`
}

ChampionInfo contains the basic info about the champion

type ChampionStats

type ChampionStats struct {
	Hp                   float64 `json:"hp"`
	Hpperlevel           float64 `json:"hpperlevel"`
	Mp                   float64 `json:"mp"`
	Mpperlevel           float64 `json:"mpperlevel"`
	Movespeed            float64 `json:"movespeed"`
	Armor                float64 `json:"armor"`
	Armorperlevel        float64 `json:"armorperlevel"`
	Spellblock           float64 `json:"spellblock"`
	Spellblockperlevel   float64 `json:"spellblockperlevel"`
	Attackrange          float64 `json:"attackrange"`
	Hpregen              float64 `json:"hpregen"`
	Hpregenperlevel      float64 `json:"hpregenperlevel"`
	Mpregen              float64 `json:"mpregen"`
	Mpregenperlevel      float64 `json:"mpregenperlevel"`
	Crit                 float64 `json:"crit"`
	Critperlevel         float64 `json:"critperlevel"`
	Attackdamage         float64 `json:"attackdamage"`
	Attackdamageperlevel float64 `json:"attackdamageperlevel"`
	Attackspeedoffset    float64 `json:"attackspeedoffset"`
	Attackspeedperlevel  float64 `json:"attackspeedperlevel"`
	Attackspeed          float64 `json:"attackspeed"`
}

ChampionStats contains extended information about the champion

type ChampionsList

type ChampionsList map[string]Champion

ChampionsList is used to pass around a list of champions

type Client

Client defines the interface for a Riot API Client

type ClientBase

type ClientBase interface {
	Start()
	Stop()
}

ClientBase defines basic Riot Client operations

type ClientChampion

type ClientChampion interface {
	Champions() (s ChampionsList, err error)
	ChampionRotations() (s *FreeRotation, err error)
}

ClientChampion defines an interface to Champion API calls

type ClientItem

type ClientItem interface {
	Items(gameVersion, language string) (*ItemList, error)
}

ClientItem defines an interface to Item API calls

type ClientLeague

type ClientLeague interface {
	LeagueByQueue(league string, queue string) (*LeagueListDTO, error)
	LeaguesForSummoner(encSummonerID string) (*LeaguePositionDTOList, error)
}

ClientLeague defines an interface to League API calls

type ClientMatch

type ClientMatch interface {
	MatchByID(matchID uint64) (s *MatchDTO, err error)
	MatchesByAccountID(accountID string, args map[string]string) (s *MatchlistDTO, err error)
	MatchTimeLineByID(matchID uint64) (t *MatchTimelineDTO, err error)
}

ClientMatch defines an interface to Match API calls

type ClientSpectator

type ClientSpectator interface {
	ActiveGameBySummonerID(summonerID string) (*CurrentGameInfoDTO, error)
	FeaturedGames() (*FeaturedGamesDTO, error)
}

ClientSpectator defines an interface to Spectator API calls

type ClientSummoner

type ClientSummoner interface {
	SummonerByName(name string) (s *SummonerDTO, err error)
	SummonerByAccountID(accountID string) (s *SummonerDTO, err error)
	SummonerBySummonerID(summonerID string) (s *SummonerDTO, err error)
	SummonerByPUUID(PUUID string) (s *SummonerDTO, err error)
}

ClientSummoner defines an interface to Summoner API calls

type ClientSummonerSpells

type ClientSummonerSpells interface {
	SummonerSpells() (s *SummonerSpellsList, err error)
}

ClientSummonerSpells defines an interface to Summoner Spells API calls

type CurrentGameInfoDTO

type CurrentGameInfoDTO struct {
	GameID            int64                       `json:"gameId"`
	GameStartTime     int64                       `json:"gameStartTime"`
	PlatformID        string                      `json:"platformId"`
	GameMode          string                      `json:"gameMode"`
	MapID             int64                       `json:"mapId"`
	GameType          string                      `json:"gameType"`
	GameQueueConfigID int64                       `json:"gameQueueConfigId"`
	BannedChampions   []BannedChampionDTO         `json:"bannedChampions"`
	Observers         ObserverDTO                 `json:"observers"`
	Participants      []CurrentGameParticipantDTO `json:"participants"`
	GameLength        int64                       `json:"gameLength"`
}

CurrentGameInfoDTO contains live game information of a currently running match

type CurrentGameParticipantDTO

type CurrentGameParticipantDTO struct {
	ProfileIconID            int64                        `json:"profileIconId"`
	ChampionID               int64                        `json:"championId"`
	SummonerName             string                       `json:"summonerName"`
	GameCustomizationObjects []GameCustomizationObjectDTO `json:"gameCustomizationObjects"`
	Bot                      bool                         `json:"bot"`
	Perks                    PerksDTO                     `json:"perks"`
	Spell2ID                 int64                        `json:"spell2Id"`
	TeamID                   int64                        `json:"teamId"`
	Spell1ID                 int64                        `json:"spell1Id"`
	SummonerID               string                       `json:"summonerId"`
}

CurrentGameParticipantDTO contain information of the participants in the currently running match

type FeaturedGameInfoDTO

type FeaturedGameInfoDTO struct {
	GameID            int64                            `json:"gameId"`
	GameStartTime     int64                            `json:"gameStartTime"`
	PlatformID        string                           `json:"platformId"`
	GameMode          string                           `json:"gameMode"`
	MapID             int                              `json:"mapId"`
	GameType          string                           `json:"gameType"`
	GameQueueConfigID int                              `json:"gameQueueConfigId"`
	Observers         ObserverDTO                      `json:"observers"`
	Participants      []FeaturedGameInfoParticipantDTO `json:"participants"`
	GameLength        int                              `json:"gameLength"`
	BannedChampions   []BannedChampionDTO              `json:"bannedChampions"`
}

FeaturedGameInfoDTO contains informations on one Featured Game

type FeaturedGameInfoParticipantDTO

type FeaturedGameInfoParticipantDTO struct {
	ProfileIconID int    `json:"profileIconId"`
	ChampionID    int    `json:"championId"`
	SummonerName  string `json:"summonerName"`
	Bot           bool   `json:"bot"`
	Spell2ID      int    `json:"spell2Id"`
	TeamID        int    `json:"teamId"`
	Spell1ID      int    `json:"spell1Id"`
}

FeaturedGameInfoParticipantDTO contains participant information in a featured game

type FeaturedGamesDTO

type FeaturedGamesDTO struct {
	ClientRefreshInterval int                   `json:"clientRefreshInterval"`
	GameList              []FeaturedGameInfoDTO `json:"gameList"`
}

FeaturedGamesDTO models the Riot API response for Features Games

type FreeRotation

type FreeRotation struct {
	FreeChampionIds              []int `json:"freeChampionIds"`
	FreeChampionIdsForNewPlayers []int `json:"freeChampionIdsForNewPlayers"`
	MaxNewPlayerLevel            int   `json:"maxNewPlayerLevel"`

	Timestamp time.Time `json:"timestamp"`
}

FreeRotation contains the data of the free champions rotation from Riot API

type GameCustomizationObjectDTO

type GameCustomizationObjectDTO struct {
	Category string `json:"category"`
	Content  string `json:"content"`
}

GameCustomizationObjectDTO contains the custom options set for a running match

type ItemList

type ItemList struct {
	Type    string `json:"type"`
	Version string `json:"version"`
	Basic   struct {
		Name string `json:"name"`
		Rune struct {
			Isrune bool   `json:"isrune"`
			Tier   int    `json:"tier"`
			Type   string `json:"type"`
		} `json:"rune"`
		Gold struct {
			Base        int  `json:"base"`
			Total       int  `json:"total"`
			Sell        int  `json:"sell"`
			Purchasable bool `json:"purchasable"`
		} `json:"gold"`
		Group            string          `json:"group"`
		Description      string          `json:"description"`
		Colloq           string          `json:"colloq"`
		Plaintext        string          `json:"plaintext"`
		Consumed         bool            `json:"consumed"`
		Stacks           int             `json:"stacks"`
		Depth            int             `json:"depth"`
		ConsumeOnFull    bool            `json:"consumeOnFull"`
		From             []interface{}   `json:"from"`
		Into             []interface{}   `json:"into"`
		SpecialRecipe    int             `json:"specialRecipe"`
		InStore          bool            `json:"inStore"`
		HideFromAll      bool            `json:"hideFromAll"`
		RequiredChampion string          `json:"requiredChampion"`
		RequiredAlly     string          `json:"requiredAlly"`
		Stats            Stats           `json:"stats"`
		Tags             []interface{}   `json:"tags"`
		Maps             map[string]bool `json:"maps"`
	} `json:"basic"`
	Data map[uint16]struct {
		Name        string   `json:"name"`
		Description string   `json:"description"`
		Colloq      string   `json:"colloq"`
		Plaintext   string   `json:"plaintext"`
		Into        []string `json:"into"`
		Image       struct {
			Full   string `json:"full"`
			Sprite string `json:"sprite"`
			Group  string `json:"group"`
			X      int    `json:"x"`
			Y      int    `json:"y"`
			W      int    `json:"w"`
			H      int    `json:"h"`
		} `json:"image"`
		Gold struct {
			Base        int  `json:"base"`
			Purchasable bool `json:"purchasable"`
			Total       int  `json:"total"`
			Sell        int  `json:"sell"`
		} `json:"gold"`
		Tags  []string        `json:"tags"`
		Maps  map[string]bool `json:"maps"`
		Stats Stats           `json:"stats"`
	} `json:"data"`
	Groups []struct {
		ID              string `json:"id"`
		MaxGroupOwnable string `json:"MaxGroupOwnable"`
	} `json:"groups"`
	Tree []struct {
		Header string   `json:"header"`
		Tags   []string `json:"tags"`
	} `json:"tree"`
}

ItemList contains all items for a specific game version

type LeagueData

type LeagueData struct {
	Tier     string `json:"tier"`
	Queue    string `json:"queue"`
	LeagueID string `json:"leagueId"`
	Name     string `json:"name"`
	Entries  []struct {
		HotStreak        bool   `json:"hotStreak"`
		Wins             int    `json:"wins"`
		Veteran          bool   `json:"veteran"`
		Losses           int    `json:"losses"`
		Rank             string `json:"rank"`
		PlayerOrTeamName string `json:"playerOrTeamName"`
		Inactive         bool   `json:"inactive"`
		PlayerOrTeamID   string `json:"playerOrTeamId"`
		FreshBlood       bool   `json:"freshBlood"`
		LeaguePoints     int    `json:"leaguePoints"`
	} `json:"entries"`

	Timestamp time.Time `json:"timestamp"`
}

LeagueData is the representation of a Challenger League at a certain point in time

type LeagueItemDTO

type LeagueItemDTO struct {
	SummonerName string        `json:"summonerName"`
	Wins         int           `json:"wins"`
	Losses       int           `json:"losses"`
	Rank         string        `json:"rank"`
	SummonerID   string        `json:"summonerId"`
	LeaguePoints int           `json:"leaguePoints"`
	MiniSeries   MiniSeriesDTO `json:"miniSeries"`
}

LeagueItemDTO contains a certain entry in a league response

type LeagueListDTO

type LeagueListDTO struct {
	Tier     string          `json:"tier"`
	Queue    string          `json:"queue"`
	LeagueID string          `json:"leagueId"`
	Name     string          `json:"name"`
	Entries  []LeagueItemDTO `json:"entries"`

	Timestamp time.Time `json:"timestamp"`
}

LeagueListDTO models the response of the Riot API for league informations

type LeaguePositionDTO

type LeaguePositionDTO struct {
	QueueType    string `json:"queueType"`
	SummonerName string `json:"summonerName"`
	Wins         int    `json:"wins"`
	Losses       int    `json:"losses"`
	Rank         string `json:"rank"`
	LeagueName   string `json:"leagueName"`
	LeagueID     string `json:"leagueId"`
	Tier         string `json:"tier"`
	SummonerID   string `json:"summonerId"`
	LeaguePoints int    `json:"leaguePoints"`

	Timestamp time.Time `json:"timestamp"`
}

LeaguePositionDTO models the response of the Riot API for leagues for a certain summoner (one entry in result array)

type LeaguePositionDTOList

type LeaguePositionDTOList struct {
	LeaguePosition []LeaguePositionDTO
}

LeaguePositionDTOList models response of the Riot API for leagues for a certain summoner

type MasteryDTO

type MasteryDTO struct {
	MasteryID int `json:"masteryId"`
	Rank      int `json:"rank"`
}

MasteryDTO list of legacy Mastery information. Not included for matches played with Runes Reforged.

type MatchDTO

type MatchDTO struct {
	GameID                int64                    `json:"gameId"`
	PlatformID            string                   `json:"platformId"`
	GameCreation          int64                    `json:"gameCreation"`
	GameDuration          int                      `json:"gameDuration"`
	QueueID               int                      `json:"queueId"`
	MapID                 int                      `json:"mapId"`
	SeasonID              int                      `json:"seasonId"`
	GameVersion           string                   `json:"gameVersion"`
	GameMode              string                   `json:"gameMode"`
	GameType              string                   `json:"gameType"`
	Teams                 []TeamStatsDTO           `json:"teams"`
	Participants          []ParticipantDTO         `json:"participants" bson:"participants"`
	ParticipantIdentities []ParticipantIdentityDTO `json:"participantIdentities"`
}

MatchDTO contains the complete match data (excluding full time line)

type MatchEventDTO

type MatchEventDTO 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                    string           `json:"type"`
	SkillSlot               int              `json:"skillSlot"`
	VictimID                int              `json:"victimId"`
	Timestamp               int64            `json:"timestamp"`
	AfterID                 int              `json:"afterId"`
	MonsterSubType          string           `json:"monsterSubType"`
	LaneType                string           `json:"laneType"`
	ItemID                  int              `json:"itemId"`
	ParticipantID           int              `json:"participantId"`
	BuildingType            string           `json:"buildingType"`
	CreatorID               int              `json:"creatorId"`
	Position                MatchPositionDTO `json:"position"`
	BeforeID                int              `json:"beforeId"`
}

MatchEventDTO contains a certain event in a match timeline

type MatchFrameDTO

type MatchFrameDTO struct {
	Timestamp         int64                               `json:"timestamp"`
	ParticipantFrames map[string]MatchParticipantFrameDTO `json:"participantFrames"`
	Events            []MatchEventDTO                     `json:"events"`
}

MatchFrameDTO contains the actual timeline data of a match timeline

type MatchParticipantFrameDTO

type MatchParticipantFrameDTO 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            MatchPositionDTO `json:"position"`
	Xp                  int              `json:"xp"`
	JungleMinionsKilled int              `json:"jungleMinionsKilled"`
}

MatchParticipantFrameDTO contains participant information in a match timeline

type MatchPositionDTO

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

MatchPositionDTO contains position of the event

type MatchReferenceDTO

type MatchReferenceDTO struct {
	Lane       string `json:"lane"`
	GameID     int64  `json:"gameId"`
	Champion   int    `json:"champion"`
	PlatformID string `json:"platformId"`
	Timestamp  int64  `json:"timestamp"`
	Queue      int    `json:"queue"`
	Role       string `json:"role"`
	Season     int    `json:"season"`
}

MatchReferenceDTO models the Riot API response for one Matches entry in a MatchlistDto

type MatchTimelineDTO

type MatchTimelineDTO struct {
	Frames        []MatchFrameDTO `json:"frames"`
	FrameInterval int             `json:"frameInterval"`
}

MatchTimelineDTO contains a timeline for events in a match

type Matches

type Matches struct {
	Matches []MatchDTO `json:"matches"`
}

Matches contains a collection of MatchDTOs

type MatchlistDTO

type MatchlistDTO struct {
	Matches    []MatchReferenceDTO `json:"matches"`
	TotalGames int                 `json:"totalGames"`
	StartIndex int                 `json:"startIndex"`
	EndIndex   int                 `json:"endIndex"`
}

MatchlistDTO models the Riot API response for Matchlist endpoints

type MiniSeriesDTO

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

MiniSeriesDTO no description available

type ObserverDTO

type ObserverDTO struct {
	EncryptionKey string `json:"encryptionKey"`
}

ObserverDTO contain the encryption key in a currently running match

type ParticipantDTO

type ParticipantDTO struct {
	ParticipantID             int                    `json:"participantId"`
	TeamID                    int                    `json:"teamId"`
	ChampionID                int                    `json:"championId"`
	Spell1ID                  int                    `json:"spell1Id"`
	Spell2ID                  int                    `json:"spell2Id"`
	Masteries                 []MasteryDTO           `json:"masteries"`
	Runes                     []RuneDTO              `json:"runes"`
	HighestAchievedSeasonTier string                 `json:"highestAchievedSeasonTier"`
	Stats                     ParticipantStatsDTO    `json:"stats"`
	Timeline                  ParticipantTimelineDTO `json:"timeline"`
}

ParticipantDTO contains match data specific to one player

type ParticipantIdentityDTO

type ParticipantIdentityDTO struct {
	ParticipantID int       `json:"participantId"`
	Player        PlayerDTO `json:"player"`
}

ParticipantIdentityDTO contains Participant identity information

type ParticipantStatsDTO

type ParticipantStatsDTO struct {
	ParticipantID                   int  `json:"participantId"`
	Win                             bool `json:"win"`
	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"`
	Kills                           int  `json:"kills"`
	Deaths                          int  `json:"deaths"`
	Assists                         int  `json:"assists"`
	LargestKillingSpree             int  `json:"largestKillingSpree"`
	LargestMultiKill                int  `json:"largestMultiKill"`
	KillingSprees                   int  `json:"killingSprees"`
	LongestTimeSpentLiving          int  `json:"longestTimeSpentLiving"`
	DoubleKills                     int  `json:"doubleKills"`
	TripleKills                     int  `json:"tripleKills"`
	QuadraKills                     int  `json:"quadraKills"`
	PentaKills                      int  `json:"pentaKills"`
	UnrealKills                     int  `json:"unrealKills"`
	TotalDamageDealt                int  `json:"totalDamageDealt"`
	MagicDamageDealt                int  `json:"magicDamageDealt"`
	PhysicalDamageDealt             int  `json:"physicalDamageDealt"`
	TrueDamageDealt                 int  `json:"trueDamageDealt"`
	LargestCriticalStrike           int  `json:"largestCriticalStrike"`
	TotalDamageDealtToChampions     int  `json:"totalDamageDealtToChampions"`
	MagicDamageDealtToChampions     int  `json:"magicDamageDealtToChampions"`
	PhysicalDamageDealtToChampions  int  `json:"physicalDamageDealtToChampions"`
	TrueDamageDealtToChampions      int  `json:"trueDamageDealtToChampions"`
	TotalHeal                       int  `json:"totalHeal"`
	TotalUnitsHealed                int  `json:"totalUnitsHealed"`
	DamageSelfMitigated             int  `json:"damageSelfMitigated"`
	DamageDealtToObjectives         int  `json:"damageDealtToObjectives"`
	DamageDealtToTurrets            int  `json:"damageDealtToTurrets"`
	VisionScore                     int  `json:"visionScore"`
	TimeCCingOthers                 int  `json:"timeCCingOthers"`
	TotalDamageTaken                int  `json:"totalDamageTaken"`
	MagicalDamageTaken              int  `json:"magicalDamageTaken"`
	PhysicalDamageTaken             int  `json:"physicalDamageTaken"`
	TrueDamageTaken                 int  `json:"trueDamageTaken"`
	GoldEarned                      int  `json:"goldEarned"`
	GoldSpent                       int  `json:"goldSpent"`
	TurretKills                     int  `json:"turretKills"`
	InhibitorKills                  int  `json:"inhibitorKills"`
	TotalMinionsKilled              int  `json:"totalMinionsKilled"`
	NeutralMinionsKilled            int  `json:"neutralMinionsKilled"`
	NeutralMinionsKilledTeamJungle  int  `json:"neutralMinionsKilledTeamJungle"`
	NeutralMinionsKilledEnemyJungle int  `json:"neutralMinionsKilledEnemyJungle"`
	TotalTimeCrowdControlDealt      int  `json:"totalTimeCrowdControlDealt"`
	ChampLevel                      int  `json:"champLevel"`
	VisionWardsBoughtInGame         int  `json:"visionWardsBoughtInGame"`
	SightWardsBoughtInGame          int  `json:"sightWardsBoughtInGame"`
	WardsPlaced                     int  `json:"wardsPlaced"`
	WardsKilled                     int  `json:"wardsKilled"`
	FirstBloodKill                  bool `json:"firstBloodKill"`
	FirstBloodAssist                bool `json:"firstBloodAssist"`
	FirstTowerKill                  bool `json:"firstTowerKill"`
	FirstTowerAssist                bool `json:"firstTowerAssist"`
	FirstInhibitorKill              bool `json:"firstInhibitorKill"`
	FirstInhibitorAssist            bool `json:"firstInhibitorAssist"`
	CombatPlayerScore               int  `json:"combatPlayerScore"`
	ObjectivePlayerScore            int  `json:"objectivePlayerScore"`
	TotalPlayerScore                int  `json:"totalPlayerScore"`
	TotalScoreRank                  int  `json:"totalScoreRank"`
	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"`
	Perk0Var1                       int  `json:"perk0var1"`
	Perk0Var2                       int  `json:"perk0var2"`
	Perk0Var3                       int  `json:"perk0var3"`
	Perk1Var1                       int  `json:"perk1var1"`
	Perk1Var2                       int  `json:"perk1var2"`
	Perk1Var3                       int  `json:"perk1var3"`
	Perk2Var1                       int  `json:"perk2var1"`
	Perk2Var2                       int  `json:"perk2var2"`
	Perk2Var3                       int  `json:"perk2var3"`
	Perk3Var1                       int  `json:"perk3var1"`
	Perk3Var2                       int  `json:"perk3var2"`
	Perk3Var3                       int  `json:"perk3var3"`
	Perk4Var1                       int  `json:"perk4var1"`
	Perk4Var2                       int  `json:"perk4var2"`
	Perk4Var3                       int  `json:"perk4var3"`
	Perk5Var1                       int  `json:"perk5var1"`
	Perk5Var2                       int  `json:"perk5var2"`
	Perk5Var3                       int  `json:"perk5var3"`
	Perk0                           int  `json:"perk0"`
	Perk1                           int  `json:"perk1"`
	Perk2                           int  `json:"perk2"`
	Perk3                           int  `json:"perk3"`
	Perk4                           int  `json:"perk4"`
	Perk5                           int  `json:"perk5"`
	StatPerk0                       int  `json:"statPerk0"`
	StatPerk1                       int  `json:"statPerk1"`
	StatPerk2                       int  `json:"statPerk2"`
	PerkPrimaryStyle                int  `json:"perkPrimaryStyle"`
	PerkSubStyle                    int  `json:"perkSubStyle"`
}

ParticipantStatsDTO contains Stats for a participant of a match

type ParticipantTimelineDTO

type ParticipantTimelineDTO struct {
	ParticipantID               int                `json:"participantId"`
	CreepsPerMinDeltas          map[string]float64 `json:"creepsPerMinDeltas"`
	XpPerMinDeltas              map[string]float64 `json:"xpPerMinDeltas"`
	GoldPerMinDeltas            map[string]float64 `json:"goldPerMinDeltas"`
	CsDiffPerMinDeltas          map[string]float64 `json:"csDiffPerMinDeltas"`
	XpDiffPerMinDeltas          map[string]float64 `json:"xpDiffPerMinDeltas"`
	DamageTakenPerMinDeltas     map[string]float64 `json:"damageTakenPerMinDeltas"`
	DamageTakenDiffPerMinDeltas map[string]float64 `json:"damageTakenDiffPerMinDeltas"`
	Role                        string             `json:"role"`
	Lane                        string             `json:"lane"`
}

ParticipantTimelineDTO contains participant timeline data for a match

type PerksDTO

type PerksDTO struct {
	PerkStyle    int64   `json:"perkStyle"`
	PerkIds      []int64 `json:"perkIds"`
	PerkSubStyle int64   `json:"perkSubStyle"`
}

PerksDTO contains Perks/Runes Reforged Information for a running match

type PlayerDTO

type PlayerDTO struct {
	PlatformID        string `json:"platformId"`
	AccountID         string `json:"accountId"`
	SummonerName      string `json:"summonerName"`
	SummonerID        string `json:"summonerId"`
	CurrentPlatformID string `json:"currentPlatformId"`
	CurrentAccountID  string `json:"currentAccountId"`
	MatchHistoryURI   string `json:"matchHistoryUri"`
	ProfileIcon       int    `json:"profileIcon"`
}

PlayerDTO contains the Player Information

type RuneDTO

type RuneDTO struct {
	RuneID int `json:"runeId"`
	Rank   int `json:"rank"`
}

RuneDTO contains the runes of a participant of a match

type Stats

type Stats struct {
	FlatHPPoolMod                       float32 `json:"FlatHPPoolMod"`
	RFlatHPModPerLevel                  float32 `json:"rFlatHPModPerLevel"`
	FlatMPPoolMod                       float32 `json:"FlatMPPoolMod"`
	RFlatMPModPerLevel                  float32 `json:"rFlatMPModPerLevel"`
	PercentHPPoolMod                    float32 `json:"PercentHPPoolMod"`
	PercentMPPoolMod                    float32 `json:"PercentMPPoolMod"`
	FlatHPRegenMod                      float32 `json:"FlatHPRegenMod"`
	RFlatHPRegenModPerLevel             float32 `json:"rFlatHPRegenModPerLevel"`
	PercentHPRegenMod                   float32 `json:"PercentHPRegenMod"`
	FlatMPRegenMod                      float32 `json:"FlatMPRegenMod"`
	RFlatMPRegenModPerLevel             float32 `json:"rFlatMPRegenModPerLevel"`
	PercentMPRegenMod                   float32 `json:"PercentMPRegenMod"`
	FlatArmorMod                        float32 `json:"FlatArmorMod"`
	RFlatArmorModPerLevel               float32 `json:"rFlatArmorModPerLevel"`
	PercentArmorMod                     float32 `json:"PercentArmorMod"`
	RFlatArmorPenetrationMod            float32 `json:"rFlatArmorPenetrationMod"`
	RFlatArmorPenetrationModPerLevel    float32 `json:"rFlatArmorPenetrationModPerLevel"`
	RPercentArmorPenetrationMod         float32 `json:"rPercentArmorPenetrationMod"`
	RPercentArmorPenetrationModPerLevel float32 `json:"rPercentArmorPenetrationModPerLevel"`
	FlatPhysicalDamageMod               float32 `json:"FlatPhysicalDamageMod"`
	RFlatPhysicalDamageModPerLevel      float32 `json:"rFlatPhysicalDamageModPerLevel"`
	PercentPhysicalDamageMod            float32 `json:"PercentPhysicalDamageMod"`
	FlatMagicDamageMod                  float32 `json:"FlatMagicDamageMod"`
	RFlatMagicDamageModPerLevel         float32 `json:"rFlatMagicDamageModPerLevel"`
	PercentMagicDamageMod               float32 `json:"PercentMagicDamageMod"`
	FlatMovementSpeedMod                float32 `json:"FlatMovementSpeedMod"`
	RFlatMovementSpeedModPerLevel       float32 `json:"rFlatMovementSpeedModPerLevel"`
	PercentMovementSpeedMod             float32 `json:"PercentMovementSpeedMod"`
	RPercentMovementSpeedModPerLevel    float32 `json:"rPercentMovementSpeedModPerLevel"`
	FlatAttackSpeedMod                  float32 `json:"FlatAttackSpeedMod"`
	PercentAttackSpeedMod               float32 `json:"PercentAttackSpeedMod"`
	RPercentAttackSpeedModPerLevel      float32 `json:"rPercentAttackSpeedModPerLevel"`
	RFlatDodgeMod                       float32 `json:"rFlatDodgeMod"`
	RFlatDodgeModPerLevel               float32 `json:"rFlatDodgeModPerLevel"`
	PercentDodgeMod                     float32 `json:"PercentDodgeMod"`
	FlatCritChanceMod                   float32 `json:"FlatCritChanceMod"`
	RFlatCritChanceModPerLevel          float32 `json:"rFlatCritChanceModPerLevel"`
	PercentCritChanceMod                float32 `json:"PercentCritChanceMod"`
	FlatCritDamageMod                   float32 `json:"FlatCritDamageMod"`
	RFlatCritDamageModPerLevel          float32 `json:"rFlatCritDamageModPerLevel"`
	PercentCritDamageMod                float32 `json:"PercentCritDamageMod"`
	FlatBlockMod                        float32 `json:"FlatBlockMod"`
	PercentBlockMod                     float32 `json:"PercentBlockMod"`
	FlatSpellBlockMod                   float32 `json:"FlatSpellBlockMod"`
	RFlatSpellBlockModPerLevel          float32 `json:"rFlatSpellBlockModPerLevel"`
	PercentSpellBlockMod                float32 `json:"PercentSpellBlockMod"`
	FlatEXPBonus                        float32 `json:"FlatEXPBonus"`
	PercentEXPBonus                     float32 `json:"PercentEXPBonus"`
	RPercentCooldownMod                 float32 `json:"rPercentCooldownMod"`
	RPercentCooldownModPerLevel         float32 `json:"rPercentCooldownModPerLevel"`
	RFlatTimeDeadMod                    float32 `json:"rFlatTimeDeadMod"`
	RFlatTimeDeadModPerLevel            float32 `json:"rFlatTimeDeadModPerLevel"`
	RPercentTimeDeadMod                 float32 `json:"rPercentTimeDeadMod"`
	RPercentTimeDeadModPerLevel         float32 `json:"rPercentTimeDeadModPerLevel"`
	RFlatGoldPer10Mod                   float32 `json:"rFlatGoldPer10Mod"`
	RFlatMagicPenetrationMod            float32 `json:"rFlatMagicPenetrationMod"`
	RFlatMagicPenetrationModPerLevel    float32 `json:"rFlatMagicPenetrationModPerLevel"`
	RPercentMagicPenetrationMod         float32 `json:"rPercentMagicPenetrationMod"`
	RPercentMagicPenetrationModPerLevel float32 `json:"rPercentMagicPenetrationModPerLevel"`
	FlatEnergyRegenMod                  float32 `json:"FlatEnergyRegenMod"`
	RFlatEnergyRegenModPerLevel         float32 `json:"rFlatEnergyRegenModPerLevel"`
	FlatEnergyPoolMod                   float32 `json:"FlatEnergyPoolMod"`
	RFlatEnergyModPerLevel              float32 `json:"rFlatEnergyModPerLevel"`
	PercentLifeStealMod                 float32 `json:"PercentLifeStealMod"`
	PercentSpellVampMod                 float32 `json:"PercentSpellVampMod"`
}

Stats contains all stats for a specific item

type SummonerDTO

type SummonerDTO struct {
	AccountID     string    `json:"accountId"`
	ID            string    `json:"id"`
	Name          string    `json:"name"`
	ProfileIcon   int       `json:"profileIconId"`
	PuuID         string    `json:"puuid"`
	SummonerLevel int64     `json:"summonerLevel"`
	RevisionDate  int64     `json:"revisionDate"`
	Timestamp     time.Time `json:"timestamp"`
}

SummonerDTO models the Riot API response for summoners endpoints

type SummonerSpell

type SummonerSpell struct {
	ID            string    `json:"id"`
	Name          string    `json:"name"`
	Description   string    `json:"description"`
	Tooltip       string    `json:"tooltip"`
	Maxrank       int       `json:"maxrank"`
	Cooldown      []float32 `json:"cooldown"`
	CooldownBurn  string    `json:"cooldownBurn"`
	Cost          []int     `json:"cost"`
	CostBurn      string    `json:"costBurn"`
	Key           string    `json:"key"`
	SummonerLevel int       `json:"summonerLevel"`
	Modes         []string  `json:"modes"`
	CostType      string    `json:"costType"`
	Maxammo       string    `json:"maxammo"`
	Range         []int     `json:"range"`
	RangeBurn     string    `json:"rangeBurn"`
	Image         struct {
		Full   string `json:"full"`
		Sprite string `json:"sprite"`
		Group  string `json:"group"`
		X      int    `json:"x"`
		Y      int    `json:"y"`
		W      int    `json:"w"`
		H      int    `json:"h"`
	} `json:"image"`
	Resource string `json:"resource"`

	Timestamp time.Time `json:"timestamp"`
}

SummonerSpell contains Summoner Spell information from Riot API

type SummonerSpellsList

type SummonerSpellsList map[string]SummonerSpell

SummonerSpellsList is used to pass around a list of summoner spells

type TeamStatsBansDTO

type TeamStatsBansDTO struct {
	ChampionID int `json:"championId"`
	PickTurn   int `json:"pickTurn"`
}

TeamStatsBansDTO contains bans in a match

type TeamStatsDTO

type TeamStatsDTO struct {
	TeamID               int                `json:"teamId"`
	Win                  string             `json:"win"`
	FirstBlood           bool               `json:"firstBlood"`
	FirstTower           bool               `json:"firstTower"`
	FirstInhibitor       bool               `json:"firstInhibitor"`
	FirstBaron           bool               `json:"firstBaron"`
	FirstDragon          bool               `json:"firstDragon"`
	FirstRiftHerald      bool               `json:"firstRiftHerald"`
	TowerKills           int                `json:"towerKills"`
	InhibitorKills       int                `json:"inhibitorKills"`
	BaronKills           int                `json:"baronKills"`
	DragonKills          int                `json:"dragonKills"`
	VilemawKills         int                `json:"vilemawKills"`
	RiftHeraldKills      int                `json:"riftHeraldKills"`
	DominionVictoryScore int                `json:"dominionVictoryScore"`
	Bans                 []TeamStatsBansDTO `json:"bans"`
}

TeamStatsDTO contains Team information

type Versions

type Versions []string

Versions holds all known LoL versions response from Data Dragon

Directories

Path Synopsis
Package riotclientrl is a utility package to check the Rate Limit responses of the Riot API and gives suggestions on how long to wait to avoid beeing rate limit
Package riotclientrl is a utility package to check the Rate Limit responses of the Riot API and gives suggestions on how long to wait to avoid beeing rate limit

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL