MrDraw/docs/jsclientlib/settings.rst

42 lines
1.5 KiB
ReStructuredText
Raw Normal View History

2016-08-26 15:47:38 +00:00
.. sec-jsclientlib-settings:
:mod:`OctoPrint.settings`
-------------------------
.. js:function:: OctoPrint.settings.get(opts)
2016-08-26 15:47:38 +00:00
Retrieves the current settings.
2016-08-26 15:47:38 +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
.. js:function:: OctoPrint.settings.save(settings, opts)
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
2016-08-26 15:47:38 +00:00
.. js:function:: OctoPrint.settings.getPluginSettings(plugin, opts)
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
2016-08-26 15:47:38 +00:00
.. js:function:: OctoPrint.settings.savePluginSettings(plugin, settings, opts)
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.