publish
publish: (PluginData, string, string) -> numberPublish json under topic, replacing what was there; the new version. topic is "<this plugin's id>/<name>"; anything else, more than 256 KiB, or a 65th topic, is an error.
pluginData| Method | Returns | Description |
|---|---|---|
publish(string, string) | number | Publish json under topic, replacing what was there; the new version. topic is "<this plugin's id>/<name>"; anything else, more than… |
get(string) | string? | The JSON last published under topic, or nil. |
version(string) | number | The version of topic (0 when nothing is published): changes on every publish. |
publisher(string) | string? | The id of the plugin that published topic, or nil. |
clear(string) | boolean | Remove topic, if this plugin published it. |
topics() | {string} | Every topic, sorted. |
publishpublish: (PluginData, string, string) -> numberPublish json under topic, replacing what was there; the new version. topic is "<this plugin's id>/<name>"; anything else, more than 256 KiB, or a 65th topic, is an error.
getget: (PluginData, string) -> string?The JSON last published under topic, or nil.
versionversion: (PluginData, string) -> numberThe version of topic (0 when nothing is published): changes on every publish.
publisherpublisher: (PluginData, string) -> string?The id of the plugin that published topic, or nil.
clearclear: (PluginData, string) -> booleanRemove topic, if this plugin published it.
topicstopics: (PluginData) -> {string}Every topic, sorted.