OctoPrintClient.connection¶
- OctoPrintClient.connection.getSettings(opts)¶
Retrieves the available connection options for connection to a printer.
See Get connection settings for the response format.
- Arguments:¶
opts (
object()) – Additional options for the request
- Returns Promise:¶
A jQuery Promise for the request’s response
- OctoPrintClient.connection.connect(data, opts)¶
Connects to the printer, optionally using the provided connection
dataas parameters.If
datais provided it’s expected to be an object specifying one or more ofportbaudrateprinterProfilesaveautoconnect
See Issue a connection command for more details.
- Arguments:¶
data (
object()) – Connection data to useopts (
object()) – Additional options for the request
- Returns Promise:¶
A jQuery Promise for the request’s response
- OctoPrintClient.connection.disconnect(opts)¶
Disconnects from the printer.
See Issue a connection command for more details.
- Arguments:¶
opts (
object()) – Additional options for the request
- Returns Promise:¶
A jQuery Promise for the request’s response
- OctoPrintClient.connection.fakeAck(opts)¶
Triggers a fake acknowledgement (
ok) on the printer.See Issue a connection command for more details.
- Arguments:¶
opts (
object()) – Additional options for the request
- Returns Promise:¶
A jQuery Promise for the request’s response