lor

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: MIT Imports: 4 Imported by: 0

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 GameMode added in v0.7.3

type GameMode string
const (
	ConstructedMode GameMode = "Constructed"
	ExpeditionsMode GameMode = "Expeditions"
	TutorialMode    GameMode = "Tutorial"
)

type GameType added in v0.7.3

type GameType string
const (
	Ranked           GameType = "Ranked"
	Normal           GameType = "Normal"
	AI               GameType = "AI"
	Tutorial         GameType = "Tutorial"
	VanillaTrial     GameType = "VanillaTrial"
	Singleton        GameType = "Singleton"
	StandardGauntlet GameType = "StandardGauntlet"
)

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 LeaderboardPlayersDTO struct {
	Name string `json:"name"`
	Rank int    `json:"rank"`
	// League points.
	Lp int `json:"lp"`
}

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
}

func (*MatchEndpoint) ByID added in v0.7.3

func (m *MatchEndpoint) ByID(region Region, matchID string) (*MatchDTO, error)

Get match by ID.

func (*MatchEndpoint) List added in v0.7.3

func (m *MatchEndpoint) List(region Region, PUUID string) ([]string, error)

Get a list of match ids by PUUID.

type MetadataDTO added in v0.7.3

type MetadataDTO struct {
	// Match data version.
	DataVersion string `json:"data_version"`
	// Match ID.
	MatchID string `json:"match_id"`
	// A list of participant PUUIDs.
	Participants []string `json:"participants"`
}

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 Region

type Region string
const (
	Americas Region = "americas"
	Europe   Region = "europe"
	SEA      Region = "sea"
)

Legends of Runeterra regions

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.

Jump to

Keyboard shortcuts

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