tft

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

This package is used to interact with all TFT endpoints.

  • SpectatorV5
  • LeagueV1
  • MatchV1
  • StatusV1
  • SummonerV1

Note: this package is automatically generated.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.19.0

type Client struct {
	SpectatorV5 SpectatorV5
	LeagueV1    LeagueV1
	MatchV1     MatchV1
	StatusV1    StatusV1
	SummonerV1  SummonerV1
}

func NewTFTClient

func NewTFTClient(client *internal.Client) *Client

Creates a new TFT Client using the internal.Client provided.

type Division added in v0.17.0

type Division string

LoL and TFT rank divisions, I, II, III, IV, and (deprecated) V.

const (
	I   Division = "I"
	II  Division = "II"
	III Division = "III"
	IV  Division = "IV"
	// Deprecated
	V Division = "V"
)

func (Division) String added in v1.0.0

func (division Division) String() string

type GameMode added in v1.2.0

type GameMode string

League of Legends game mode, such as Classic, ARAM, URF, One For All, Ascension, etc.

const (
	// ARAM games
	ARAM GameMode = "ARAM"
	// All Random Summoner's Rift games
	ARSR GameMode = "ARSR"
	// Ascension games
	ASCENSION GameMode = "ASCENSION"
	// Blood Hunt Assassin games
	ASSASSINATE GameMode = "ASSASSINATE"
	// 2v2v2v2
	CHERRY_GAMEMODE GameMode = "CHERRY_GameMode"
	// Classic Summoner's Rift and Twisted Treeline games
	CLASSIC GameMode = "CLASSIC"
	// Dark Star: Singularity games
	DARKSTAR GameMode = "DARKSTAR"
	// Doom Bot games
	DOOMBOTSTEEMO GameMode = "DOOMBOTSTEEMO"
	// Snowdown Showdown games
	FIRSTBLOOD GameMode = "FIRSTBLOOD"
	// Nexus Blitz games
	GAMEMODEX GameMode = "GAMEMODEX"
	// Legend of the Poro King games
	KINGPORO GameMode = "KINGPORO"
	// Nexus Blitz games
	NEXUSBLITZ GameMode = "NEXUSBLITZ"
	// Dominion/Crystal Scar games
	ODIN GameMode = "ODIN"
	// Odyssey: Extraction games
	ODYSSEY GameMode = "ODYSSEY"
	// One for All games
	ONEFORALL GameMode = "ONEFORALL"
	// Practice tool training games.
	PRACTICETOOL GameMode = "PRACTICETOOL"
	// PROJECT: Hunters games
	PROJECT GameMode = "PROJECT"
	// Nexus Siege games
	SIEGE GameMode = "SIEGE"
	// Star Guardian Invasion games
	STARGUARDIAN GameMode = "STARGUARDIAN"
	// Teamfight Tactics, used in `spectator-v4` endpoints.
	TFT GameMode = "TFT"
	// Tutorial games
	TUTORIAL GameMode = "TUTORIAL"
	// Tutorial: Welcome to League.
	TUTORIAL_MODULE_1 GameMode = "TUTORIAL_MODULE_1"
	// Tutorial: Power Up.
	TUTORIAL_MODULE_2 GameMode = "TUTORIAL_MODULE_2"
	// Tutorial: Shop for Gear.
	TUTORIAL_MODULE_3 GameMode = "TUTORIAL_MODULE_3"
	// Ultimate Spellbook games
	ULTBOOK GameMode = "ULTBOOK"
	// URF games
	URF GameMode = "URF"
)

func (GameMode) String added in v1.2.0

func (gameMode GameMode) String() string

type GameType added in v1.2.0

type GameType string

TFT game type: matched game, custom game, or tutorial game.

const (
	// Custom games
	CUSTOM_GAME GameType = "CUSTOM_GAME"
	// all other games
	MATCHED_GAME GameType = "MATCHED_GAME"
	// Tutorial games
	TUTORIAL_GAME GameType = "TUTORIAL_GAME"
)

func (GameType) String added in v1.2.0

func (gameType GameType) String() string

