OctoPrintClient.control
¶
-
OctoPrintClient.control.
getCustomControls
(opts)¶ Retrieves the defined custom controls from the server.
- Arguments
opts (object) – Additional options for the request
- Returns Promise
A jQuery Promise for the request’s response
-
OctoPrintClient.control.
sendGcode
(commands, opts)¶ Sends the provided
commands
to the printer.Corresponds to the Send an arbitrary command to the printer API, see there for details.
- Arguments
or string commands (list) – One or more commands to send to the printer.
opts (object) – Additional options for the request
- Returns Promise
A jQuery Promise for the request’s response
-
OctoPrintClient.control.
sendGcodeWithParameters
(commands, parameters, opts)¶ Sends the provided
commands
to the printer, replacing contained placeholders with the providedparameters
first.Corresponds to the Send an arbitrary command to the printer API, see there for details.
- Arguments
or string commands (list) – One or more commands to send to the printer
parameters (object) – Parameters (key-value-pairs) to replace placeholders in
commands
withopts (object) – Additional options for the request
- Returns Promise
A jQuery Promise for the request’s response
-
OctoPrintClient.control.
sendGcodeScript
(script, context, opts)¶ Sends the provided
script
to the printer, enhancing the template with the specifiedcontext
.- Arguments
script (string) – Name of the script to send to the printer
context (object) – Template context
opts (object) – Additional options for the request
- Returns Promise
A jQuery Promise for the request’s response
-
OctoPrintClient.control.
sendGcodeScriptWithParameters
(script, context, parameters, opts)¶ Sends the provided
script
to the printer, enhancing the template with the specifiedcontext
andparameters
.- Arguments
script (string) – Name of the script to send to the printer
context (object) – Template context
parameters (object) – Template parameters
opts (object) – Additional options for the request
- Returns Promise
A jQuery Promise for the request’s response