Module: Slack::Web::Reactions
- Defined in:
- lib/slack/web/reactions.rb
Overview
Module for the ractions methods.
Constant Summary collapse
- SCOPE =
Endpoint scope
'reactions'
Instance Method Summary collapse
-
#reactions_add(params = {}) ⇒ Object
This method adds a reaction (emoji) to an item (file, file comment, channel message, group message, or direct message).
-
#reactions_get(params = {}) ⇒ 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(params = {}) ⇒ 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(params = {}) ⇒ 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(params = {}) ⇒ Object
This method adds a reaction (emoji) to an item (file, file comment, channel message, group message, or direct message).
25 26 27 28 29 |
# File 'lib/slack/web/reactions.rb', line 25 def reactions_add(params = {}) fail ArgumentError, "Required arguments 'name' missing" if params['name'].nil? response = @session.do_post "#{SCOPE}.add", params Slack.parse_response(response) end |
#reactions_get(params = {}) ⇒ Object
This method returns a list of all reactions for a single item (file, file comment, channel message, group message, or direct message).
48 49 50 51 |
# File 'lib/slack/web/reactions.rb', line 48 def reactions_get(params = {}) response = @session.do_post "#{SCOPE}.add", params Slack.parse_response(response) end |
#reactions_list(params = {}) ⇒ Object
This method returns a list of all items (file, file comment, channel message, group message, or direct message) reacted to by a user.
68 69 70 71 |
# File 'lib/slack/web/reactions.rb', line 68 def reactions_list(params = {}) response = @session.do_post "#{SCOPE}.list", params Slack.parse_response(response) end |
#reactions_remove(params = {}) ⇒ Object
This method removes a reaction (emoji) from an item (file, file comment, channel message, group message, or direct message)
90 91 92 93 94 |
# File 'lib/slack/web/reactions.rb', line 90 def reactions_remove(params = {}) fail ArgumentError, "Required arguments 'name' missing" if params['name'].nil? response = @session.do_post "#{SCOPE}.remove", params Slack.parse_response(response) end |