lol

package module
v0.0.0-...-46c5374 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2019 License: MIT Imports: 6 Imported by: 0

README

lol

API Client for League of Legends and Teamfight Tactics

GoDoc Go Report Card gopherbadger-tag-do-not-edit

SUPPORTED ENDPOINTS

CHAMPION-MASTERY-V4

  • /lol/champion-mastery/v4/champion-masteries/by-summoner/{encryptedSummonerId}
  • /lol/champion-mastery/v4/champion-masteries/by-summoner/{encryptedSummonerId}/by-champion/{championId}
  • /lol/champion-mastery/v4/scores/by-summoner/{encryptedSummonerId}

CHAMPION-V3

  • /lol/platform/v3/champion-rotations

LEAGUE-EXP-V3

  • /lol/league-exp/v4/entries/{queue}/{tier}/{division}

LEAGUE-V4

  • /lol/league/v4/challengerleagues/by-queue/{queue}
  • /lol/league/v4/entries/by-summoner/{encryptedSummonerId}
  • /lol/league/v4/entries/{queue}/{tier}/{division}
  • /lol/league/v4/grandmasterleagues/by-queue/{queue}
  • /lol/league/v4/leagues/{leagueId}
  • /lol/league/v4/masterleagues/by-queue/{queue}

LOL-STATUS-V3

  • /lol/status/v3/shard-data

MATCH-V4

  • /lol/match/v4/matches/{matchId}
  • /lol/match/v4/matchlists/by-account/{encryptedAccountId}
  • /lol/match/v4/timelines/by-match/{matchId}
  • /lol/match/v4/matches/by-tournament-code/{tournamentCode}/ids
  • /lol/match/v4/matches/{matchId}/by-tournament-code/{tournamentCode}

SPECTATOR-V4

  • /lol/spectator/v4/active-games/by-summoner/{encryptedSummonerId}
  • /lol/spectator/v4/featured-games

SUMMONER-v4

  • /lol/summoner/v4/summoners/by-account/{encryptedAccountId}
  • /lol/summoner/v4/summoners/by-name/{summonerName}
  • /lol/summoner/v4/summoners/by-puuid/{encryptedPUUID}
  • /lol/summoner/v4/summoners/{encryptedSummonerId}

TFT-LEAGUE-V1

  • /tft/league/v1/challenger
  • /tft/league/v1/entries/by-summoner/{encryptedSummonerId}
  • /tft/league/v1/entries/{tier}/{division}
  • /tft/league/v1/grandmaster
  • /tft/league/v1/leagues/{leagueId}
  • /tft/league/v1/master

TFT-MATCH-V1

  • /tft/match/v1/matches/by-puuid/{encryptedPUUID}/ids
  • /tft/match/v1/matches/{matchId}

TFT-SUMMONER-v1

  • /tft/summoner/v1/summoners/by-account/{encryptedAccountId}
  • /tft/summoner/v1/summoners/by-name/{summonerName}
  • /tft/summoner/v1/summoners/by-puuid/{encryptedPUUID}
  • /tft/summoner/v1/summoners/{encryptedSummonerId}

THIRD-PARTY-CODE-V4

  • /lol/platform/v4/third-party-code/by-summoner/{encryptedSummonerId}

TOURNAMENT-STUB-V4

  • /lol/tournament-stub/v4/codes
  • /lol/tournament-stub/v4/lobby-events/by-code/{tournamentCode}
  • /lol/tournament-stub/v4/providers
  • /lol/tournament-stub/v4/tournaments

TOURNAMENT-V4

  • /lol/tournament/v4/codes
  • /lol/tournament/v4/lobby-events/by-code/{tournamentCode}
  • /lol/tournament/v4/providers
  • /lol/tournament/v4/tournaments

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultHTTPClient default http client to use
	DefaultHTTPClient = &http.Client{
		Transport: &http.Transport{
			MaxIdleConnsPerHost: maxIdleConnections,
		},
		Timeout: time.Duration(requestTimeout) * time.Second,
	}
)

Functions

This section is empty.

Types

