static

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package static provides methods to access static data and constant values used by the Riot API. These values will rarely be updated, only if e.g. a new season starts or a new game mode is added.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client provides access to static data provided by Riot data is fetched on the first call to each method and cached for further calls

func NewClient

func NewClient(doer internal.Doer, logger logrus.FieldLogger) *Client

NewClient returns a new client

func (*Client) ClearCaches

func (c *Client) ClearCaches()

ClearCaches clears caches for all methods

func (*Client) GetGameMode

func (c *Client) GetGameMode(mode string) (GameMode, error)

GetGameMode returns the game mode for the specified id or an error if no mode for the id exists

func (*Client) GetGameModes

func (c *Client) GetGameModes() ([]GameMode, error)

GetGameModes returns static data for game modes

func (*Client) GetGameType

func (c *Client) GetGameType(typ string) (GameType, error)

GetGameType returns the game type for the specified id or an error if no type for the id exists

func (*Client) GetGameTypes

func (c *Client) GetGameTypes() ([]GameType, error)

GetGameTypes returns static data for game types

func (*Client) GetMap

func (c *Client) GetMap(id int) (Map, error)

GetMap returns the map for the specified id or an error if no map for the id exists

func (*Client) GetMaps

func (c *Client) GetMaps() ([]Map, error)

GetMaps returns static data for maps

func (*Client) GetQueue

func (c *Client) GetQueue(id int) (Queue, error)

GetQueue returns the queue for the specified id or an error if no queue for the id exists

func (*Client) GetQueues

func (c *Client) GetQueues() ([]Queue, error)

GetQueues returns static data for queues

func (*Client) GetSeason

func (c *Client) GetSeason(id int) (Season, error)

GetSeason returns the season for the specified id or an error if no season for the id exists

func (*Client) GetSeasons

func (c *Client) GetSeasons() ([]Season, error)

GetSeasons returns static data for seasons

type GameMode

type GameMode struct {
	Mode        string `json:"gameMode"`
	Description string `json:"description"`
}

GameMode contains a description and name of a game mode

type GameType

type GameType struct {
	Type        string `json:"gameType"`
	Description string `json:"description"`
}

GameType contains a description and name of a game type

type Map

type Map struct {
	ID    int    `json:"mapId"`
	Name  string `json:"mapName"`
	Notes string `json:"notes"`
}

Map contains notes, an ID and a name for a map

type Queue

type Queue struct {
	ID          int    `json:"queueId"`
	Map         string `json:"map"`
	Description string `json:"description"`
	Notes       string `json:"notes"`
}

Queue contains a description and notes, and ID and a map for a queue

type Season

type Season struct {
	ID     int    `json:"id"`
	Season string `json:"season"`
}

Season contains an ID and a name for a season

Jump to

Keyboard shortcuts

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