OctoPrintClient.job

OctoPrintClient.job.get(opts)

Retrieves information about the current job.

See Retrieve information about the current job for details.

Arguments
  • opts (object()) – Additional options for the request

Returns Promise

A jQuery Promise for the request’s response

OctoPrintClient.job.start(opts)

Starts the current job.

See Issue a job command for details.

Arguments
  • opts (object()) – Additional options for the request

Returns Promise

A jQuery Promise for the request’s response

OctoPrintClient.job.cancel(opts)

Cancels the current job.

See Issue a job command for details.

Arguments
  • opts (object()) – Additional options for the request

Returns Promise

A jQuery Promise for the request’s response

OctoPrintClient.job.restart(opts)

Restarts the current job. This is equivalent to cancelling and immediately restarting the job.

Example:

OctoPrint.job.restart();

// the above is a shorthand for:

OctoPrint.job.cancel()
    .done(function(response) {
        OctoPrint.job.start();
    });

See Issue a job command for details.

Arguments
  • opts (object()) – Additional options for the request

Returns Promise

A jQuery Promise for the request’s response

OctoPrintClient.job.pause(opts)

Pauses the current job if it’s running, does nothing if it’s already paused.

See Issue a job command for details.

Arguments
  • opts (object()) – Additional options for the request

Returns Promise

A jQuery Promise for the request’s response

OctoPrintClient.job.resume(opts)

Resumes the current job if it’s currently paused, does nothing if it’s running.

See Issue a job command for details.

Arguments
  • opts (object()) – Additional options for the request

Returns Promise

A jQuery Promise for the request’s response

OctoPrintClient.job.togglePause(opts)

Resumes a paused and pauses a running job.

See Issue a job command for details.

Arguments
  • opts (object()) – Additional options for the request

Returns Promise

A jQuery Promise for the request’s response