Documentation
¶
Overview ¶
Package lcu provides a client to work with the LCU API
Index ¶
- Constants
- type Client
- func (c *Client) ApplyItemSet(itemSet ItemSet)
- func (c *Client) ApplyRunes(runes RunePage)
- func (c *Client) ApplySummonerSpells(firstSpellId int, secondSpellId int)
- func (c *Client) CurrentSummoner() Summoner
- func (c *Client) GetAssignedRole() (string, bool)
- func (c *Client) GetCurrentChampion() (int, bool)
- func (c *Client) GetCurrentGameMode() (string, string)
- func (c *Client) IsInLobby() bool
- func (c *Client) UpdateState() string
- type Item
- type ItemBlock
- type ItemSet
- type ItemSets
- type RunePage
- type Summoner
Constants ¶
const ( SummonerSpellIdUrfMark = 39 SummonerSpellIdAramMark = 32 )
Summoner spell ids
const ( StateNotLaunched = "NotLaunched" StateNotInLobby = "NotInLobby" StateInLobby = "InLobby" StateInGame = "InGame" )
LCU states
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a LCU client
func TryToGetLCU ¶
func TryToGetLCU() *Client
TryToGetLCU tries to get the LCU instance and returns a LCU client if it succeeds
func (*Client) ApplyItemSet ¶
ApplyItemSet applies the given item set
func (*Client) ApplyRunes ¶
ApplyRunes applies the given rune page
func (*Client) ApplySummonerSpells ¶
ApplySummonerSpells applies the given summoner spells
func (*Client) CurrentSummoner ¶
CurrentSummoner returns the current logged in summoner
func (*Client) GetAssignedRole ¶
GetAssignedRole returns the current assigned role and whether a role was assigned
func (*Client) GetCurrentChampion ¶
GetCurrentChampion returns the current champion id and whether a champion is selected
func (*Client) GetCurrentGameMode ¶
GetCurrentGameMode returns both the LCU game mode name and the formatted game mode name
func (*Client) UpdateState ¶
UpdateState updates the state of the LCU instance and returns current state
type ItemSet ¶
type ItemSet struct { AssociatedChampions []int `json:"associatedChampions"` AssociatedMaps []int `json:"associatedMaps"` Blocks []ItemBlock `json:"blocks"` Title string `json:"title"` }
ItemSet represents a set of item blocks associated with a champions and maps
type ItemSets ¶
type ItemSets struct { AccountId int64 `json:"accountId"` ItemSets []ItemSet `json:"itemSets"` Timestamp int64 `json:"timestamp"` }
ItemSets represents a group of item sets