lol

package
v0.2.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ChampionEndpointURL = "/lol/platform/v3/champion-rotations"
	StatusEndpointURL   = "/lol/status/v4/platform-data"
)

League of Legends endpoints

Variables

This section is empty.

Functions

This section is empty.

Types

type ChampionEndpoint

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

func (*ChampionEndpoint) FreeRotation

func (c *ChampionEndpoint) FreeRotation(region api.Region) (*ChampionInfo, error)

Get Free Champions Rotation

type ChampionInfo added in v0.2.2

type ChampionInfo struct {
	FreeChampionIds              []int `json:"freeChampionIds"`
	FreeChampionIdsForNewPlayers []int `json:"freeChampionIdsForNewPlayers"`
	MaxNewPlayerLevel            int   `json:"maxNewPlayerLevel"`
}

type ContentDto added in v0.2.2

type ContentDto struct {
	Content string `json:"content"`
	Locale  string `json:"locale"`
}

type LOLClient

type LOLClient struct {
	Champion *ChampionEndpoint
	Status   *StatusEndpoint
	// contains filtered or unexported fields
}

func NewLOLClient

func NewLOLClient(client *internal.InternalClient) *LOLClient

Creates a new LOLClient using a InternalClient

type PlatformDataDto added in v0.2.2

type PlatformDataDto struct {
	ID           string      `json:"id"`
	Name         string      `json:"name"`
	Locales      []string    `json:"locales"`
	Maintenances []StatusDto `json:"maintenances"`
	Incidents    []StatusDto `json:"incidents"`
}

type StatusDto added in v0.2.2

type StatusDto struct {
	ArchiveAt         time.Time    `json:"archive_at"`
	Titles            []ContentDto `json:"titles"`
	UpdatedAt         time.Time    `json:"updated_at"`
	IncidentSeverity  string       `json:"incident_severity"`
	Platforms         []string     `json:"platforms"`
	Updates           []UpdateDto  `json:"updates"`
	CreatedAt         time.Time    `json:"created_at"`
	ID                int          `json:"id"`
	MaintenanceStatus string       `json:"maintenance_status"`
}

type StatusEndpoint added in v0.2.2

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

func (*StatusEndpoint) Status added in v0.2.2

func (c *StatusEndpoint) Status(region api.Region) (*PlatformDataDto, error)

Get Status

type UpdateDto added in v0.2.2

type UpdateDto struct {
	UpdatedAt        string       `json:"updated_at"`
	Translations     []ContentDto `json:"translations"`
	Author           string       `json:"author"`
	Publish          bool         `json:"publish"`
	CreatedAt        time.Time    `json:"created_at"`
	ID               int          `json:"id"`
	PublishLocations []string     `json:"publish_locations"`
}

Jump to

Keyboard shortcuts

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