diff --git a/docs/images/api_hint_screenshot.png b/docs/images/api_hint_screenshot.png new file mode 100644 index 0000000..9e4eda1 Binary files /dev/null and b/docs/images/api_hint_screenshot.png differ diff --git a/docs/index.rst b/docs/index.rst index 404822d..9a3830d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -40,4 +40,5 @@ Reference/API installation.rst plugins.rst + plugin_api.rst reference/api.rst diff --git a/docs/plugin_api.rst b/docs/plugin_api.rst new file mode 100644 index 0000000..1011da8 --- /dev/null +++ b/docs/plugin_api.rst @@ -0,0 +1,20 @@ +.. _plugin-apis: + +********************* +Accessing Plugin APIs +********************* + +Each plugin object is wrapped by a public user API which enables interacting with the plugin from +the notebook directly. The plugin API object for each plugin is accessible through ``viz.plugins``. +For example: + +.. code-block:: python + + plugin = viz.plugins['Plot Options'] + plugin.open_in_tray() + plugin.show('popout') + +When running in a notebook or lab environment, plugins provide API hints directly in the UI. To enable these, toggle the ``<>`` button in the top of the plugin. + +.. figure:: images/api_hint_screenshot.png + :alt: Screenshot of API hints in the UI \ No newline at end of file