tft

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

This package is used to interact with all TFT endpoints.

  • 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 {
	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 CompanionV1DTO added in v0.17.0

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

CompanionDto data object.

type ContentV1DTO added in v0.17.0

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

ContentDto data object.

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 InfoV1DTO added in v0.17.0

type InfoV1DTO struct {
	// 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   []ParticipantV1DTO `json:"participants,omitempty"`
	// Unix timestamp.
	GameDatetime int64 `json:"game_datetime,omitempty"`
	// Game length in seconds.
	GameLength float32 `json:"game_length,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"`
}

InfoDto data object.

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

LeagueEntryDTO data object.

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

LeagueItemDTO data object.

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

LeagueListDTO data object.

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) ([]TopRatedLadderEntryV1DTO, error)

Get the top rated ladder for given queue

Parameters

  • route : Route to query.
  • queue

Riot API Reference

tft-league-v1.getTopRatedLadder

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 MetadataV1DTO `json:"metadata,omitempty"`
	// Match info.
	Info InfoV1DTO `json:"info,omitempty"`
}

MatchDto data object.

type MetadataV1DTO added in v0.17.0

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

MetadataDto data object.

type MiniSeriesV1DTO added in v0.17.0

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

MiniSeriesDTO data object.

type ParticipantV1DTO added in v0.17.0

type ParticipantV1DTO struct {
	// Participant's companion.
	Companion CompanionV1DTO `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 []TraitV1DTO `json:"traits,omitempty"`
	// A list of active units for the participant.
	Units []UnitV1DTO `json:"units,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"`
}

ParticipantDto data object.

type PlatformDataV1DTO added in v0.17.0

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

PlatformDataDto data object.

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 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) (*PlatformDataV1DTO, 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    []ContentV1DTO `json:"titles,omitempty"`
	Updates   []UpdateV1DTO  `json:"updates,omitempty"`
	ID        int32          `json:"id,omitempty"`
}

StatusDto data object.

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

SummonerDTO data object.

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

type TopRatedLadderEntryV1DTO added in v0.17.0

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

TopRatedLadderEntryDto data object.

type TraitV1DTO added in v0.17.0

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

TraitDto data object.

type UnitV1DTO added in v0.17.0

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

UnitDto data object.

type UpdateV1DTO added in v0.17.0

type UpdateV1DTO 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     []ContentV1DTO `json:"translations,omitempty"`
	ID               int32          `json:"id,omitempty"`
	Publish          bool           `json:"publish,omitempty"`
}

UpdateDto data object.

Jump to

Keyboard shortcuts

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