Module: Slack::Web::Api::Endpoints::Stars
- Included in:
- Slack::Web::Api::Endpoints
- Defined in:
- lib/slack/web/api/endpoints/stars.rb
Instance Method Summary collapse
-
#stars_add(options = {}) ⇒ Object
Save an item for later.
-
#stars_list(options = {}) ⇒ Object
Listed a user’s saved items, formerly known as stars.
-
#stars_remove(options = {}) ⇒ Object
Removes a saved item (star) from an item.
Instance Method Details
#stars_add(options = {}) ⇒ Object
Save an item for later. Formerly known as adding a star.
22 23 24 25 |
# File 'lib/slack/web/api/endpoints/stars.rb', line 22 def stars_add( = {}) = .merge(channel: conversations_id()['channel']['id']) if [:channel] post('stars.add', ) end |
#stars_list(options = {}) ⇒ Object
Listed a user’s saved items, formerly known as stars.
38 39 40 41 42 43 44 45 46 |
# File 'lib/slack/web/api/endpoints/stars.rb', line 38 def stars_list( = {}) if block_given? Pagination::Cursor.new(self, :stars_list, ).each do |page| yield page end else post('stars.list', ) end end |
#stars_remove(options = {}) ⇒ Object
Removes a saved item (star) from an item.
61 62 63 64 |
# File 'lib/slack/web/api/endpoints/stars.rb', line 61 def stars_remove( = {}) = .merge(channel: conversations_id()['channel']['id']) if [:channel] post('stars.remove', ) end |