type BannedChampion

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

type ChampionInfo

type ChampionInfo struct {
	FreeChampionIDs              []int `json:"freeChampionIds"`
	FreeChampionIDsForNewPlayers []int `json:"freeChampionIdsForNewPlayers"`
	MaxNewPlayerLevel            int   `json:"maxNewPlayerLevel"`
}

type ChampionMasteryDTO

type ChampionMasteryDTO struct {
	ChampionLevel                int    `json:"championLevel"`
	ChestGranted                 bool   `json:"chestGranted"`
	ChampionPoints               int    `json:"championPoints"`
	ChampionPointsSinceLastLevel int    `json:"championPointsSinceLastLevel"`
	ChampionPointsUntilNextLevel int    `json:"championPointsUntilNextLevel"`
	SummonerID                   string `json:"summonerId"`
	TokensEarned                 int    `json:"tokensEarned"`
	ChampionID                   int    `json:"championId"`
	LastPlayTime                 int64  `json:"lastPlayTime"`
}

type Client

type Client struct {
	Token, Region string

	*LOL
	*TFT
	// contains filtered or unexported fields
}

Client API struct to League of Legends

func NewClient

func NewClient(token string, options ...ClientOption) (*Client, error)

NewClient returns interface to League of Legends API

type ClientOption

type ClientOption func(*Client) error

ClientOption is a func that operates on *Client

func WithHTTPClient

func WithHTTPClient(httpClient *http.Client) ClientOption

WithHTTPClient set the client http.Client and the sling http.Client

func WithRegion

func WithRegion(region string) ClientOption

WithRegion set the client region

func WithToken

func WithToken(token string) ClientOption

WithToken set the client token

type CurrentGameInfo

type CurrentGameInfo 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"`
	BannedChampions   []BannedChampion         `json:"bannedChampions"`
	Observers         Observer                 `json:"observers"`
	Participants      []CurrentGameParticipant `json:"participants"`
	GameLength        int64                    `json:"gameLength"`
	GameQueueConfigID int64                    `json:"gameQueueConfigId"`
}

type CurrentGameParticipant

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

type EntriesParams

type EntriesParams struct {
	Page string `url:"page,omitempty"`
}

type FeaturedGameInfo

type FeaturedGameInfo 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"`
	BannedChampions   []BannedChampion         `json:"bannedChampions"`
	Observers         Observer                 `json:"observers"`
	Participants      []CurrentGameParticipant `json:"participants"`
	GameLength        int64                    `json:"gameLength"`
	GameQueueConfigID int64                    `json:"gameQueueConfigId"`
}

type FeaturedGames

type FeaturedGames struct {
	ClientRefreshInterval int64              `json:"clientRefreshInterval"`
	GameList              []FeaturedGameInfo `json:"gameList"`
}

type GameCustomizationObject

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

type Incident

type Incident struct {
	Active    bool      `json:"active"`
	CreatedAt string    `json:"created_at"`
	ID        int       `json:"id"`
	Updates   []Message `json:"updates"`
}

type LOL

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

LOL provides methods to interface with lol resource

func NewLOL

func NewLOL(sling *sling.Sling) *LOL

NewLOL returns a new LOL

func (*LOL) ActiveGames

func (l *LOL) ActiveGames(encryptedSummonerID string) (*CurrentGameInfo, *http.Response, error)

ActiveGames GET /lol/spectator/v4/active-games/by-summoner/{encryptedSummonerId}

func (*LOL) AllChampionMastery

func (l *LOL) AllChampionMastery(encryptedSummonerID string) (*[]ChampionMasteryDTO, *http.Response, error)

AllChampionMastery GET /lol/champion-mastery/v4/champion-masteries/by-summoner/{encryptedSummonerID}

func (*LOL) ChallengerLeagues

func (l *LOL) ChallengerLeagues(queue string) (*LeagueListDTO, *http.Response, error)

ChallengerLeagues GET /lol/league/v4/challengerleagues/by-queue/{queue}

func (*LOL) ChampionMastery