type LeagueEntryV1DTO added in v0.17.0

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"`
	// Player's encrypted summonerId.
	SummonerID   string `json:"summonerId,omitempty"`
	SummonerName string `json:"summonerName,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,omitempty"`
	// Not included for the RANKED_TFT_TURBO queueType.
	LeaguePoints int32 `json:"leaguePoints,omitempty"`
	// Second through eighth placement.
	Losses int32 `json:"losses,omitempty"`
	// Only included for the RANKED_TFT_TURBO queueType.
	RatedRating int32 `json:"ratedRating,omitempty"`
	// First placement.
	Wins int32 `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 added in v0.17.0

type LeagueItemV1DTO struct {
	Rank Division `json:"rank,omitempty"`
	// Player's encrypted summonerId.
	SummonerID   string                `json:"summonerId,omitempty"`
	SummonerName string                `json:"summonerName,omitempty"`
	MiniSeries   LeagueMiniSeriesV1DTO `json:"miniSeries,omitempty"`
	LeaguePoints int32                 `json:"leaguePoints,omitempty"`
	// Second through eighth placement.
	Losses int32 `json:"losses,omitempty"`
	// First placement.
	Wins       int32 `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 added in v0.17.0

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 added in v1.1.0

type LeagueMiniSeriesV1DTO struct {
	Progress string `json:"progress,omitempty"`
	Losses   int32  `json:"losses,omitempty"`
	Target   int32  `json:"target,omitempty"`
	Wins     int32  `json:"wins,omitempty"`
}

tft-league-v1.MiniSeriesDTO

type LeagueTopRatedLadderEntryV1DTO added in v1.1.0

type LeagueTopRatedLadderEntryV1DTO struct {
	// (Legal values:  ORANGE,  PURPLE,  BLUE,  GREEN,  GRAY)
	RatedTier                    string `json:"ratedTier,omitempty"`
	SummonerID                   string `json:"summonerId,omitempty"`
	SummonerName                 string `json:"summonerName,omitempty"`
	PreviousUpdateLadderPosition int32  `json:"previousUpdateLadderPosition,omitempty"`
	RatedRating                  int32  `json:"ratedRating,omitempty"`
	// First placement.
	Wins int32 `json:"wins,omitempty"`
}

tft-league-v1.TopRatedLadderEntryDto

type LeagueV1 added in v0.17.0

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

Riot API Reference

tft-league-v1

func (*LeagueV1) ByID added in v0.17.0

