Overview
Plugin Interface
The plugin class should implement this interface. The methods are used to subscribe to events. Events available are listed here.
Example
Instantiate a plugin.
import { Plugin } from "@qatium/sdk/plugin";
class MyPlugin implements Plugin { run() {}};
const myPlugin = new MyPlugin();
from qatiumsdk import Plugin, sdk
class MyPlugin(Plugin): def run(self): sdk.ui.send_message("plugin developer")
init()
The function init
is the entry point for the plugin code. It should be called with the plugin instance in order to run the plugin.
Method signature
init(plugin: Plugin): void;
def init(plugin: Plugin) -> None
Parameters
plugin: Plugin
: A Plugin instance
Example
Initializes a plugin instance.
import { Plugin, init } from "@qatium/sdk/plugin";
class MyPlugin implements Plugin { run() {}};
const myPlugin = new MyPlugin();
init(myPlugin);
from qatiumsdk import Plugin, sdk
class MyPlugin(Plugin): def run(self): pass
from .plugin import MyPluginfrom qatiumsdk import init
init(MyPlugin())