func (l *LOL) ChampionMastery(encryptedSummonerID, championID string) (*ChampionMasteryDTO, *http.Response, error)

ChampionMastery GET /lol/champion-mastery/v4/champion-masteries/by-summoner/{encryptedSummonerID}/by-champion/{championID}

func (*LOL) ChampionRotations

func (l *LOL) ChampionRotations() (*ChampionInfo, *http.Response, error)

ChampionRotations GET /lol/platform/v3/champion-rotations

func (*LOL) Entries

func (l *LOL) Entries(queue, tier, division string, params *EntriesParams) ([]LeagueEntryDTO, *http.Response, error)

Entries GET /lol/league/v4/entries/{queue}/{tier}/{division}

func (*LOL) EntriesBySummoner

func (l *LOL) EntriesBySummoner(encryptedSummonerID string) ([]LeagueEntryDTO, *http.Response, error)

EntriesBySummoner GET /lol/league/v4/entries/by-summoner/{encryptedSummonerId}

func (*LOL) FeaturedGames

func (l *LOL) FeaturedGames() (*FeaturedGames, *http.Response, error)

FeaturedGames GET /lol/spectator/v4/featured-games

func (*LOL) GrandmasterLeagues

func (l *LOL) GrandmasterLeagues(queue string) (*LeagueListDTO, *http.Response, error)

GrandmasterLeagues GET /lol/league/v4/grandmasterleagues/by-queue/{queue}

func (*LOL) LeagueExpEntries

func (l *LOL) LeagueExpEntries(queue, tier, division string, params *LeagueExpEntriesParams) ([]LeagueEntryDTO, *http.Response, error)

LeagueExpEntries GET /lol/league-exp/v4/entries/{queue}/{tier}/{division}

func (*LOL) Leagues

func (l *LOL) Leagues(leagueID string) (*LeagueListDTO, *http.Response, error)

Leagues GET /lol/league/v4/leagues/{leagueId}

func (*LOL) MasterLeagues

func (l *LOL) MasterLeagues(queue string) (*LeagueListDTO, *http.Response, error)

MasterLeagues GET /lol/league/v4/masterleagues/by-queue/{queue}

func (*LOL) MasteryScore

func (l *LOL) MasteryScore(encryptedSummonerID string) (int, *http.Response, error)

MasteryScore GET /lol/champion-mastery/v4/scores/by-summoner/{encryptedSummonerID}

func (*LOL) Matches

func (l *LOL) Matches(matchID string) (*MatchDTO, *http.Response, error)

Matches GET /lol/match/v4/matches/{matchID}

func (*LOL) Matchlists

func (l *LOL) Matchlists(encryptedAccountID string, params *MatchlistsParams) (*MatchlistDTO, *http.Response, error)

Matchlists GET /lol/match/v4/matchlists/by-account/{encryptedAccountID}

func (*LOL) Status

func (l *LOL) Status() (*ShardStatus, *http.Response, error)

Status GET /lol/status/v3/shard-data

func (*LOL) SummonerByAccount

func (l *LOL) SummonerByAccount(encryptedAccountID string) (*SummonerDTO, *http.Response, error)

SummonerByAccount GET /lol/summoner/v4/summoners/by-account/{encryptedAccountID}

func (*LOL) SummonerByID

func (l *LOL) SummonerByID(encryptedID string) (*SummonerDTO, *http.Response, error)

SummonerByID GET /lol/summoner/v4/summoners/{encryptedID}

func (*LOL) SummonerByName

func (l *LOL) SummonerByName(summonerName string) (*SummonerDTO, *http.Response, error)

SummonerByName GET /lol/summoner/v4/summoners/by-name/{summonerName}

func (*LOL) SummonerByPUUID

func (l *LOL) SummonerByPUUID(encryptedPUUID string) (*SummonerDTO, *http.Response, error)

SummonerByPUUID GET /lol/summoner/v4/summoners/by-puuid/{encryptedPUUID}

func (*LOL) Timelines

func (l *LOL) Timelines(matchID string) (*MatchTimelineDTO, *http.Response, error)

