Module: Slack::Endpoint::Reactions
- Included in:
- Slack::Endpoint
- Defined in:
- lib/slack/endpoint/reactions.rb
Instance Method Summary collapse
-
#reactions_add(options = {}) ⇒ Object
This method adds a reaction (emoji) to an item (file, file comment, channel message, group message, or direct message).
-
#reactions_get(options = {}) ⇒ Object
This method returns a list of all reactions for a single item (file, file comment, channel message, group message, or direct message).
-
#reactions_list(options = {}) ⇒ Object
This method returns a list of all items (file, file comment, channel message, group message, or direct message) reacted to by a user.
-
#reactions_remove(options = {}) ⇒ Object
This method removes a reaction (emoji) from an item (file, file comment, channel message, group message, or direct message).
Instance Method Details
#reactions_add(options = {}) ⇒ Object
This method adds a reaction (emoji) to an item (file, file comment, channel message, group message, or direct message). One of file, file_comment, or the combination of channel and timestamp must be specified.
23 24 25 26 27 |
# File 'lib/slack/endpoint/reactions.rb', line 23 def reactions_add(={}) throw ArgumentError.new("Required arguments :name missing") if [:name].nil? [:attachments] = [:attachments].to_json if Hash === [:attachments] post("reactions.add", ) end |
#reactions_get(options = {}) ⇒ Object
This method returns a list of all reactions for a single item (file, file comment, channel message, group message, or direct message).
45 46 47 48 |
# File 'lib/slack/endpoint/reactions.rb', line 45 def reactions_get(={}) [:attachments] = [:attachments].to_json if Hash === [:attachments] post("reactions.get", ) end |
#reactions_list(options = {}) ⇒ Object
This method returns a list of all items (file, file comment, channel message, group message, or direct message) reacted to by a user.
64 65 66 67 |
# File 'lib/slack/endpoint/reactions.rb', line 64 def reactions_list(={}) [:attachments] = [:attachments].to_json if Hash === [:attachments] post("reactions.list", ) end |
#reactions_remove(options = {}) ⇒ Object
This method removes a reaction (emoji) from an item (file, file comment, channel message, group message, or direct message). One of file, file_comment, or the combination of channel and timestamp must be specified.
86 87 88 89 90 |
# File 'lib/slack/endpoint/reactions.rb', line 86 def reactions_remove(={}) throw ArgumentError.new("Required arguments :name missing") if [:name].nil? [:attachments] = [:attachments].to_json if Hash === [:attachments] post("reactions.remove", ) end |