module Slack::Web::Api::Endpoints::Stars

Public Instance Methods

stars_add(options = {}) click to toggle source

Adds a star to an item.

@option options [channel] :channel

Channel to add star to, or channel where the message to add star to was posted (used with timestamp).

@option options [file] :file

File to add star to.

@option options [Object] :file_comment

File comment to add star to.

@option options [Object] :timestamp

Timestamp of the message to add star to.

@see api.slack.com/methods/stars.add @see github.com/slack-ruby/slack-api-ref/blob/master/methods/stars/stars.add.json

# File lib/slack/web/api/endpoints/stars.rb, line 21
def stars_add(options = {})
  options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
  post('stars.add', options)
end
stars_list(options = {}) click to toggle source

Lists stars for a user.

@see api.slack.com/methods/stars.list @see github.com/slack-ruby/slack-api-ref/blob/master/methods/stars/stars.list.json

# File lib/slack/web/api/endpoints/stars.rb, line 31
def stars_list(options = {})
  post('stars.list', options)
end
stars_remove(options = {}) click to toggle source

Removes a star from an item.

@option options [channel] :channel

Channel to remove star from, or channel where the message to remove star from was posted (used with timestamp).

@option options [file] :file

File to remove star from.

@option options [Object] :file_comment

File comment to remove star from.

@option options [Object] :timestamp

Timestamp of the message to remove star from.

@see api.slack.com/methods/stars.remove @see github.com/slack-ruby/slack-api-ref/blob/master/methods/stars/stars.remove.json

# File lib/slack/web/api/endpoints/stars.rb, line 48
def stars_remove(options = {})
  options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
  post('stars.remove', options)
end