2017-01-20 10:34:19 +00:00
|
|
|
.. _sec-jsclientlib-settings:
|
2016-08-26 15:47:38 +00:00
|
|
|
|
2017-01-20 10:34:19 +00:00
|
|
|
:mod:`OctoPrintClient.settings`
|
|
|
|
|
-------------------------------
|
2016-08-26 15:47:38 +00:00
|
|
|
|
2017-01-20 10:34:19 +00:00
|
|
|
.. js:function:: OctoPrintClient.settings.get(opts)
|
2016-08-26 15:47:38 +00:00
|
|
|
|
2016-09-22 14:27:06 +00:00
|
|
|
Retrieves the current settings.
|
2016-08-26 15:47:38 +00:00
|
|
|
|
2016-09-22 14:27:06 +00:00
|
|
|
:param object opts: Additional options for the request
|
|
|
|
|
:returns Promise: A `jQuery Promise <http://api.jquery.com/Types/#Promise>`_ for the request's response
|
2016-08-26 15:47:38 +00:00
|
|
|
|
2017-01-20 10:34:19 +00:00
|
|
|
.. js:function:: OctoPrintClient.settings.save(settings, opts)
|
2016-08-26 15:47:38 +00:00
|
|
|
|
2016-09-22 14:27:06 +00:00
|
|
|
Saves the provided ``settings``.
|
|
|
|
|
|
|
|
|
|
:param object settings: The settings to save
|
|
|
|
|
:param object opts: Additional options for the request
|
|
|
|
|
:returns Promise: A `jQuery Promise <http://api.jquery.com/Types/#Promise>`_ for the request's response
|
|
|
|
|
|
2017-01-20 10:34:19 +00:00
|
|
|
.. js:function:: OctoPrintClient.settings.getPluginSettings(plugin, opts)
|
2016-08-26 15:47:38 +00:00
|
|
|
|
2016-09-22 14:27:06 +00:00
|
|
|
Retrieves the settings of the specified ``plugin``.
|
|
|
|
|
|
|
|
|
|
:param string plugin: The plugin for which to retrieve the settings
|
|
|
|
|
:param object opts: Additional options for the request
|
|
|
|
|
:returns Promise: A `jQuery Promise <http://api.jquery.com/Types/#Promise>`_ for the request's response
|
|
|
|
|
|
2017-01-20 10:34:19 +00:00
|
|
|
.. js:function:: OctoPrintClient.settings.savePluginSettings(plugin, settings, opts)
|
2016-09-22 14:27:06 +00:00
|
|
|
|
|
|
|
|
Saves the ``settings`` for the specified ``plugin``.
|
|
|
|
|
|
|
|
|
|
:param string plugin: The plugin for which to save settings
|
|
|
|
|
:param object settings: The settings to save
|
|
|
|
|
:param object opts: Additional options for the request
|
|
|
|
|
:returns Promise: A `jQuery Promise <http://api.jquery.com/Types/#Promise>`_ for the request's response
|
2016-09-22 20:21:52 +00:00
|
|
|
|
|
|
|
|
.. seealso::
|
|
|
|
|
|
|
|
|
|
:ref:`Settings API <sec-api-settings>`
|
|
|
|
|
The documentation of the underlying settings API.
|