Plugin API Reference¶
This page shows the available public API available for plugins to access.
You can access them by importing them like this:
Variables¶
Route Decorators¶
Settings Access¶
Gets a plugin's system setting stored in db or from cache
:param plugin_name: The plugin's internal name
:param key: The setting's key
:param default: The default value to use if no setting was found, defaults to None
:param skip_cache: Whether the skip cache and load from db directly, defaults to False
:return: The loaded value or None
Set a plugin's system setting stored in db and updates cache
:param plugin_name: The plugin's internal name
:param key: The setting's key
:param value: Value to update setting to
Removes a set plugin's system setting stored in db and cache
:param plugin_name: The plugin's internal name
:param key: The setting's key
Widget Access¶
Plugin¶
Class used when creating a plugin, stores all information about a plugin and what it supports.
is_supported_version(app_version)
¶
Check whether the version requirement matches the given app version
:param app_version: The app version, given as a semantic version number
:return: Whether it is supported
Get a plugins's data path for storing persistant data outside of the database, path will be created if not exists when this function is run
:param plugin_name: The plugin's internal name
:return: The data path