add_gateway_setting()
- Add a setting for a gateway owned by a calling/running plugin.
Edit
- params: gateway setting (table). Note, don’t fill a field “gateway_id”, it’s auto-generated.
- return: setting id (string) in format plugin_id.setting_id or nil if failed to add a gateway setting.
Edit
Events | Description |
---|---|
gateway_setting_added |
Inform subscribers about a new gateway setting. |
Edit
require "core"
local setting = core.add_gateway_setting( { id = "wassup", status = "synced", valueType = "int", value = 42 } )
-- setting == plugin_id.wassup