func (e *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

tft-league-v1.getLeagueById

func (*LeagueV1) ChallengerByQueue added in v0.17.0

func (e *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

tft-league-v1.getChallengerLeague

func (*LeagueV1) Entries added in v0.17.0

func (e *LeagueV1) Entries(ctx context.Context, route PlatformRoute, tier Tier, division string, queue string, page int32) ([]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

tft-league-v1.getLeagueEntries

func (*LeagueV1) GrandmasterByQueue added in v0.17.0

func (e *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

tft-league-v1.getGrandmasterLeague

func (*LeagueV1) MasterByQueue added in v0.17.0

func (e *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

tft-league-v1.getMasterLeague

func (*LeagueV1) SummonerEntries added in v0.17.0

func (e *LeagueV1) SummonerEntries(ctx context.Context, route PlatformRoute, summonerId string) ([]LeagueEntryV1DTO, error)

Get league entries for a given summoner ID.

Parameters

  • route : Route to query.
  • summonerId

Riot API Reference

tft-league-v1.getLeagueEntriesForSummoner

func (*LeagueV1) TopRatedLadder added in v0.17.0

func (e *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

tft-league-v1.getTopRatedLadder

type MatchCompanionV1DTO added in v1.1.0

type MatchCompanionV1DTO struct {
	ContentID string `json:"content_ID,omitempty"`
	Species   string `json:"species,omitempty"`
	ItemID    int32  `json:"item_ID,omitempty"`
	SkinID    int32  `json:"skin_ID,omitempty"`
}

tft-match-v1.CompanionDto

type MatchInfoV1DTO added in v1.1.0

type MatchInfoV1DTO struct {
	EndOfGameResult string `json:"endOfGameResult,omitempty"`
	// Game variation key. Game variations documented in TFT static data.
	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   int64                   `json:"gameCreation,omitempty"`
	// Unix timestamp.
	GameDatetime int64 `json:"game_datetime,omitempty"`
	GameID       int64 `json:"gameId,omitempty"`
	MapID        int64 `json:"mapId,omitempty"`
	// Game length in seconds.
	GameLength float32 `json:"game_length,omitempty"`
	// Please refer to the League of Legends documentation.
	QueueID int32 `json:"queueId,omitempty"`
	// Please refer to the League of Legends documentation.
	QueueID_ int32 `json:"queue_id,omitempty"`
	// Teamfight Tactics set number.
	TFTSetNumber int32 `json:"tft_set_number,omitempty"`
}

tft-match-v1.InfoDto

type MatchMetadataV1DTO added in v1.1.0

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 added in v1.2.0

type MatchParticipantMissionsV1DTO struct {
	Assists                        int32 `json:"Assists,omitempty"`
	DamageDealt                    int32 `json:"DamageDealt,omitempty"`
	DamageDealtToObjectives        int32 `json:"DamageDealtToObjectives,omitempty"`
	DamageDealtToTurrets           int32 `json:"DamageDealtToTurrets,omitempty"`
	DamageTaken                    int32 `json:"DamageTaken,omitempty"`
	DoubleKills                    int32 `json:"DoubleKills,omitempty"`
	GoldEarned                     int32 `json:"GoldEarned,omitempty"`
	GoldSpent                      int32 `json:"GoldSpent,omitempty"`
	InhibitorsDestroyed            int32 `json:"InhibitorsDestroyed,omitempty"`
	Kills                          int32 `json:"Kills,omitempty"`
	LargestKillingSpree            int32 `json:"LargestKillingSpree,omitempty"`
	LargestMultiKill               int32 `json:"LargestMultiKill,omitempty"`
	MagicDamageDealt               int32 `json:"MagicDamageDealt,omitempty"`
	MagicDamageDealtToChampions    int32 `json:"MagicDamageDealtToChampions,omitempty"`
	NeutralMinionsKilledTeamJungle int32 `json:"NeutralMinionsKilledTeamJungle,omitempty"`
	PhysicalDamageDealt            int32 `json:"PhysicalDamageDealt,omitempty"`
	PhysicalDamageTaken            int32 `json:"PhysicalDamageTaken,omitempty"`
	PlayerScore0                   int32 `json:"PlayerScore0,omitempty"`
	PlayerScore1                   int32 `json:"PlayerScore1,omitempty"`
	PlayerScore10                  int32 `json:"PlayerScore10,omitempty"`
	PlayerScore11                  int32 `json:"PlayerScore11,omitempty"`
	PlayerScore2                   int32 `json:"PlayerScore2,omitempty"`
	PlayerScore3                   int32 `json:"PlayerScore3,omitempty"`
	PlayerScore4                   int32 `json:"PlayerScore4,omitempty"`
	PlayerScore5                   int32 `json:"PlayerScore5,omitempty"`
	PlayerScore6                   int32 `json:"PlayerScore6,omitempty"`
	PlayerScore9                   int32 `json:"PlayerScore9,omitempty"`
	QuadraKills                    int32 `json:"QuadraKills,omitempty"`
	Spell1Casts                    int32 `json:"Spell1Casts,omitempty"`
	Spell2Casts                    int32 `json:"Spell2Casts,omitempty"`
	Spell3Casts                    int32 `json:"Spell3Casts,omitempty"`
	Spell4Casts                    int32 `json:"Spell4Casts,omitempty"`
	SummonerSpell1Casts            int32 `json:"SummonerSpell1Casts,omitempty"`
	TimeCcothers                   int32 `json:"TimeCCOthers,omitempty"`
	TotalMinionsKilled             int32 `json:"TotalMinionsKilled,omitempty"`
	TrueDamageDealtToChampions     int32 `json:"TrueDamageDealtToChampions,omitempty"`
	UnrealKills                    int32 `json:"UnrealKills,omitempty"`
	VisionScore                    int32 `json:"VisionScore,omitempty"`
	WardsKilled                    int32 `json:"WardsKilled,omitempty"`
}

tft-match-v1.ParticipantMissionsDto

type MatchParticipantV1DTO added in v1.1.0

type MatchParticipantV1DTO struct {
	// Participant's companion.
	Companion MatchCompanionV1DTO `json:"companion,omitempty"`
	PUUID     string              `json:"puuid,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"`
	Missions MatchParticipantMissionsV1DTO `json:"missions,omitempty"`
	// Gold left after participant was eliminated.
	GoldLeft int32 `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 int32 `json:"last_round,omitempty"`
	// Participant Little Legend level. Note: This is not the number of active units.
	Level          int32 `json:"level,omitempty"`
	PartnerGroupID int32 `json:"partner_group_id,omitempty"`
	// Participant placement upon elimination.
	Placement int32 `json:"placement,omitempty"`
	// Number of players the participant eliminated.
	PlayersEliminated int32 `json:"players_eliminated,omitempty"`
	// The number of seconds before the participant was eliminated.
	TimeEliminated float32 `json:"time_eliminated,omitempty"`
	// Damage the participant dealt to other players.
	TotalDamageToPlayers int32 `json:"total_damage_to_players,omitempty"`
}

tft-match-v1.ParticipantDto

type MatchTraitV1DTO added in v1.1.0

type MatchTraitV1DTO struct {
	// Trait name.
	Name string `json:"name,omitempty"`
	// Number of units with this trait.
	NumUnits int32 `json:"num_units,omitempty"`
	// Current style for this trait. (0 = No style, 1 = Bronze, 2 = Silver, 3 = Gold, 4 = Chromatic)
	Style int32 `json:"style,omitempty"`
	// Current active tier for the trait.
	TierCurrent int32 `json:"tier_current,omitempty"`
	// Total tiers for the trait.
	TierTotal int32 `json:"tier_total,omitempty"`
}

tft-match-v1.TraitDto

type MatchUnitV1DTO added in v1.1.0

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 []int32 `json:"items,omitempty"`
	// Unit rarity. This doesn't equate to the unit cost.
	Rarity int32 `json:"rarity,omitempty"`
	// Unit tier.
	Tier int32 `json:"tier,omitempty"`
}

tft-match-v1.UnitDto

type MatchV1 added in v0.17.0

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

Riot API Reference

tft-match-v1

func (*MatchV1) ByID added in v0.17.0

func (e *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

tft-match-v1.getMatch

func (*MatchV1) ListByPUUID added in v0.17.0

func (e *MatchV1) ListByPUUID(ctx context.Context, route api.RegionalRoute, puuid string, start int32, endTime int64, startTime int64, count int32) ([]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

tft-match-v1.getMatchIdsByPUUID

type MatchV1DTO added in v0.17.0

type MatchV1DTO struct {
	// Match metadata.
	Metadata MatchMetadataV1DTO `json:"metadata,omitempty"`
	// Match info.
	Info MatchInfoV1DTO `json:"info,omitempty"`
}

tft-match-v1.MatchDto

type PlatformRoute added in v0.17.0

type PlatformRoute string

Platform routes for League of Legends (LoL), Teamfight Tactics (TFT).

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"
	// North America.
	NA1 PlatformRoute = "na1"
	// Oceania.
	OC1 PlatformRoute = "oc1"
	// Public Beta Environment, special beta testing platform. Located in North America.
	PBE1 PlatformRoute = "pbe1"
	// Philippines
	PH2 PlatformRoute = "ph2"
	// Russia
	RU PlatformRoute = "ru"
	// Singapore
	SG2 PlatformRoute = "sg2"
	// Thailand
	TH2 PlatformRoute = "th2"
	// Turkey
	TR1 PlatformRoute = "tr1"
	// Taiwan
	TW2 PlatformRoute = "tw2"
	// Vietnam
	VN2 PlatformRoute = "vn2"
)

func (PlatformRoute) String added in v1.0.0

func (route PlatformRoute) String() string

type QueueType

type QueueType string

TFT ranked queue types.

const (
	// Ranked Teamfight Tactics games
	RANKED_TFT QueueType = "RANKED_TFT"
	// Ranked Teamfight Tactics (Double Up Workshop) games
	RANKED_TFT_DOUBLE_UP QueueType = "RANKED_TFT_DOUBLE_UP"
	// Ranked Teamfight Tactics (Double Up Workshop) games
	//
	// Deprecated
	RANKED_TFT_PAIRS QueueType = "RANKED_TFT_PAIRS"
	// Ranked Teamfight Tactics (Hyper Roll) games
	RANKED_TFT_TURBO QueueType = "RANKED_TFT_TURBO"
)

func (QueueType) String added in v1.0.0

func (queue QueueType) String() string

type SpectatorBannedChampionV5DTO added in v1.2.0

type SpectatorBannedChampionV5DTO struct {
	// The ID of the banned champion
	ChampionID int64 `json:"championId,omitempty"`
	// The turn during which the champion was banned
	PickTurn int32 `json:"pickTurn,omitempty"`
	// The ID of the team that banned the champion
	TeamID int64 `json:"teamId,omitempty"`
}

spectator-tft-v5.BannedChampion

type SpectatorCurrentGameInfoV5DTO added in v1.2.0

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,omitempty"`
	// 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 int64 `json:"gameId,omitempty"`
	// The amount of time in seconds that has passed since the game started
	GameLength int64 `json:"gameLength,omitempty"`
	// The queue type (queue types are documented on the Game Constants page)
	GameQueueConfigID int64 `json:"gameQueueConfigId,omitempty"`
	// The game start time represented in epoch milliseconds
	GameStartTime int64 `json:"gameStartTime,omitempty"`
	// The ID of the map
	MapID int64 `json:"mapId,omitempty"`
}

spectator-tft-v5.CurrentGameInfo

type SpectatorCurrentGameParticipantV5DTO added in v1.2.0

type SpectatorCurrentGameParticipantV5DTO struct {
	// The encrypted puuid of this participant
	PUUID  string `json:"puuid,omitempty"`
	RiotID string `json:"riotId,omitempty"`
	// The encrypted summoner ID of this participant
	SummonerID string `json:"summonerId,omitempty"`
	// The summoner name of this participant
	SummonerName string `json:"summonerName,omitempty"`
	// List of Game Customizations
	GameCustomizationObjects []SpectatorGameCustomizationObjectV5DTO `json:"gameCustomizationObjects,omitempty"`
	// Perks/Runes Reforged Information
	Perks SpectatorPerksV5DTO `json:"perks,omitempty"`
	// The ID of the champion played by this participant
	ChampionID int64 `json:"championId,omitempty"`
	// The ID of the profile icon used by this participant
	ProfileIconID int64 `json:"profileIconId,omitempty"`
	// The ID of the first summoner spell used by this participant
	Spell1ID int64 `json:"spell1Id,omitempty"`
	// The ID of the second summoner spell used by this participant
	Spell2ID int64 `json:"spell2Id,omitempty"`
	// The team ID of this participant, indicating the participant's team
	TeamID int64 `json:"teamId,omitempty"`
}

spectator-tft-v5.CurrentGameParticipant

type SpectatorFeaturedGameInfoV5DTO added in v1.2.0

type SpectatorFeaturedGameInfoV5DTO struct {
	// The game mode
	//
	// (Legal values:  TFT)
	GameMode GameMode `json:"gameMode,omitempty"`
	// The game type
	//
	// (Legal values:  MATCHED)
	GameType GameType `json:"gameType,omitempty"`
	// The observer information
	Observers SpectatorObserverV5DTO `json:"observers,omitempty"`
	// 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 []SpectatorParticipantV5DTO `json:"participants,omitempty"`
	// The ID of the game
	GameID int64 `json:"gameId,omitempty"`
	// The amount of time in seconds that has passed since the game started
	GameLength int64 `json:"gameLength,omitempty"`
	// The queue type (queue types are documented on the Game Constants page)
	GameQueueConfigID int64 `json:"gameQueueConfigId,omitempty"`
	// The ID of the map
	MapID int64 `json:"mapId,omitempty"`
}

spectator-tft-v5.FeaturedGameInfo

type SpectatorFeaturedGamesV5DTO added in v1.2.0

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

spectator-tft-v5.FeaturedGames

type SpectatorGameCustomizationObjectV5DTO added in v1.2.0

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 added in v1.2.0

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

spectator-tft-v5.Observer

type SpectatorParticipantV5DTO added in v1.2.0

type SpectatorParticipantV5DTO struct {
	// Encrypted puuid of this participant
	PUUID  string `json:"puuid,omitempty"`
	RiotID string `json:"riotId,omitempty"`
	// Encrypted summoner ID of this participant
	SummonerID string `json:"summonerId,omitempty"`
	// The summoner name of this participant
	SummonerName string `json:"summonerName,omitempty"`
	// The ID of the champion played by this participant
	ChampionID int64 `json:"championId,omitempty"`
	// The ID of the profile icon used by this participant
	ProfileIconID int64 `json:"profileIconId,omitempty"`
	// The ID of the first summoner spell used by this participant
	Spell1ID int64 `json:"spell1Id,omitempty"`
	// The ID of the second summoner spell used by this participant
	Spell2ID int64 `json:"spell2Id,omitempty"`
	// The team ID of this participant, indicating the participant's team
	TeamID int64 `json:"teamId,omitempty"`
}

spectator-tft-v5.Participant

type SpectatorPerksV5DTO added in v1.2.0

type SpectatorPerksV5DTO struct {
	// IDs of the perks/runes assigned.
	PerkIDs []int64 `json:"perkIds,omitempty"`
	// Primary runes path
	PerkStyle int64 `json:"perkStyle,omitempty"`
	// Secondary runes path
	PerkSubStyle int64 `json:"perkSubStyle,omitempty"`
}

spectator-tft-v5.Perks

type SpectatorV5 added in v1.2.0

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

Riot API Reference

spectator-tft-v5

func (*SpectatorV5) CurrentGameInfoByPUUID added in v1.2.0

func (e *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

spectator-tft-v5.getCurrentGameInfoByPuuid

func (*SpectatorV5) Featured added in v1.2.0

Get list of featured games.

  • route : Route to query.

spectator-tft-v5.getFeaturedGames

type StatusContentV1DTO added in v1.1.0

type StatusContentV1DTO struct {
	Content string `json:"content,omitempty"`
	Locale  string `json:"locale,omitempty"`
}

tft-status-v1.ContentDto

type StatusPlatformDataV1DTO added in v1.1.0

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 added in v1.1.0

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               int32                `json:"id,omitempty"`
	Publish          bool                 `json:"publish,omitempty"`
}

tft-status-v1.UpdateDto

type StatusV1 added in v0.17.0

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

Riot API Reference

tft-status-v1

func (*StatusV1) Platform added in v0.17.0

func (e *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

tft-status-v1.getPlatformData

type StatusV1DTO added in v0.17.0

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        int32                `json:"id,omitempty"`
}

tft-status-v1.StatusDto

type SummonerV1 added in v0.17.0

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

Riot API Reference

tft-summoner-v1

func (*SummonerV1) ByAccessToken added in v0.17.0

func (e *SummonerV1) ByAccessToken(ctx context.Context, route PlatformRoute, authorization string) (*SummonerV1DTO, error)

Get a summoner by access token.

Parameters

  • route : Route to query.
  • Authorization (optional) : Bearer token.

Riot API Reference

tft-summoner-v1.getByAccessToken

func (*SummonerV1) ByAccountID added in v0.17.0

func (e *SummonerV1) ByAccountID(ctx context.Context, route PlatformRoute, encryptedAccountId string) (*SummonerV1DTO, error)

Get a summoner by account ID.

Parameters

  • route : Route to query.
  • encryptedAccountId

Riot API Reference

tft-summoner-v1.getByAccountId

func (*SummonerV1) ByName added in v0.17.0

func (e *SummonerV1) ByName(ctx context.Context, route PlatformRoute, summonerName string) (*SummonerV1DTO, error)

Get a summoner by summoner name.

Parameters

  • route : Route to query.
  • summonerName : Summoner Name

Riot API Reference

tft-summoner-v1.getBySummonerName

func (*SummonerV1) ByPUUID added in v0.17.0

func (e *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

tft-summoner-v1.getByPUUID

func (*SummonerV1) BySummonerID added in v0.17.0

func (e *SummonerV1) BySummonerID(ctx context.Context, route PlatformRoute, encryptedSummonerId string) (*SummonerV1DTO, error)

Get a summoner by summoner ID.

Parameters

  • route : Route to query.
  • encryptedSummonerId : Summoner ID

Riot API Reference

tft-summoner-v1.getBySummonerId

type SummonerV1DTO added in v0.17.0

type SummonerV1DTO struct {
	// Encrypted account ID. Max length 56 characters.
	AccountID string `json:"accountId,omitempty"`
	// Encrypted summoner ID. Max length 63 characters.
	ID string `json:"id,omitempty"`
	// Summoner name.
	Name string `json:"name,omitempty"`
	// Encrypted PUUID. Exact length of 78 characters.
	PUUID string `json:"puuid,omitempty"`
	// ID of the summoner icon associated with the summoner.
	ProfileIconID int32 `json:"profileIconId,omitempty"`
	// Date summoner was last modified specified as epoch milliseconds. The following events will update this timestamp: summoner name change, summoner level change, or profile icon change.
	RevisionDate int64 `json:"revisionDate,omitempty"`
	// Summoner level associated with the summoner.
	SummonerLevel int64 `json:"summonerLevel,omitempty"`
}

tft-summoner-v1.SummonerDTO

type Tier added in v0.17.0

type Tier string

LoL and TFT ranked tiers, such as gold, diamond, challenger, etc.

const (
	IRON        Tier = "IRON"
	BRONZE      Tier = "BRONZE"
	SILVER      Tier = "SILVER"
	GOLD        Tier = "GOLD"
	PLATINUM    Tier = "PLATINUM"
	EMERALD     Tier = "EMERALD"
	DIAMOND     Tier = "DIAMOND"
	MASTER      Tier = "MASTER"
	GRANDMASTER Tier = "GRANDMASTER"
	CHALLENGER  Tier = "CHALLENGER"
)

func (Tier) String added in v1.0.0

func (tier Tier) String() string

Jump to

Keyboard shortcuts

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