Documentation
¶
Index ¶
Constants ¶
View Source
const ( MatchByIDURL = "/lor/match/v1/matches/%s" MatchListURL = "/lor/match/v1/matches/by-puuid/%s/ids" RankedURL = "/lor/ranked/v1/leaderboards" StatusURL = "/lor/status/v1/platform-data" )
Legends of Runeterra endpoints
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InfoDTO ¶ added in v0.7.3
type InfoDTO struct {
GameMode GameMode `json:"game_mode"`
GameType GameType `json:"game_type"`
GameStartTimeUtc string `json:"game_start_time_utc"`
GameVersion string `json:"game_version"`
Players []PlayersDTO `json:"players"`
// Total turns taken by both players.
TotalTurnCount int `json:"total_turn_count"`
}
type LORClient ¶
type LORClient struct {
Match *MatchEndpoint
Ranked *RankedEndpoint
Status *StatusEndpoint
// contains filtered or unexported fields
}
func NewLORClient ¶
func NewLORClient(client *internal.InternalClient) *LORClient
Returns a new client using the API key provided.
type LeaderboardDTO ¶ added in v0.7.3
type LeaderboardDTO struct {
// A list of players in Master tier.
Players []LeaderboardPlayersDTO `json:"players"`
}
type LeaderboardPlayersDTO ¶ added in v0.7.3
type MatchDTO ¶ added in v0.7.3
type MatchDTO struct {
// Match metadata.
Metadata MetadataDTO `json:"metadata"`
// Match info.
Info InfoDTO `json:"info"`
}
type MatchEndpoint ¶ added in v0.7.3
type MatchEndpoint struct {
// contains filtered or unexported fields
}
type MetadataDTO ¶ added in v0.7.3
type PlayersDTO ¶ added in v0.7.3
type PlayersDTO struct {
PUUID string `json:"puuid"`
DeckID string `json:"deck_id"`
// Code for the deck played. Refer to LOR documentation for details on deck codes.
DeckCode string `json:"deck_code"`
Factions []string `json:"factions"`
GameOutcome string `json:"game_outcome"`
// The order in which the players took turns.
OrderOfPlay int `json:"order_of_play"`
}
type RankedEndpoint ¶ added in v0.7.3
type RankedEndpoint struct {
// contains filtered or unexported fields
}
func (*RankedEndpoint) Leaderboards ¶ added in v0.7.3
func (r *RankedEndpoint) Leaderboards(region Region) (*LeaderboardDTO, error)
Get the players in Master tier.
The leaderboard is updated once an hour.
type StatusEndpoint ¶
type StatusEndpoint struct {
// contains filtered or unexported fields
}
func (*StatusEndpoint) PlatformStatus ¶
func (s *StatusEndpoint) PlatformStatus(region Region) (*api.PlatformDataDTO, error)
Get Legends of Runeterra status for the given platform.
Click to show internal directories.
Click to hide internal directories.