Node.js client for the LiveSplit Server running instance
Kind: global class
- LiveSplitClient
- new LiveSplitClient(address)
- .connected :
boolean
- .connect() ⇒
Promise
- .disconnect() ⇒
boolean
- .send(command, [expectResponse]) ⇒
Promise
|boolean
- .startTimer() ⇒
boolean
- .startOrSplit() ⇒
boolean
- .split() ⇒
boolean
- .unsplit() ⇒
boolean
- .skipSplit() ⇒
boolean
- .pause() ⇒
boolean
- .resume() ⇒
boolean
- .reset() ⇒
boolean
- .initGameTime() ⇒
boolean
- .setGameTime(time) ⇒
boolean
- .setLoadingTimes(time) ⇒
boolean
- .pauseGameTime() ⇒
boolean
- .unpauseGameTime() ⇒
boolean
- .setComparison(comparison) ⇒
boolean
- .getDelta([comparison]) ⇒
Promise
- .getLastSplitTime() ⇒
Promise
- .getComparisonSplitTime() ⇒
Promise
- .getCurrentTime() ⇒
Promise
- .getFinalTime([comparison]) ⇒
Promise
- .getPredictedTime([comparison]) ⇒
Promise
- .getBestPossibleTime() ⇒
Promise
- .getSplitIndex() ⇒
Promise
- .getCurrentSplitName() ⇒
Promise
- .getPreviousSplitName() ⇒
Promise
- .getCurrentTimerPhase() ⇒
Promise
- .getAll() ⇒
Promise
Param | Type | Description |
---|---|---|
address | string |
Connection address, like: 127.0.0.1:1234 |
Client connection status.
Kind: instance property of LiveSplitClient
Performs connection attempt to the LiveSplit Server instance.
Kind: instance method of LiveSplitClient
Returns: Promise
- Connection result or error.
Disconnect client from the sever.
Kind: instance method of LiveSplitClient
Returns: boolean
- Disconnection result.
Send command to the LiveSplit Server instance.
Kind: instance method of LiveSplitClient
Returns: Promise
| boolean
- - Promise if answer was expected, else true.
Param | Type | Default | Description |
---|---|---|---|
command | string |
Existing LiveSplit Server command without linebreaks. | |
[expectResponse] | boolean |
true |
Expect response from the server. |
Start timer
Kind: instance method of LiveSplitClient
Start or split
Kind: instance method of LiveSplitClient
Split
Kind: instance method of LiveSplitClient
Unsplit
Kind: instance method of LiveSplitClient
Skip split
Kind: instance method of LiveSplitClient
Pause
Kind: instance method of LiveSplitClient
Resume
Kind: instance method of LiveSplitClient
Reset
Kind: instance method of LiveSplitClient
Init game time. Could be called only once according to LiveSplit Server documentation.
Kind: instance method of LiveSplitClient
Set game time
Kind: instance method of LiveSplitClient
Param | Type | Description |
---|---|---|
time | string |
Game time |
Set loading times
Kind: instance method of LiveSplitClient
Param | Type | Description |
---|---|---|
time | string |
Game time |
Pause game time
Kind: instance method of LiveSplitClient
Unpause game time
Kind: instance method of LiveSplitClient
Set comparison
Kind: instance method of LiveSplitClient
Param | Type | Description |
---|---|---|
comparison | string |
Comparison |
Get delta
Kind: instance method of LiveSplitClient
Returns: Promise
- Command result or null on timeout.
Param | Type | Description |
---|---|---|
[comparison] | string |
Comparison |
Get last split time
Kind: instance method of LiveSplitClient
Returns: Promise
- Command result or null on timeout.
Get comparison split time
Kind: instance method of LiveSplitClient
Returns: Promise
- Command result or null on timeout.
Get current time
Kind: instance method of LiveSplitClient
Returns: Promise
- Command result or null on timeout.
Get final time
Kind: instance method of LiveSplitClient
Returns: Promise
- Command result or null on timeout.
Param | Type | Description |
---|---|---|
[comparison] | string |
Comparison |
Get predicted time
Kind: instance method of LiveSplitClient
Returns: Promise
- Command result or null on timeout.
Param | Type | Description |
---|---|---|
[comparison] | string |
Comparison |
Get best pssible time
Kind: instance method of LiveSplitClient
Returns: Promise
- Command result or null on timeout.
Get split index
Kind: instance method of LiveSplitClient
Returns: Promise
- Command result or null on timeout.
Get current split name
Kind: instance method of LiveSplitClient
Returns: Promise
- Command result or null on timeout.
Get previous split name
Kind: instance method of LiveSplitClient
Returns: Promise
- Command result or null on timeout.
Get current timer phase
Kind: instance method of LiveSplitClient
Returns: Promise
- Command result or null on timeout.
Get all available information. Synthetic method that calls every server getter command if possible.
Kind: instance method of LiveSplitClient
Returns: Promise
- Commands execution result or false on timeout.