lcuapi

package module
v0.0.0-...-6f2a94b Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

README

lcu-driver

go ver. lcu-driver

inspired by lcu-driver

Documentation

Index

Constants

View Source
const MaxTickTimes = 10
View Source
const (
	OnJsonApiEventPrefixLen = len(`[8,"OnJsonApiEvent",`)
)

Variables

This section is empty.

Functions

func GET

func GET(uri string) (resp []byte, err error)

func GetChampionById

func GetChampionById(id int) model.Champion

func GetCurrentSummoner

func GetCurrentSummoner() (data model.Summoner, err error)

func GetItemById

func GetItemById(id int) model.Item

func GetMatchDetailsByGameId

func GetMatchDetailsByGameId(gameId int) (data model.MatchData, err error)

func GetMatchHistoryByPuuid

func GetMatchHistoryByPuuid(puuid string, begI, endI int) (data model.MatchHistory, err error)

func GetPerkById

func GetPerkById(id int) model.Perk

func GetPerkStyleById

func GetPerkStyleById(id int) model.PerkStyle

func GetProfileIconById

func GetProfileIconById(id int) model.ProfileIcon

func GetQueueById

func GetQueueById(id int) model.Queue

func GetRankedStatsByPuuid

func GetRankedStatsByPuuid(puuid string) (data model.RankedStats, err error)

func GetSpellById

func GetSpellById(id int) model.Spell

func GetSummonerByName

func GetSummonerByName(name string) (data model.Summoner, err error)

func GetUxProcessByPsutil

func GetUxProcessByPsutil() (*process.Process, error)

func GetUxProcessCommandlineMapByCmd

func GetUxProcessCommandlineMapByCmd() (mp map[string]string, err error)

func POST

func POST(uri string, body interface{}) (resp []byte, err error)

func Start

func Start(startCbs ...func() error) (chan error, error)

Types

type AssetsManager

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

func AssetsManagerInstance

func AssetsManagerInstance() *AssetsManager

func (*AssetsManager) Fill

func (a *AssetsManager) Fill(data interface{}) (err error)

func (*AssetsManager) GetChampionById

func (a *AssetsManager) GetChampionById(id int) model.Champion

func (*AssetsManager) GetItemById

func (a *AssetsManager) GetItemById(id int) model.Item

func (*AssetsManager) GetPerkById

func (a *AssetsManager) GetPerkById(id int) model.Perk

func (*AssetsManager) GetPerkStyleById

func (a *AssetsManager) GetPerkStyleById(id int) model.PerkStyle

func (*AssetsManager) GetProfileIconById

func (a *AssetsManager) GetProfileIconById(id int) model.ProfileIcon

func (*AssetsManager) GetQueueById

func (a *AssetsManager) GetQueueById(id int) model.Queue

func (*AssetsManager) GetSpellById

func (a *AssetsManager) GetSpellById(id int) model.Spell

func (*AssetsManager) GetTierByName

func (a *AssetsManager) GetTierByName(name string) model.Tier

func (*AssetsManager) Init

func (a *AssetsManager) Init() (err error)

type Driver

type Driver struct {
	*Inquirer
	*Watcher
	// contains filtered or unexported fields
}

func NewDriver

func NewDriver() (c *Driver)

func (*Driver) IsRunning

func (c *Driver) IsRunning() bool

func (*Driver) Start

func (c *Driver) Start(startFunc ...func() error) (keepalive chan error, err error)

type EventHandler

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

func NewEventHandler

func NewEventHandler() *EventHandler

func (*EventHandler) Handle

func (h *EventHandler) Handle(binData []byte) (err error)

func (*EventHandler) Register

func (h *EventHandler) Register(name string, f func([]byte) error)

type IHandler

type IHandler interface {
	Handle(p []byte) error
}

type Inquirer

type Inquirer struct {
	*resty.Client
}

func NewInquirer

func NewInquirer(token, port string) (ret *Inquirer)

func (*Inquirer) Delete

func (c *Inquirer) Delete(uri string) (resp *resty.Response, err error)

func (*Inquirer) Get

func (c *Inquirer) Get(uri string) (resp *resty.Response, err error)

func (*Inquirer) Patch

func (c *Inquirer) Patch(uri string, body interface{}) (resp *resty.Response, err error)

func (*Inquirer) Post

func (c *Inquirer) Post(uri string, body interface{}) (resp *resty.Response, err error)

func (*Inquirer) Put

func (c *Inquirer) Put(uri string, body interface{}) (resp *resty.Response, err error)

func (*Inquirer) Request

func (c *Inquirer) Request(method, uri string, body interface{}) (resp *resty.Response, err error)

type PrintHandler

type PrintHandler struct{}

func (*PrintHandler) Handle

func (h *PrintHandler) Handle(data []byte) error

type Watcher

type Watcher struct {
	WSConn *websocket.Conn
	// contains filtered or unexported fields
}

Watcher is used to watch the LOL Client events

func NewWatcher

func NewWatcher(token, port string) (w *Watcher, err error)

func (*Watcher) SetHandler

func (c *Watcher) SetHandler(handler IHandler)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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