asol

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: MIT Imports: 18 Imported by: 1

README

asol

A library to interact with the LCU API

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Flags

func Flags(process *process.Process) map[string]string

func GetProcess

func GetProcess(application string) (*process.Process, error)

func GetProcessIndefinitely

func GetProcessIndefinitely(application string) (*process.Process, error)

func IsGameOrClient

func IsGameOrClient(channel chan bool, game string, client string)

Types

type Asol

type Asol struct {
	Connection *websocket.Conn
	*GameProcess
	*RiotClient
	*WebClient
	*ConnectionEventManager
	*WebsocketEventManager
	// contains filtered or unexported fields
}

func NewAsol

func NewAsol() *Asol

func (*Asol) Authorization

func (asol *Asol) Authorization() string

func (*Asol) LocalAddress added in v0.0.3

func (asol *Asol) LocalAddress() string

func (*Asol) Match

func (asol *Asol) Match(message *Message)

func (*Asol) NewDeleteRequest

func (asol *Asol) NewDeleteRequest(endpoint string) (*http.Request, error)

func (*Asol) NewGetRequest

func (asol *Asol) NewGetRequest(endpoint string) (*http.Request, error)

func (*Asol) NewPatchRequest

func (asol *Asol) NewPatchRequest(endpoint string, data map[string]interface{}) (*http.Request, error)

func (*Asol) NewPostRequest

func (asol *Asol) NewPostRequest(endpoint string, data map[string]interface{}) (*http.Request, error)

func (*Asol) NewWebRequest added in v0.0.3

func (asol *Asol) NewWebRequest(url string) (*http.Request, error)

func (*Asol) OnClientClose

func (asol *Asol) OnClientClose(callback EventCallback)

func (*Asol) OnError

func (asol *Asol) OnError(callback ErrorCallback)

func (*Asol) OnLogin

func (asol *Asol) OnLogin(callback EventCallback)

func (*Asol) OnLogout

func (asol *Asol) OnLogout(callback EventCallback)

func (*Asol) OnOpen

func (asol *Asol) OnOpen(callback EventCallback)

func (*Asol) OnReady

func (asol *Asol) OnReady(callback EventCallback)

func (*Asol) OnReconnect

func (asol *Asol) OnReconnect(callback EventCallback)

func (*Asol) OnWebsocketClose

func (asol *Asol) OnWebsocketClose(callback EventCallback)

func (*Asol) RawRequest

func (asol *Asol) RawRequest(request *http.Request) ([]byte, error)

func (*Asol) RiotRequest

func (asol *Asol) RiotRequest(request *http.Request) (interface{}, error)

func (*Asol) Start

func (asol *Asol) Start()

func (*Asol) WebHeader added in v0.0.3

func (asol *Asol) WebHeader() http.Header

func (*Asol) WebRequest

func (asol *Asol) WebRequest(request *http.Request) (interface{}, error)

func (*Asol) WebsocketAddress

func (asol *Asol) WebsocketAddress() string

func (*Asol) WebsocketHeader added in v0.0.3

func (asol *Asol) WebsocketHeader() http.Header

type ConnectionEventManager

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

type ErrorCallback

type ErrorCallback func(error)

type EventCallback

type EventCallback func(*Asol)

type GameProcess

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

func NewGameProcess

func NewGameProcess() *GameProcess

func (*GameProcess) Password

func (game *GameProcess) Password() string

func (*GameProcess) Path

func (game *GameProcess) Path() string

func (*GameProcess) Port

func (game *GameProcess) Port() string

func (*GameProcess) Username

func (game *GameProcess) Username() string

type Login added in v0.0.5

type Login struct {
	AccountId      float64
	Connected      bool
	Error          bool
	GasToken       string
	IdToken        string
	IsInLoginQueue bool
	IsNewPlayer    bool
	Puuid          string
	State          string
	SummonerId     float64
	UserAuthToken  string
	Username       string
}

type Message

type Message struct {
	URI    string
	Method string
	Data   map[string]interface{}
}

type MessageType

type MessageType float64
const (
	Welcome     MessageType = 0
	Prefix      MessageType = 1
	Call        MessageType = 2
	CallResult  MessageType = 3
	CallError   MessageType = 4
	Subscribe   MessageType = 5
	Unsubscribe MessageType = 6
	Publish     MessageType = 7
	Event       MessageType = 8
)

type NoRegisteredEventError

type NoRegisteredEventError struct {
}

func (*NoRegisteredEventError) Error

func (error *NoRegisteredEventError) Error() string

type ProcessNotFoundError

type ProcessNotFoundError struct {
	Process string
}

func (*ProcessNotFoundError) Error

func (error *ProcessNotFoundError) Error() string

type Response

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

func (*Response) UnmarshalJSON

func (response *Response) UnmarshalJSON(message []byte) error

type RiotClient

type RiotClient struct {
	*http.Client
}

func NewRiotClient

func NewRiotClient() *RiotClient

type TimeoutError

type TimeoutError struct {
	Process string
}

func (*TimeoutError) Error

func (error *TimeoutError) Error() string

type WebClient

type WebClient struct {
	*http.Client
}

func NewWebClient

func NewWebClient() *WebClient

type WebsocketCallback

type WebsocketCallback func(*Asol, *Message)

type WebsocketEventManager

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

func (*WebsocketEventManager) OnMessage

func (wem *WebsocketEventManager) OnMessage(uri string, method string, callback WebsocketCallback) WebsocketCallback

func (*WebsocketEventManager) Registered

func (wem *WebsocketEventManager) Registered() error

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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