Documentation
¶
Overview ¶
This package is used to interact with all TFT endpoints.
- SpectatorV5
- LeagueV1
- MatchV1
- StatusV1
- SummonerV1
Note: this package is automatically generated.
Index ¶
- type Client
- type Division
- type GameMode
- type GameType
- type LeagueEntryV1DTO
- type LeagueItemV1DTO
- type LeagueListV1DTO
- type LeagueMiniSeriesV1DTO
- type LeagueTopRatedLadderEntryV1DTO
- type LeagueV1
- func (endpoint *LeagueV1) ByID(ctx context.Context, route PlatformRoute, leagueId string) (*LeagueListV1DTO, error)
- func (endpoint *LeagueV1) ChallengerByQueue(ctx context.Context, route PlatformRoute, queue string) (*LeagueListV1DTO, error)
- func (endpoint *LeagueV1) Entries(ctx context.Context, route PlatformRoute, tier Tier, division string, ...) ([]LeagueEntryV1DTO, error)
- func (endpoint *LeagueV1) EntriesByPUUID(ctx context.Context, route PlatformRoute, puuid string) ([]LeagueEntryV1DTO, error)
- func (endpoint *LeagueV1) GrandmasterByQueue(ctx context.Context, route PlatformRoute, queue string) (*LeagueListV1DTO, error)
- func (endpoint *LeagueV1) MasterByQueue(ctx context.Context, route PlatformRoute, queue string) (*LeagueListV1DTO, error)
- func (endpoint *LeagueV1) TopRatedLadder(ctx context.Context, route PlatformRoute, queue QueueType) ([]LeagueTopRatedLadderEntryV1DTO, error)
- type Map
- type MatchCompanionV1DTO
- type MatchInfoV1DTO
- type MatchMetadataV1DTO
- type MatchParticipantMissionsV1DTO
- type MatchParticipantV1DTO
- type MatchTraitV1DTO
- type MatchUnitV1DTO
- type MatchV1
- type MatchV1DTO
- type PlatformRoute
- type Queue
- type QueueType
- type SpectatorBannedChampionV5DTO
- type SpectatorCurrentGameInfoV5DTO
- type SpectatorCurrentGameParticipantV5DTO
- type SpectatorGameCustomizationObjectV5DTO
- type SpectatorObserverV5DTO
- type SpectatorPerksV5DTO
- type SpectatorV5
- type StatusContentV1DTO
- type StatusPlatformDataV1DTO
- type StatusUpdateV1DTO
- type StatusV1
- type StatusV1DTO
- type SummonerV1
- type SummonerV1DTO
- type Team
- type Tier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
SpectatorV5 SpectatorV5
LeagueV1 LeagueV1
MatchV1 MatchV1
StatusV1 StatusV1
SummonerV1 SummonerV1
}
func NewTFTClient ¶
Creates a new TFT Client using the internal.Client provided.
type Division ¶
type Division string
Teamfight Tactics rank divisions, I, II, III, IV, and (deprecated) V.
type GameMode ¶
type GameMode string
Teamfight Tactics game modes, such as Classic, ARAM, URF, One For All, Ascension, etc.
const ( // Teamfight Tactics. TFT_GAMEMODE GameMode = "TFT" )
type GameType ¶
type GameType string
Teamfight Tactics game types: matched game, custom game, or tutorial game.
type LeagueEntryV1DTO ¶
type LeagueEntryV1DTO struct {
// Not included for the RANKED_TFT_TURBO queueType.
LeagueID string `json:"leagueId,omitempty"`
// Player Universal Unique Identifier. Exact length of 78 characters. (Encrypted)
PUUID string `json:"puuid,omitempty"`
QueueType QueueType `json:"queueType,omitempty"`
// The player's division within a tier. Not included for the RANKED_TFT_TURBO queueType.
Rank Division `json:"rank,omitempty"`
// Only included for the RANKED_TFT_TURBO queueType.
//
// (Legal values: ORANGE, PURPLE, BLUE, GREEN, GRAY)
RatedTier string `json:"ratedTier,omitempty"`
// Not included for the RANKED_TFT_TURBO queueType.
Tier Tier `json:"tier,omitempty"`
// Not included for the RANKED_TFT_TURBO queueType.
MiniSeries LeagueMiniSeriesV1DTO `json:"miniSeries"`
// Not included for the RANKED_TFT_TURBO queueType.
LeaguePoints int `json:"leaguePoints,omitempty"`
// Second through eighth placement.
Losses int `json:"losses,omitempty"`
// Only included for the RANKED_TFT_TURBO queueType.
RatedRating int `json:"ratedRating,omitempty"`
// First placement.
Wins int `json:"wins,omitempty"`
// Not included for the RANKED_TFT_TURBO queueType.
FreshBlood bool `json:"freshBlood,omitempty"`
// Not included for the RANKED_TFT_TURBO queueType.
HotStreak bool `json:"hotStreak,omitempty"`
// Not included for the RANKED_TFT_TURBO queueType.
Inactive bool `json:"inactive,omitempty"`
// Not included for the RANKED_TFT_TURBO queueType.
Veteran bool `json:"veteran,omitempty"`
}
tft-league-v1.LeagueEntryDTO
type LeagueItemV1DTO ¶
type LeagueItemV1DTO struct {
// Player's encrypted puuid.
PUUID string `json:"puuid,omitempty"`
Rank Division `json:"rank,omitempty"`
MiniSeries LeagueMiniSeriesV1DTO `json:"miniSeries"`
LeaguePoints int `json:"leaguePoints,omitempty"`
// Second through eighth placement.
Losses int `json:"losses,omitempty"`
// First placement.
Wins int `json:"wins,omitempty"`
FreshBlood bool `json:"freshBlood,omitempty"`
HotStreak bool `json:"hotStreak,omitempty"`
Inactive bool `json:"inactive,omitempty"`
Veteran bool `json:"veteran,omitempty"`
}
tft-league-v1.LeagueItemDTO
type LeagueListV1DTO ¶
type LeagueListV1DTO struct {
LeagueID string `json:"leagueId,omitempty"`
Name string `json:"name,omitempty"`
Queue QueueType `json:"queue,omitempty"`
Tier Tier `json:"tier,omitempty"`
Entries []LeagueItemV1DTO `json:"entries,omitempty"`
}
tft-league-v1.LeagueListDTO
type LeagueMiniSeriesV1DTO ¶
type LeagueMiniSeriesV1DTO struct {
Progress string `json:"progress,omitempty"`
Losses int `json:"losses,omitempty"`
Target int `json:"target,omitempty"`
Wins int `json:"wins,omitempty"`
}
tft-league-v1.MiniSeriesDTO
type LeagueTopRatedLadderEntryV1DTO ¶
type LeagueTopRatedLadderEntryV1DTO struct {
// Player's encrypted puuid.
PUUID string `json:"puuid,omitempty"`
// (Legal values: ORANGE, PURPLE, BLUE, GREEN, GRAY)
RatedTier string `json:"ratedTier,omitempty"`
PreviousUpdateLadderPosition int `json:"previousUpdateLadderPosition,omitempty"`
RatedRating int `json:"ratedRating,omitempty"`
// First placement.
Wins int `json:"wins,omitempty"`
}
tft-league-v1.TopRatedLadderEntryDto
type LeagueV1 ¶
type LeagueV1 struct {
// contains filtered or unexported fields
}
Riot API Reference ¶
func (*LeagueV1) ByID ¶
func (endpoint *LeagueV1) ByID(ctx context.Context, route PlatformRoute, leagueId string) (*LeagueListV1DTO, error)
Get league with given ID, including inactive entries.
Parameters ¶
- route: Route to query.
- leagueId: The UUID of the league.
Riot API Reference ¶
func (*LeagueV1) ChallengerByQueue ¶
func (endpoint *LeagueV1) ChallengerByQueue(ctx context.Context, route PlatformRoute, queue string) (*LeagueListV1DTO, error)
Get the challenger league.
Parameters ¶
- route: Route to query.
- queue (optional): Defaults to RANKED_TFT.
Riot API Reference ¶
func (*LeagueV1) Entries ¶
func (endpoint *LeagueV1) Entries(ctx context.Context, route PlatformRoute, tier Tier, division string, queue string, page int) ([]LeagueEntryV1DTO, error)
Get all the league entries.
Parameters ¶
- route: Route to query.
- tier
- division
- queue (optional): Defaults to RANKED_TFT.
- page (optional): Defaults to 1. Starts with page 1.
Riot API Reference ¶
func (*LeagueV1) EntriesByPUUID ¶ added in v2.5.0
func (endpoint *LeagueV1) EntriesByPUUID(ctx context.Context, route PlatformRoute, puuid string) ([]LeagueEntryV1DTO, error)
Get league entries in all queues for a given puuid
Parameters ¶
- route: Route to query.
- puuid
Riot API Reference ¶
func (*LeagueV1) GrandmasterByQueue ¶
func (endpoint *LeagueV1) GrandmasterByQueue(ctx context.Context, route PlatformRoute, queue string) (*LeagueListV1DTO, error)
Get the grandmaster league.
Parameters ¶
- route: Route to query.
- queue (optional): Defaults to RANKED_TFT.
Riot API Reference ¶
func (*LeagueV1) MasterByQueue ¶
func (endpoint *LeagueV1) MasterByQueue(ctx context.Context, route PlatformRoute, queue string) (*LeagueListV1DTO, error)
Get the master league.
Parameters ¶
- route: Route to query.
- queue (optional): Defaults to RANKED_TFT.
Riot API Reference ¶
func (*LeagueV1) TopRatedLadder ¶
func (endpoint *LeagueV1) TopRatedLadder(ctx context.Context, route PlatformRoute, queue QueueType) ([]LeagueTopRatedLadderEntryV1DTO, error)
Get the top rated ladder for given queue
Parameters ¶
- route: Route to query.
- queue
Riot API Reference ¶
type Map ¶ added in v2.2.0
type Map int
Teamfight Tactics maps.
const ( // Convergence // // Teamfight Tactics map CONVERGENCE_MAP Map = 22 )
type MatchCompanionV1DTO ¶
type MatchCompanionV1DTO struct {
ContentID string `json:"content_ID,omitempty"`
Species string `json:"species,omitempty"`
ItemID int `json:"item_ID,omitempty"`
SkinID int `json:"skin_ID,omitempty"`
}
tft-match-v1.CompanionDto
type MatchInfoV1DTO ¶
type MatchInfoV1DTO struct {
EndOfGameResult string `json:"endOfGameResult,omitempty"`
// Deprecated. Game variation key. Game variations documented in TFT static data.
//
// Deprecated
GameVariation string `json:"game_variation,omitempty"`
// Game client version.
GameVersion string `json:"game_version,omitempty"`
TFTGameType string `json:"tft_game_type,omitempty"`
TFTSetCoreName string `json:"tft_set_core_name,omitempty"`
Participants []MatchParticipantV1DTO `json:"participants,omitempty"`
GameCreation int `json:"gameCreation,omitempty"`
// Unix timestamp.
GameDatetime int `json:"game_datetime,omitempty"`
GameID int `json:"gameId,omitempty"`
// Game length in seconds.
GameLength float64 `json:"game_length,omitempty"`
MapID int `json:"mapId,omitempty"`
// Please refer to the League of Legends documentation.
QueueID Queue `json:"queueId,omitempty"`
// Please refer to the League of Legends documentation.
QueueID_ Queue `json:"queue_id,omitempty"`
// Teamfight Tactics set number.
TFTSetNumber int `json:"tft_set_number,omitempty"`
}
tft-match-v1.InfoDto
type MatchMetadataV1DTO ¶
type MatchMetadataV1DTO struct {
// Match data version.
DataVersion string `json:"data_version,omitempty"`
// Match id.
MatchID string `json:"match_id,omitempty"`
// A list of participant PUUIDs.
Participants []string `json:"participants,omitempty"`
}
tft-match-v1.MetadataDto
type MatchParticipantMissionsV1DTO ¶
type MatchParticipantMissionsV1DTO struct {
Assists int `json:"Assists,omitempty"`
DamageDealt int `json:"DamageDealt,omitempty"`
DamageDealtToObjectives int `json:"DamageDealtToObjectives,omitempty"`
DamageDealtToTurrets int `json:"DamageDealtToTurrets,omitempty"`
DamageTaken int `json:"DamageTaken,omitempty"`
Deaths int `json:"Deaths,omitempty"`
DoubleKills int `json:"DoubleKills,omitempty"`
GoldEarned int `json:"GoldEarned,omitempty"`
GoldSpent int `json:"GoldSpent,omitempty"`
InhibitorsDestroyed int `json:"InhibitorsDestroyed,omitempty"`
KillingSprees int `json:"KillingSprees,omitempty"`
Kills int `json:"Kills,omitempty"`
LargestKillingSpree int `json:"LargestKillingSpree,omitempty"`
LargestMultiKill int `json:"LargestMultiKill,omitempty"`
MagicDamageDealt int `json:"MagicDamageDealt,omitempty"`
MagicDamageDealtToChampions int `json:"MagicDamageDealtToChampions,omitempty"`
MagicDamageTaken int `json:"MagicDamageTaken,omitempty"`
NeutralMinionsKilledTeamJungle int `json:"NeutralMinionsKilledTeamJungle,omitempty"`
PentaKills int `json:"PentaKills,omitempty"`
PhysicalDamageDealt int `json:"PhysicalDamageDealt,omitempty"`
PhysicalDamageDealtToChampions int `json:"PhysicalDamageDealtToChampions,omitempty"`
PhysicalDamageTaken int `json:"PhysicalDamageTaken,omitempty"`
PlayerScore0 int `json:"PlayerScore0,omitempty"`
PlayerScore1 int `json:"PlayerScore1,omitempty"`
PlayerScore10 int `json:"PlayerScore10,omitempty"`
PlayerScore11 int `json:"PlayerScore11,omitempty"`
PlayerScore2 int `json:"PlayerScore2,omitempty"`
PlayerScore3 int `json:"PlayerScore3,omitempty"`
PlayerScore4 int `json:"PlayerScore4,omitempty"`
PlayerScore5 int `json:"PlayerScore5,omitempty"`
PlayerScore6 int `json:"PlayerScore6,omitempty"`
PlayerScore9 int `json:"PlayerScore9,omitempty"`
QuadraKills int `json:"QuadraKills,omitempty"`
Spell1Casts int `json:"Spell1Casts,omitempty"`
Spell2Casts int `json:"Spell2Casts,omitempty"`
Spell3Casts int `json:"Spell3Casts,omitempty"`
Spell4Casts int `json:"Spell4Casts,omitempty"`
SummonerSpell1Casts int `json:"SummonerSpell1Casts,omitempty"`
TimeCcothers int `json:"TimeCCOthers,omitempty"`
TotalDamageDealtToChampions int `json:"TotalDamageDealtToChampions,omitempty"`
TotalMinionsKilled int `json:"TotalMinionsKilled,omitempty"`
TripleKills int `json:"TripleKills,omitempty"`
TrueDamageDealt int `json:"TrueDamageDealt,omitempty"`
TrueDamageDealtToChampions int `json:"TrueDamageDealtToChampions,omitempty"`
TrueDamageTaken int `json:"TrueDamageTaken,omitempty"`
UnrealKills int `json:"UnrealKills,omitempty"`
VisionScore int `json:"VisionScore,omitempty"`
WardsKilled int `json:"WardsKilled,omitempty"`
}
tft-match-v1.ParticipantMissionsDto
type MatchParticipantV1DTO ¶
type MatchParticipantV1DTO struct {
SkillTree map[string]int `json:"skill_tree,omitempty"`
PUUID string `json:"puuid,omitempty"`
RiotIDGameName string `json:"riotIdGameName,omitempty"`
RiotIDTagline string `json:"riotIdTagline,omitempty"`
Augments []string `json:"augments,omitempty"`
// A complete list of traits for the participant's active units.
Traits []MatchTraitV1DTO `json:"traits,omitempty"`
// A list of active units for the participant.
Units []MatchUnitV1DTO `json:"units,omitempty"`
// Participant's companion.
Companion MatchCompanionV1DTO `json:"companion"`
Missions MatchParticipantMissionsV1DTO `json:"missions"`
// Gold left after participant was eliminated.
GoldLeft int `json:"gold_left,omitempty"`
// The round the participant was eliminated in. Note: If the player was eliminated in stage 2-1 their last_round would be 5.
LastRound int `json:"last_round,omitempty"`
// Participant Little Legend level. Note: This is not the number of active units.
Level int `json:"level,omitempty"`
PartnerGroupID int `json:"partner_group_id,omitempty"`
// Participant placement upon elimination.
Placement int `json:"placement,omitempty"`
// Number of players the participant eliminated.
PlayersEliminated int `json:"players_eliminated,omitempty"`
PveScore int `json:"pve_score,omitempty"`
// The number of seconds before the participant was eliminated.
TimeEliminated float64 `json:"time_eliminated,omitempty"`
// Damage the participant dealt to other players.
TotalDamageToPlayers int `json:"total_damage_to_players,omitempty"`
PveWonrun bool `json:"pve_wonrun,omitempty"`
Win bool `json:"win,omitempty"`
}
tft-match-v1.ParticipantDto
type MatchTraitV1DTO ¶
type MatchTraitV1DTO struct {
// Trait name.
Name string `json:"name,omitempty"`
// Number of units with this trait.
NumUnits int `json:"num_units,omitempty"`
// Current style for this trait. (0 = No style, 1 = Bronze, 2 = Silver, 3 = Gold, 4 = Chromatic)
Style int `json:"style,omitempty"`
// Current active tier for the trait.
TierCurrent int `json:"tier_current,omitempty"`
// Total tiers for the trait.
TierTotal int `json:"tier_total,omitempty"`
}
tft-match-v1.TraitDto
type MatchUnitV1DTO ¶
type MatchUnitV1DTO struct {
// This field was introduced in patch 9.22 with data_version 2.
CharacterID string `json:"character_id,omitempty"`
// If a unit is chosen as part of the Fates set mechanic, the chosen trait will be indicated by this field. Otherwise this field is excluded from the response.
Chosen string `json:"chosen,omitempty"`
// Unit name. This field is often left blank.
Name string `json:"name,omitempty"`
ItemNames []string `json:"itemNames,omitempty"`
// A list of the unit's items. Please refer to the Teamfight Tactics documentation for item ids.
Items []int `json:"items,omitempty"`
// Unit rarity. This doesn't equate to the unit cost.
Rarity int `json:"rarity,omitempty"`
// Unit tier.
Tier int `json:"tier,omitempty"`
}
tft-match-v1.UnitDto
type MatchV1 ¶
type MatchV1 struct {
// contains filtered or unexported fields
}
Riot API Reference ¶
func (*MatchV1) ByID ¶
func (endpoint *MatchV1) ByID(ctx context.Context, route api.RegionalRoute, matchId string) (*MatchV1DTO, error)
Get a match by match id
Parameters ¶
- route: Route to query.
- matchId
Riot API Reference ¶
func (*MatchV1) ListByPUUID ¶
func (endpoint *MatchV1) ListByPUUID(ctx context.Context, route api.RegionalRoute, puuid string, start int, endTime int, startTime int, count int) ([]string, error)
Get a list of match ids by PUUID
Parameters ¶
- route: Route to query.
- puuid
- start (optional): Defaults to 0. Start index.
- endTime (optional): Epoch timestamp in seconds.
- startTime (optional): Epoch timestamp in seconds. The matchlist started storing timestamps on June 16th, 2021. Any matches played before June 16th, 2021 won't be included in the results if the startTime filter is set.
- count (optional): Defaults to 20. Number of match ids to return.
Riot API Reference ¶
type MatchV1DTO ¶
type MatchV1DTO struct {
// Match metadata.
Metadata MatchMetadataV1DTO `json:"metadata"`
// Match info.
Info MatchInfoV1DTO `json:"info"`
}
tft-match-v1.MatchDto
type PlatformRoute ¶
type PlatformRoute string
Platform routes for Teamfight Tactics.
const ( // Brazil. BR1 PlatformRoute = "br1" // Europe, Northeast. EUN1 PlatformRoute = "eun1" // Europe, West. EUW1 PlatformRoute = "euw1" // Japan. JP1 PlatformRoute = "jp1" // Korea. KR PlatformRoute = "kr" // Latin America, North. LA1 PlatformRoute = "la1" // Latin America, South. LA2 PlatformRoute = "la2" // Middle East and North Africa. ME1 PlatformRoute = "me1" // North America. NA1 PlatformRoute = "na1" // Oceania. OC1 PlatformRoute = "oc1" // Public Beta Environment, special beta testing platform. Located in North America. PBE1 PlatformRoute = "pbe1" // # Deprecated // // Philippines, moved into `sg2` on 2025-01-08. PH2 PlatformRoute = "ph2" // Russia RU PlatformRoute = "ru" // Singapore, Thailand, Philippines SG2 PlatformRoute = "sg2" // # Deprecated // // Thailand, moved into `sg2` on 2025-01-08. TH2 PlatformRoute = "th2" // Turkey TR1 PlatformRoute = "tr1" // Taiwan TW2 PlatformRoute = "tw2" // Vietnam VN2 PlatformRoute = "vn2" )
func (PlatformRoute) String ¶
func (route PlatformRoute) String() string
type Queue ¶ added in v2.2.0
type Queue int
Teamfight Tactics queues.
const ( // # Deprecated // // Ranked Teamfight Tactics (Double Up Workshop) games on Convergence CONVERGENCE_RANKED_TEAMFIGHT_TACTICS_DOUBLE_UP_WORKSHOP_1150_QUEUE Queue = 1150 // Ranked Teamfight Tactics (Double Up Workshop) games on Convergence CONVERGENCE_RANKED_TEAMFIGHT_TACTICS_DOUBLE_UP_WORKSHOP_QUEUE Queue = 1160 // Ranked Teamfight Tactics (Hyper Roll) games on Convergence CONVERGENCE_RANKED_TEAMFIGHT_TACTICS_HYPER_ROLL_QUEUE Queue = 1130 // Ranked Teamfight Tactics games on Convergence CONVERGENCE_RANKED_TEAMFIGHT_TACTICS_QUEUE Queue = 1100 // Teamfight Tactics 1v0 games on Convergence CONVERGENCE_TEAMFIGHT_TACTICS_1V0_QUEUE Queue = 1091 // Teamfight Tactics 2v0 games on Convergence CONVERGENCE_TEAMFIGHT_TACTICS_2V0_QUEUE Queue = 1092 // Teamfight Tactics (Choncc's Treasure) games on Convergence CONVERGENCE_TEAMFIGHT_TACTICS_CHONCCS_TREASURE_QUEUE Queue = 1210 // Teamfight Tactics: Pengu's Party games on Convergence CONVERGENCE_TEAMFIGHT_TACTICS_PENGUS_PARTY_QUEUE Queue = 6120 // Teamfight Tactics games on Convergence CONVERGENCE_TEAMFIGHT_TACTICS_QUEUE Queue = 1090 // Teamfight Tactics Revival: Festival of Beasts games on Convergence CONVERGENCE_TEAMFIGHT_TACTICS_REVIVAL_FESTIVAL_OF_BEASTS_QUEUE Queue = 6100 // Teamfight Tactics Revival: Remix Rumble games on Convergence CONVERGENCE_TEAMFIGHT_TACTICS_REVIVAL_REMIX_RUMBLE_QUEUE Queue = 6110 // Teamfight Tactics Set 3.5 Revival games on Convergence CONVERGENCE_TEAMFIGHT_TACTICS_SET_3_5_REVIVAL_QUEUE Queue = 6000 // Teamfight Tactics Simluation games on Convergence CONVERGENCE_TEAMFIGHT_TACTICS_SIMLUATION_QUEUE Queue = 1111 // Teamfight Tactics: Tocker's Trials games on Convergence CONVERGENCE_TEAMFIGHT_TACTICS_TOCKERS_TRIALS_QUEUE Queue = 1220 // Teamfight Tactics Tutorial games on Convergence CONVERGENCE_TEAMFIGHT_TACTICS_TUTORIAL_QUEUE Queue = 1110 )
type QueueType ¶
type QueueType string
Teamfight Tactics ranked queue types.
const ( // Ranked Teamfight Tactics (Double Up Workshop) games RANKED_TFT_DOUBLE_UP_QUEUETYPE QueueType = "RANKED_TFT_DOUBLE_UP" // # Deprecated // // Ranked Teamfight Tactics (Double Up Workshop) games RANKED_TFT_PAIRS_QUEUETYPE QueueType = "RANKED_TFT_PAIRS" // Ranked Teamfight Tactics games RANKED_TFT_QUEUETYPE QueueType = "RANKED_TFT" // Ranked Teamfight Tactics (Hyper Roll) games RANKED_TFT_TURBO_QUEUETYPE QueueType = "RANKED_TFT_TURBO" )
type SpectatorBannedChampionV5DTO ¶
type SpectatorBannedChampionV5DTO struct {
// The ID of the banned champion
ChampionID int `json:"championId,omitempty"`
// The turn during which the champion was banned
PickTurn int `json:"pickTurn,omitempty"`
// The ID of the team that banned the champion
TeamID Team `json:"teamId,omitempty"`
}
spectator-tft-v5.BannedChampion
type SpectatorCurrentGameInfoV5DTO ¶
type SpectatorCurrentGameInfoV5DTO struct {
// The game mode
GameMode GameMode `json:"gameMode,omitempty"`
// The game type
GameType GameType `json:"gameType,omitempty"`
// The observer information
Observers SpectatorObserverV5DTO `json:"observers"`
// The ID of the platform on which the game is being played
PlatformID string `json:"platformId,omitempty"`
// Banned champion information
BannedChampions []SpectatorBannedChampionV5DTO `json:"bannedChampions,omitempty"`
// The participant information
Participants []SpectatorCurrentGameParticipantV5DTO `json:"participants,omitempty"`
// The ID of the game
GameID int `json:"gameId,omitempty"`
// The amount of time in seconds that has passed since the game started
GameLength int `json:"gameLength,omitempty"`
// The queue type (queue types are documented on the Game Constants page)
GameQueueConfigID Queue `json:"gameQueueConfigId,omitempty"`
// The game start time represented in epoch milliseconds
GameStartTime int `json:"gameStartTime,omitempty"`
// The ID of the map
MapID Map `json:"mapId,omitempty"`
}
spectator-tft-v5.CurrentGameInfo
type SpectatorCurrentGameParticipantV5DTO ¶
type SpectatorCurrentGameParticipantV5DTO struct {
// The encrypted puuid of this participant. null when the player is anonym.
PUUID string `json:"puuid,omitempty"`
RiotID string `json:"riotId,omitempty"`
// List of Game Customizations
GameCustomizationObjects []SpectatorGameCustomizationObjectV5DTO `json:"gameCustomizationObjects,omitempty"`
// Perks/Runes Reforged Information
Perks SpectatorPerksV5DTO `json:"perks"`
// The ID of the champion played by this participant
ChampionID int `json:"championId,omitempty"`
// The ID of the profile icon used by this participant
ProfileIconID int `json:"profileIconId,omitempty"`
// The ID of the first summoner spell used by this participant
Spell1ID int `json:"spell1Id,omitempty"`
// The ID of the second summoner spell used by this participant
Spell2ID int `json:"spell2Id,omitempty"`
// The team ID of this participant, indicating the participant's team
TeamID Team `json:"teamId,omitempty"`
}
spectator-tft-v5.CurrentGameParticipant
type SpectatorGameCustomizationObjectV5DTO ¶
type SpectatorGameCustomizationObjectV5DTO struct {
// Category identifier for Game Customization
Category string `json:"category,omitempty"`
// Game Customization content
Content string `json:"content,omitempty"`
}
spectator-tft-v5.GameCustomizationObject
type SpectatorObserverV5DTO ¶
type SpectatorObserverV5DTO struct {
// Key used to decrypt the spectator grid game data for playback
EncryptionKey string `json:"encryptionKey,omitempty"`
}
spectator-tft-v5.Observer
type SpectatorPerksV5DTO ¶
type SpectatorPerksV5DTO struct {
// IDs of the perks/runes assigned.
PerkIDs []int `json:"perkIds,omitempty"`
// Primary runes path
PerkStyle int `json:"perkStyle,omitempty"`
// Secondary runes path
PerkSubStyle int `json:"perkSubStyle,omitempty"`
}
spectator-tft-v5.Perks
type SpectatorV5 ¶
type SpectatorV5 struct {
// contains filtered or unexported fields
}
Riot API Reference ¶
func (*SpectatorV5) CurrentGameInfoByPUUID ¶
func (endpoint *SpectatorV5) CurrentGameInfoByPUUID(ctx context.Context, route PlatformRoute, encryptedPUUID string) (*SpectatorCurrentGameInfoV5DTO, error)
Get current game information for the given puuid.
Parameters ¶
- route: Route to query.
- encryptedPUUID: The puuid of the summoner.
Riot API Reference ¶
type StatusContentV1DTO ¶
type StatusContentV1DTO struct {
Content string `json:"content,omitempty"`
Locale string `json:"locale,omitempty"`
}
tft-status-v1.ContentDto
type StatusPlatformDataV1DTO ¶
type StatusPlatformDataV1DTO struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Incidents []StatusV1DTO `json:"incidents,omitempty"`
Locales []string `json:"locales,omitempty"`
Maintenances []StatusV1DTO `json:"maintenances,omitempty"`
}
tft-status-v1.PlatformDataDto
type StatusUpdateV1DTO ¶
type StatusUpdateV1DTO struct {
Author string `json:"author,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
// (Legal values: riotclient, riotstatus, game)
PublishLocations []string `json:"publish_locations,omitempty"`
Translations []StatusContentV1DTO `json:"translations,omitempty"`
ID int `json:"id,omitempty"`
Publish bool `json:"publish,omitempty"`
}
tft-status-v1.UpdateDto
type StatusV1 ¶
type StatusV1 struct {
// contains filtered or unexported fields
}
Riot API Reference ¶
func (*StatusV1) Platform ¶
func (endpoint *StatusV1) Platform(ctx context.Context, route PlatformRoute) (*StatusPlatformDataV1DTO, error)
Get Teamfight Tactics status for the given platform.
Parameters ¶
- route: Route to query.
Riot API Reference ¶
type StatusV1DTO ¶
type StatusV1DTO struct {
ArchiveAt string `json:"archive_at,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
// (Legal values: info, warning, critical)
IncidentSeverity string `json:"incident_severity,omitempty"`
// (Legal values: scheduled, in_progress, complete)
MaintenanceStatus string `json:"maintenance_status,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
// (Legal values: windows, macos, android, ios, ps4, xbone, switch)
Platforms []string `json:"platforms,omitempty"`
Titles []StatusContentV1DTO `json:"titles,omitempty"`
Updates []StatusUpdateV1DTO `json:"updates,omitempty"`
ID int `json:"id,omitempty"`
}
tft-status-v1.StatusDto
type SummonerV1 ¶
type SummonerV1 struct {
// contains filtered or unexported fields
}
Riot API Reference ¶
func (*SummonerV1) ByAccessToken ¶
func (endpoint *SummonerV1) ByAccessToken(ctx context.Context, route PlatformRoute, accessToken string) (*SummonerV1DTO, error)
Get a summoner by access token.
Parameters ¶
- route: Route to query.
- accessToken: RSO access token.
Riot API Reference ¶
func (*SummonerV1) ByPUUID ¶
func (endpoint *SummonerV1) ByPUUID(ctx context.Context, route PlatformRoute, encryptedPUUID string) (*SummonerV1DTO, error)
Get a summoner by PUUID.
Parameters ¶
- route: Route to query.
- encryptedPUUID: Summoner ID
Riot API Reference ¶
type SummonerV1DTO ¶
type SummonerV1DTO struct {
// Encrypted summoner ID. This field is deprecated and will be removed. Use `puuid` instead.
//
// Deprecated
ID string `json:"id,omitempty"`
// Encrypted PUUID. Exact length of 78 characters.
PUUID string `json:"puuid,omitempty"`
// ID of the summoner icon associated with the summoner.
ProfileIconID int `json:"profileIconId,omitempty"`
// 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.
RevisionDate int `json:"revisionDate,omitempty"`
// Summoner level associated with the summoner.
SummonerLevel int `json:"summonerLevel,omitempty"`
}
tft-summoner-v1.SummonerDTO
type Team ¶ added in v2.2.0
type Team int
Team IDs for Teamfight Tactics.
const ( // Team ID zero for 2v2v2v2 Arena `CHERRY` game mode. (TODO: SUBJECT TO CHANGE?) ZERO Team = 0 // Blue team (bottom left on Summoner's Rift). BLUE Team = 100 // Red team (top right on Summoner's Rift). RED Team = 200 // "killerTeamId" when Baron Nashor spawns and kills Rift Herald. OTHER Team = 300 )