Timelines GET /lol/match/v4/timelines/by-match/{matchID}

type LeagueEntryDTO

type LeagueEntryDTO struct {
	QueueType    string        `json:"queueType"`
	SummonerName string        `json:"summonerName"`
	HotStreak    bool          `json:"hotStreak"`
	MiniSeries   MiniSeriesDTO `json:"miniSeries"`
	Wins         int           `json:"wins"`
	Veteran      bool          `json:"veteran"`
	Losses       int           `json:"losses"`
	Rank         string        `json:"rank"`
	Tier         string        `json:"tier"`
	Inactive     bool          `json:"inactive"`
	FreshBlood   bool          `json:"freshBlood"`
	LeagueID     string        `json:"leagueId"`
	SummonerID   string        `json:"summonerId"`
	LeaguePoints int           `json:"leaguePoints"`
}

type LeagueExpEntriesParams

type LeagueExpEntriesParams struct {
	Page string `url:"page,omitempty"`
}

type LeagueItemDTO

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

type LeagueListDTO

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

type MasteryDTO

type MasteryDTO struct {
	MasteryID int
	Rank      int
}

type MatchDTO

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

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

type MatchFrameDTO

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

type MatchParicipantDTO

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

type MatchPositionDTO

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

type MatchReferenceDTO

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

type MatchTimelineDTO

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

type MatchlistDTO

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

type MatchlistsParams

type MatchlistsParams struct {
	Champion   []int `url:"champion"`
	Queue      []int `url:"queue"`
	Season     []int `url:"season"`
	EndTime    int   `url:"endTime"`
	BeginTime  int   `url:"beginTime"`
	EndIndex   int   `url:"endIndex"`
	BeginIndex int   `url:"beginIndex"`
}

type Message

type Message struct {
	Severity     string        `json:"severity"`
	Author       string        `json:"author"`
	CreatedAt    string        `json:"created_at"`
	Translations []Translation `json:"translations"`
	UpdatedAt    string        `json:"updated_at"`
	Content      string        `json:"content"`
	ID           string        `json:"id"`
}

type MiniSeriesDTO

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

type Observer

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

type Participant

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

type ParticipantDTO

type ParticipantDTO struct {
	Spell1ID      int                    `json:"spell1Id"`
	ParticipantID int                    `json:"participantId"`
	Timeline      ParticipantTimelineDTO `json:"timeline,omitempty"`
	Spell2ID      int                    `json:"spell2Id"`
	TeamID        int                    `json:"teamId"`
	Stats         ParticipantStatsDTO    `json:"stats"`
	ChampionID    int                    `json:"championId"`
	Masteries     []MasteryDTO           `json:"masteries"`
}

type ParticipantIdentityDTO

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

type ParticipantStatsDTO

