Module: Slack::Web::Stars

Included in:
Slack::Web
Defined in:
lib/slack/web/stars.rb

Overview

Module for the stars methods.

Constant Summary collapse

SCOPE =

Endpoint scope

'stars'

Instance Method Summary collapse

Instance Method Details

#stars_add(params = {}) ⇒ Object

This method adds a star to an item (message, file, file comment, channel, private group, or DM) on behalf of the authenticated user.

Parameters:

  • params (Hash) (defaults to: {})

    API call arguments

Options Hash (params):

  • 'file' (Object)

    File to add star to.

  • 'file_comment' (Object)

    File comment to add star to.

  • 'channel' (Object)

    Channel to add star to, or channel where the message to add star to was posted

  • 'timestamp' (Object)

    Timestamp of the message to add star to.

See Also:



26
27
28
29
# File 'lib/slack/web/stars.rb', line 26

def stars_add(params = {})
  response = @session.do_post "#{SCOPE}.add", params
  Slack.parse_response(response)
end

#stars_list(params = {}) ⇒ Object

Lists stars for a user.

Parameters:

  • params (Hash) (defaults to: {})

    API call arguments

Options Hash (params):

  • 'user' (user)

    Show stars by this user. Defaults to the authed user.

  • 'count' (Object)

    Number of items to return per page.

  • 'page' (Object)

    Page number of results to return.

See Also:



42
43
44
45
# File 'lib/slack/web/stars.rb', line 42

def stars_list(params = {})
  response = @session.do_post "#{SCOPE}.list", params
  Slack.parse_response(response)
end

#stars_remove(params = {}) ⇒ Object

This method removes a star from an item (message, file, file comment, channel, private group, or DM) on behalf of the authenticated user.

Parameters:

  • params (Hash) (defaults to: {})

    API call arguments

Options Hash (params):

  • 'file' (Object)

    File to remove star from.

  • 'file_comment' (Object)

    File comment to remove star from.

  • 'channel' (Object)

    Channel to remove star from, or channel where the message to remove star from was posted.

  • 'timestamp' (Object)

    Timestamp of the message to remove star from.

See Also:



62
63
64
65
# File 'lib/slack/web/stars.rb', line 62

def stars_remove(params = {})
  response = @session.do_post "#{SCOPE}.remove", params
  Slack.parse_response(response)
end