.. _sec-jsclientlib-connection: .. js:module:: OctoPrintClient.connection ``OctoPrintClient.connection`` ------------------------------ .. js:function:: getSettings(opts) Retrieves the available connection options for connection to a printer. See :ref:`Get connection settings ` for the response format. :param object opts: Additional options for the request :returns Promise: A `jQuery Promise `_ for the request's response .. js:function:: connect(data, opts) Connects to the printer, optionally using the provided connection ``data`` as parameters. See :ref:`Issue a connection command ` for more details. :param object data: Connection data to use :param object opts: Additional options for the request :returns Promise: A `jQuery Promise `_ for the request's response .. js:function:: disconnect(opts) Disconnects from the printer. See :ref:`Issue a connection command ` for more details. :param object opts: Additional options for the request :returns Promise: A `jQuery Promise `_ for the request's response .. js:function:: fakeAck(opts) Triggers a fake acknowledgement (``ok``) on the printer. See :ref:`Issue a connection command ` for more details. :param object opts: Additional options for the request :returns Promise: A `jQuery Promise `_ for the request's response