module BotMesh::Store
Public Instance Methods
Source
# File lib/bot_mesh/store.rb, line 28 def get_json(group_id:, network:, channel:, plugin:, key:, default: nil) RabbotDb.get_group_plugin_json( group_id: group_id, plugin: plugin, key: key, network: network, channel: channel, default: default ) end
Source
# File lib/bot_mesh/store.rb, line 14 def get_json_for_bot(bot_id:, network:, channel:, plugin:, key:, default: nil) group_id = GroupResolver.resolve_group_id(bot_id: bot_id, network: network, channel: channel) return default unless group_id get_json(group_id: group_id, network: network, channel: channel, plugin: plugin, key: key, default: default) end
Source
# File lib/bot_mesh/store.rb, line 39 def set_json(group_id:, network:, channel:, plugin:, key:, value:) RabbotDb.set_group_plugin_json( group_id: group_id, plugin: plugin, key: key, value: value, network: network, channel: channel ) true end
Source
# File lib/bot_mesh/store.rb, line 21 def set_json_for_bot(bot_id:, network:, channel:, plugin:, key:, value:) group_id = GroupResolver.resolve_group_id(bot_id: bot_id, network: network, channel: channel) return false unless group_id set_json(group_id: group_id, network: network, channel: channel, plugin: plugin, key: key, value: value) end