Module: Slack::Endpoint::Reactions

Included in:
Slack::Endpoint
Defined in:
lib/slack/endpoint/reactions.rb

Instance Method Summary collapse

Instance Method Details

#reactions_add(options = {}) ⇒ Object

Adds a reaction to an item.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :name (Object)

    Reaction (emoji) name.

  • :channel (Object)

    Channel where the message to add reaction to was posted.

  • :file (Object)

    File to add reaction to.

  • :file_comment (Object)

    File comment to add reaction to.

  • :timestamp (Object)

    Timestamp of the message to add reaction to.

See Also:



22
23
24
25
# File 'lib/slack/endpoint/reactions.rb', line 22

def reactions_add(options={})
  throw ArgumentError.new("Required arguments :name missing") if options[:name].nil?
  post("reactions.add", options)
end

#reactions_get(options = {}) ⇒ Object

Gets reactions for an item.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :channel (Object)

    Channel where the message to get reactions for was posted.

  • :file (Object)

    File to get reactions for.

  • :file_comment (Object)

    File comment to get reactions for.

  • :full (Object)

    If true always return the complete reaction list.

  • :timestamp (Object)

    Timestamp of the message to get reactions for.

See Also:



43
44
45
# File 'lib/slack/endpoint/reactions.rb', line 43

def reactions_get(options={})
  post("reactions.get", options)
end

#reactions_list(options = {}) ⇒ Object

Lists reactions made by a user.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :count (Object)

    Number of items to return per page.

  • :full (Object)

    If true always return the complete reaction list.

  • :page (Object)

    Page number of results to return.

  • :user (Object)

    Show reactions made by this user. Defaults to the authed user.

See Also:



61
62
63
# File 'lib/slack/endpoint/reactions.rb', line 61

def reactions_list(options={})
  post("reactions.list", options)
end

#reactions_remove(options = {}) ⇒ Object

Removes a reaction from an item.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :name (Object)

    Reaction (emoji) name.

  • :channel (Object)

    Channel where the message to remove reaction from was posted.

  • :file (Object)

    File to remove reaction from.

  • :file_comment (Object)

    File comment to remove reaction from.

  • :timestamp (Object)

    Timestamp of the message to remove reaction from.

See Also:



81
82
83
84
# File 'lib/slack/endpoint/reactions.rb', line 81

def reactions_remove(options={})
  throw ArgumentError.new("Required arguments :name missing") if options[:name].nil?
  post("reactions.remove", options)
end