3.0.1 • Published 1 year ago

lol-esports-spectate v3.0.1

Weekly downloads
8
License
ISC
Repository
github
Last release
1 year ago

lol-esports-spectate

JS Api for creating a custom view for a tournament draft spectator with a example like the official one used in the competetive scene.

Example Application

For an example application using this module to create something like the official esports spectator go here The example client has been moved to a standalone repository, which can be found here

Download

LolEsportsSpectate is installable via:

  • GitHub git clone https://github.com/Litzuck/LoLEsportsSpectate.git
  • npm: npm install lol-esports-spectate

Usage example

const ChampSelectApi = require('lol-esports-spectate');
const api = new ChampSelectApi();
//start listening for events
api.start()

api.on('championSelectStarted', (data) => {
    console.log("champion select started")
    gameStarted = true
})

Available methods

constructor ()

Creates a new ChampSelectApi.

Parameters

  1. executablePath {string} A path to where the LeagueClient executable resides. If not passed it will be automatically figured out from the OS process list.

start()

Starts listening for events of from the LCU.

request(uri, callback)

Sends a request to the specified enpoint of the LCU and calls the given function with the result.

Events

championSelectStarted

Fired when the champion select started

newTurnBegin(timeLeftinPhase)

Fired when its a new players turn

banTurnBegin(playerTurn)

Fired when it a new players turn to ban a champion

playerTurnBegin(playerId)

Fired when it a new players turn to pick a champion

championHoverChanged(championId, playerId)

Fired when a player changed his hovered champion

championBanned(championId, playerTurn)

Fired when it a new players turn to ban a champion

championLocked(championId, playerId)

Fired when a champion is locked in.

phaseChanged(type)

Fired when the phase of the champion select changed

teamTurnChanged(isBlueTurn)

Fired when the team who's turn it is changed

summonerSpellChanged(playerId, slotId,summonerSpellId)

Fired when a player changed one of this summoner spells

3.0.1

1 year ago

3.0.0

2 years ago

2.0.2-beta.27

2 years ago

2.0.2-beta.24

2 years ago

2.0.2-beta.23

2 years ago

2.0.2-beta.26

2 years ago

2.0.2-beta.25

2 years ago

2.0.2-beta.9

3 years ago

2.0.2-beta.22

3 years ago

2.0.2-beta.21

3 years ago

2.0.2-beta.20

3 years ago

2.0.2-beta.6

3 years ago

2.0.2-beta.7

3 years ago

2.0.2-beta.8

3 years ago

2.0.2-beta.13

3 years ago

2.0.2-beta.12

3 years ago

2.0.2-beta.11

3 years ago

2.0.2-beta.10

3 years ago

2.0.2-beta.17

3 years ago

2.0.2-beta.16

3 years ago

2.0.2-beta.15

3 years ago

2.0.2-beta.14

3 years ago

2.0.2-beta.19

3 years ago

2.0.2-beta.18

3 years ago

2.0.2-beta.5

3 years ago

2.0.2-beta.2

3 years ago

2.0.2-beta.3

3 years ago

2.0.2-beta.4

3 years ago

2.0.2-beta.1

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.7

3 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago