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
Adds a star to an item.
-
#stars_list(options = {}) ⇒ Object
Lists stars for a user.
-
#stars_remove(options = {}) ⇒ Object
Removes a star from an item.
Instance Method Details
#stars_add(options = {}) ⇒ Object
Adds a star to an item.
21 22 23 24 |
# File 'lib/slack/web/api/endpoints/stars.rb', line 21 def stars_add( = {}) = .merge(channel: channels_id()['channel']['id']) if [:channel] post('stars.add', ) end |
#stars_list(options = {}) ⇒ Object
Lists stars for a user.
35 36 37 38 39 40 41 42 43 |
# File 'lib/slack/web/api/endpoints/stars.rb', line 35 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 star from an item.
58 59 60 61 |
# File 'lib/slack/web/api/endpoints/stars.rb', line 58 def stars_remove( = {}) = .merge(channel: channels_id()['channel']['id']) if [:channel] post('stars.remove', ) end |