type ParticipantStatsDTO struct {
	NeutralMinionsKilledTeamJungle  int  `json:"neutralMinionsKilledTeamJungle"`
	VisionScore                     int  `json:"visionScore"`
	MagicDamageDealtToChampions     int  `json:"magicDamageDealtToChampions"`
	LargestMultiKill                int  `json:"largestMultiKill"`
	TotalTimeCrowdControlDealt      int  `json:"totalTimeCrowdControlDealt"`
	LongestTimeSpentLiving          int  `json:"longestTimeSpentLiving"`
	Perk1Var1                       int  `json:"perk1Var1"`
	Perk1Var3                       int  `json:"perk1Var3"`
	Perk1Var2                       int  `json:"perk1Var2"`
	TripleKills                     int  `json:"tripleKills"`
	Perk5                           int  `json:"perk5"`
	Perk4                           int  `json:"perk4"`
	PlayerScore9                    int  `json:"playerScore9"`
	PlayerScore8                    int  `json:"playerScore8"`
	Kills                           int  `json:"kills"`
	PlayerScore1                    int  `json:"playerScore1"`
	PlayerScore0                    int  `json:"playerScore0"`
	PlayerScore3                    int  `json:"playerScore3"`
	PlayerScore2                    int  `json:"playerScore2"`
	PlayerScore5                    int  `json:"playerScore5"`
	PlayerScore4                    int  `json:"playerScore4"`
	PlayerScore7                    int  `json:"playerScore7"`
	PlayerScore6                    int  `json:"playerScore6"`
	Perk5Var1                       int  `json:"perk5Var1"`
	Perk5Var3                       int  `json:"perk5Var3"`
	Perk5Var2                       int  `json:"perk5Var2"`
	TotalScoreRank                  int  `json:"totalScoreRank"`
	NeutralMinionsKilled            int  `json:"neutralMinionsKilled"`
	StatPerk1                       int  `json:"statPerk1"`
	StatPerk0                       int  `json:"statPerk0"`
	DamageDealtToTurrets            int  `json:"damageDealtToTurrets"`
	PhysicalDamageDealtToChampions  int  `json:"physicalDamageDealtToChampions"`
	DamageDealtToObjectives         int  `json:"damageDealtToObjectives"`
	Perk2Var2                       int  `json:"perk2Var2"`
	Perk2Var3                       int  `json:"perk2Var3"`
	TotalUnitsHealed                int  `json:"totalUnitsHealed"`
	Perk2Var1                       int  `json:"perk2Var1"`
	Perk4Var1                       int  `json:"perk4Var1"`
	TotalDamageTaken                int  `json:"totalDamageTaken"`
	Perk4Var3                       int  `json:"perk4Var3"`
	WardsKilled                     int  `json:"wardsKilled"`
	LargestCriticalStrike           int  `json:"largestCriticalStrike"`
	LargestKillingSpree             int  `json:"largestKillingSpree"`
	QuadraKills                     int  `json:"quadraKills"`
	MagicDamageDealt                int  `json:"magicDamageDealt"`
	FirstBloodAssist                bool `json:"firstBloodAssist"`
	Item2                           int  `json:"item2"`
	Item3                           int  `json:"item3"`
	Item0                           int  `json:"item0"`
	Item1                           int  `json:"item1"`
	Item6                           int  `json:"item6"`
	Item4                           int  `json:"item4"`
	Item5                           int  `json:"item5"`
	Perk1                           int  `json:"perk1"`
	Perk0                           int  `json:"perk0"`
	Perk3                           int  `json:"perk3"`
	Perk2                           int  `json:"perk2"`
	Perk3Var3                       int  `json:"perk3Var3"`
	Perk3Var2                       int  `json:"perk3Var2"`
	Perk3Var1                       int  `json:"perk3Var1"`
	DamageSelfMitigated             int  `json:"damageSelfMitigated"`
	MagicalDamageTaken              int  `json:"magicalDamageTaken"`
	Perk0Var2                       int  `json:"perk0Var2"`
	FirstInhibitorKill              bool `json:"firstInhibitorKill"`
	TrueDamageTaken                 int  `json:"trueDamageTaken"`
	Assists                         int  `json:"assists"`
	Perk4Var2                       int  `json:"perk4Var2"`
	GoldSpent                       int  `json:"goldSpent"`
	TrueDamageDealt                 int  `json:"trueDamageDealt"`
	ParticipantID                   int  `json:"participantId"`
	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"`
	Deaths                          int  `json:"deaths"`
	WardsPlaced                     int  `json:"wardsPlaced"`
	PerkPrimaryStyle                int  `json:"perkPrimaryStyle"`
	PerkSubStyle                    int  `json:"perkSubStyle"`
	TurretKills                     int  `json:"turretKills"`
	FirstBloodKill                  bool `json:"firstBloodKill"`
	TrueDamageDealtToChampions      int  `json:"trueDamageDealtToChampions"`
	GoldEarned                      int  `json:"goldEarned"`
	KillingSprees                   int  `json:"killingSprees"`
	UnrealKills                     int  `json:"unrealKills"`
	FirstTowerAssist                bool `json:"firstTowerAssist"`
	FirstTowerKill                  bool `json:"firstTowerKill"`
	ChampLevel                      int  `json:"champLevel"`
	DoubleKills                     int  `json:"doubleKills"`
	InhibitorKills                  int  `json:"inhibitorKills"`
	FirstInhibitorAssist            bool `json:"firstInhibitorAssist"`
	Perk0Var1                       int  `json:"perk0Var1"`
	CombatPlayerScore               int  `json:"combatPlayerScore"`
	Perk0Var3                       int  `json:"perk0Var3"`
	VisionWardsBoughtInGame         int  `json:"visionWardsBoughtInGame"`
	PentaKills                      int  `json:"pentaKills"`
	TotalHeal                       int  `json:"totalHeal"`
	TotalMinionsKilled              int  `json:"totalMinionsKilled"`
	TimeCCingOthers                 int  `json:"timeCCingOthers"`
	StatPerk2                       int  `json:"statPerk2"`
}

