riot

package
v0.0.0-...-10a1391 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountActiveShardURL   = "/riot/account/v1/active-shards/by-game/%s/by-puuid/%s"
	AccountByPUUIDURL       = "/riot/account/v1/accounts/by-puuid/%s"
	AccountByRiotIDURL      = "/riot/account/v1/accounts/by-riot-id/%s/%s"
	AccountByAccessTokenURL = "/riot/account/v1/accounts/me"
)

Riot endpoint URLs.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountDTO

type AccountDTO struct {
	PUUID string `json:"puuid"`
	// This field may be excluded from the response if the account doesn't have a gameName.
	GameName string `json:"gameName,omitempty"`
	// This field may be excluded from the response if the account doesn't have a tagLine.
	TagLine string `json:"tagLine,omitempty"`
}

type AccountEndpoint

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

func (*AccountEndpoint) ByAccessToken

func (e *AccountEndpoint) ByAccessToken(accessToken string) (*AccountDTO, error)

Get account by access token.

func (*AccountEndpoint) ByID

func (e *AccountEndpoint) ByID(gameName string, tagLine string) (*AccountDTO, error)

Get account by riot ID.

func (*AccountEndpoint) ByPUUID

func (e *AccountEndpoint) ByPUUID(puuid string) (*AccountDTO, error)

Get account by PUUID.

func (*AccountEndpoint) PlayerActiveShard

func (e *AccountEndpoint) PlayerActiveShard(puuid string, game api.Game) (*ActiveShardDTO, error)

Get active shard for a player.

type ActiveShardDTO

type ActiveShardDTO struct {
	PUUID       string   `json:"puuid"`
	Game        api.Game `json:"game"`
	ActiveShard string   `json:"activeShard"`
}

type RiotClient

type RiotClient struct {
	Account *AccountEndpoint
	// contains filtered or unexported fields
}

func NewRiotClient

func NewRiotClient(client *internal.InternalClient) *RiotClient

Returns a new RiotClient using the InternalClient provided.

Jump to

Keyboard shortcuts

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