Module: Slack::Endpoint::Stars
- Included in:
- Slack::Endpoint
- Defined in:
- lib/slack/endpoint/stars.rb
Instance Method Summary collapse
-
#stars_add(options = {}) ⇒ Object
This method adds a star to an item (message, file, file comment, channel, private group, or DM) on behalf of the authenticated user.
-
#stars_list(options = {}) ⇒ Object
This method lists the items starred by the authed user.
-
#stars_remove(options = {}) ⇒ Object
This method removes a star from an item (message, file, file comment, channel, private group, or DM) on behalf of the authenticated user.
Instance Method Details
#stars_add(options = {}) ⇒ Object
This method adds a star to an item (message, file, file comment, channel, private group, or DM) on behalf of the authenticated user. One of file, file_comment, channel, or the combination of channel and timestamp must be specified.
21 22 23 24 |
# File 'lib/slack/endpoint/stars.rb', line 21 def stars_add(={}) [:attachments] = [:attachments].to_json if Hash === [:attachments] post("stars.add", ) end |
#stars_list(options = {}) ⇒ Object
This method lists the items starred by the authed user.
36 37 38 39 |
# File 'lib/slack/endpoint/stars.rb', line 36 def stars_list(={}) [:attachments] = [:attachments].to_json if Hash === [:attachments] post("stars.list", ) end |
#stars_remove(options = {}) ⇒ Object
This method removes a star from an item (message, file, file comment, channel, private group, or DM) on behalf of the authenticated user. One of file, file_comment, channel, or the combination of channel and timestamp must be specified.
56 57 58 59 |
# File 'lib/slack/endpoint/stars.rb', line 56 def stars_remove(={}) [:attachments] = [:attachments].to_json if Hash === [:attachments] post("stars.remove", ) end |