type ParticipantTimelineDTO

type ParticipantTimelineDTO 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 Perks

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

type PlayerDTO

type PlayerDTO 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 Service

type Service struct {
	Status    string     `json:"status"`
	Incidents []Incident `json:"incidents"`
	Name      string     `json:"name"`
	Slug      string     `json:"slug"`
}

type ShardStatus

type ShardStatus struct {
	Name      string    `json:"name"`
	RegionTag string    `json:"region_tag"`
	Hostname  string    `json:"hostname"`
	Services  []Service `json:"services"`
	Slug      string    `json:"slug"`
	Locales   []string  `json:"locales"`
}

type SummonerDTO

type SummonerDTO struct {
	ProfileIconID int    `json:"profileIconId"`
	Name          string `json:"name"`
	Puuid         string `json:"puuid"`
	SummonerLevel int    `json:"summonerLevel"`
	AccountID     string `json:"accountId"`
	ID            string `json:"id"`
	RevisionDate  int64  `json:"revisionDate"`
}

type TFT

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

TFT provides methods to interface with tft resource

func NewTFT

func NewTFT(sling *sling.Sling) *TFT

NewTFT returns a new TFT

func (*TFT) Challenger

func (t *TFT) Challenger() (*LeagueListDTO, *http.Response, error)

Challenger GET /tft/league/v1/challenger

func (*TFT) Entries

func (t *TFT) Entries(tier, division string, params *EntriesParams) ([]LeagueEntryDTO, *http.Response, error)

Entries GET /tft/league/v1/entries/{tier}/{division}

func (*TFT) EntriesBySummoner

func (t *TFT) EntriesBySummoner(encryptedSummonerID string) ([]LeagueEntryDTO, *http.Response, error)

EntriesBySummoner GET /tft/league/v1/entries/by-summoner/{encryptedSummonerID}

func (*TFT) Grandmaster

func (t *TFT) Grandmaster() (*LeagueListDTO, *http.Response, error)

Grandmaster GET /tft/league/v1/grandmaster

func (*TFT) Leagues

func (t *TFT) Leagues(leagueID string) (*LeagueListDTO, *http.Response, error)

Leagues GET /tft/league/v1/leagues/{leagueID}

func (*TFT) Master

func (t *TFT) Master() (*LeagueListDTO, *http.Response, error)

Master GET /tft/league/v1/master

func (*TFT) MatchesByPUUID

func (t *TFT) MatchesByPUUID(encryptedPUUID string) ([]string, *http.Response, error)

MatchesByPUUID GET /tft/match/v1/matches/by-puuid/{encryptedPUUID}/ids

type TeamBansDTO

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

type TeamStatsDTO

type TeamStatsDTO struct {
	FirstDragon          bool          `json:"firstDragon"`
	Bans                 []TeamBansDTO `json:"bans"`
	FirstInhibitor       bool          `json:"firstInhibitor"`
	Win                  string        `json:"win"`
	FirstRiftHerald      bool          `json:"firstRiftHerald"`
	FirstBaron           bool          `json:"firstBaron"`
	BaronKills           int           `json:"baronKills"`
	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"`
	DragonKills          int           `json:"dragonKills"`
}

type Translation

type Translation struct {
	Locale    string `json:"locale"`
	Content   string `json:"content"`
	UpdatedAt string `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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