Use this to persist non-preference data for your plugin
This object is an instance of simonlast/node-persist
The interface listed here should be up to date, but the github repository is the final implementation.
'use strict'; module.exports = (pluginContext) => { const localStorage = pluginContext.localStorage; const logger = pluginContext.logger; function startup() { ... } function search(query, res) { ... } function execute(id, payload, extra) { const last = localStorage.getItemSync('last_execute_time'); const now = DateTime.now(); logger.log('Last execution time: %d, updating to %d', last, now); localStorage.setItemSync('last_execute_time', now); // ... } return { startup, search, execute}; };
Generated using TypeDoc
Use this to persist non-preference data for your plugin
This object is an instance of simonlast/node-persist
The interface listed here should be up to date, but the github repository is the final implementation.
Example
'use strict'; module.exports = (pluginContext) => { const localStorage = pluginContext.localStorage; const logger = pluginContext.logger; function startup() { ... } function search(query, res) { ... } function execute(id, payload, extra) { const last = localStorage.getItemSync('last_execute_time'); const now = DateTime.now(); logger.log('Last execution time: %d, updating to %d', last, now); localStorage.setItemSync('last_execute_time', now); // ... } return { startup, search, execute}; };