Constructor
new RestCommander(optionsopt)
- Description:
Creates a new RestCommander instance.
- Source:
Parameters:
| Name | Type | Attributes | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
Options. Properties
|
Methods
(async) cancel()
- Description:
Cancels any currently executing command on the remote server.
- Source:
close()
- Description:
Closes this instance. No-op for REST client.
- Source:
(async) fetchCommandNames() → {Promise.<Array.<string>>}
- Description:
Fetches all available command names from the remote server.
- Source:
Returns:
Array of command names.
- Type
- Promise.<Array.<string>>
(async) help(commandName)
- Description:
Logs the help info for the given command name from the remote server.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
commandName |
string | Name of the command. |
(async) logInfo()
- Description:
Logs information about known traffic lights from the remote server.
- Source:
(async) run(command, resetopt)
- Description:
Executes a command on the remote server (fire-and-forget).
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
command |
string | Command to execute. |
||
reset |
boolean |
<optional> |
false
|
Whether to reset the traffic light first. |