riotapi

package
v0.0.0-...-a64b0d9 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2017 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadRequest   = errors.New("riotapi: bad request")
	ErrNotFound     = errors.New("riotapi: not found")
	ErrRateLimit    = errors.New("riotapi: rate limit")
	ErrServerError  = errors.New("riotapi: server error")
	ErrUnauthorized = errors.New("riotapi: unauthorized")
)

Functions

func GetRecentGames

func GetRecentGames(id string, region string) ([]dataFormat.Game, error)

func GetTier

func GetTier(id string, region string) (string, error)

Returns tier as BRONZE, SILVER, etc. and error

func LoadAPIKey

func LoadAPIKey()

func ResolveSummonerId

func ResolveSummonerId(name string, region string) (string, string, error)

returns id, name, error

Types

type Game

type Game struct {
	FellowPlayers []Player
	GameType      string
	GameId        int
	TeamId        int
	GameMode      string
	ChampionId    int
	CreateDate    int64
	SubType       string
	Stats         Stats
}

type Player

type Player struct {
	ChampionId int
	TeamId     int
}

type Stats

type Stats struct {
	GoldEarned           int
	WardPlaced           int
	WardKilled           int
	Win                  bool
	DoubleKills          int
	TripleKills          int
	QuadraKills          int
	PentaKills           int
	UnrealKills          int
	NeutralMinionsKilled int
	TimePlayed           int
	ChampionsKilled      int
	Assists              int
	NumDeaths            int
	MinionsKilled        int
}

Jump to

Keyboard shortcuts

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