go_poro

package module
v0.0.0-...-015e764 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: MIT Imports: 8 Imported by: 0

README

go-poro

Just a little go library allowing interaction with the leagueofgraph's website.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChampName

type ChampName league.ChampionName

func (ChampName) ToURI

func (c ChampName) ToURI() (string, error)

func (ChampName) Valid

func (c ChampName) Valid() (bool, error)

type Champion

type Champion struct {
	Name ChampName
	Tags []*Tag
}

type Config

type Config struct {
	BaseURL      string
	ChampionPath string
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(opts ...ConfigOption) Config

type ConfigOption

type ConfigOption = func(*Config)

func ConfigBaseUrlOpt

func ConfigBaseUrlOpt(url string) ConfigOption

type Poro

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

func New

func New(c Config) *Poro

func (Poro) GetSummoner

func (p Poro) GetSummoner(region league.Region, summoner SummonerName, champion ChampName) (*Summoner, error)

type Summoner

type Summoner struct {
	Name      SummonerName
	Region    league.Region
	Champions []*Champion
}

type SummonerName

type SummonerName string

func (SummonerName) ToFriendly

func (s SummonerName) ToFriendly() string

func (SummonerName) ToURI

func (s SummonerName) ToURI() string

type Tag

type Tag struct {
	Name        string
	Description string
	Colour      TagColour
}

type TagColour

type TagColour string
const (
	TagColourUnknown TagColour = ""
	TagColourGreen   TagColour = "green"
	TagColourYellow  TagColour = "yellow"
	TagColourRed     TagColour = "red"
)

Jump to

Keyboard shortcuts

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