Work with Reactions
The following are Apex classes for the Slack reactions
API methods.
Represents a Reaction.
The following are methods for Reaction
.
Signature
Return Value
Type: Integer
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: List<String>
Signature
Parameters
count
Type: Integer
Return Value
Type: void
Signature
Parameters
name
Type: String
Return Value
Type: void
Signature
Parameters
url
Type: String
Return Value
Type: void
Signature
Parameters
users
Type: List<String>
Return Value
Type: void
Sends a request to add a reaction to an item.
Usage
See Slack’s reactions.add method.
The following are methods for ReactionsAddRequest
.
Builds a request object that's used when executing the API call.
Signature
Contains methods to build an instance of the Slack.ReactionsAddRequest
class.
A Builder object is obtained by invoking one of the ReactionsAddRequest.builder
methods defined by the ReactionsAddRequest
class.
The following are methods for ReactionsAddRequest.Builder
. These methods are optional unless specified otherwise.
Required. Returns an instance of Slack.ReactionsAddRequest
.
Signature
Return Value
Type: Slack.ReactionsAddRequest
Required. The channel where the message to add reaction to was posted.
Signature
Parameters
channel
Type: String
Return Value
Type: Slack.ReactionsAddRequest.Builder
Signature
Parameters
file
Type: String
Return Value
Type: Slack.ReactionsAddRequest.Builder
Signature
Parameters
fileComment
Type: String
Return Value
Type: Slack.ReactionsAddRequest.Builder
Required. The reaction (emoji) name.
Signature
Parameters
name
Type: String
Return Value
Type: Slack.ReactionsAddRequest.Builder
Required. The timestamp of the message to add reaction to.
Signature
Parameters
timestamp
Type: String
Adds a reaction to an item.
Usage
See Slack’s reactions.add method.
This class contains standard response methods.
Sends a request to get reactions for an item.
Usage
See Slack’s reactions.get method.
In this example, the ReactionsGetShortcutDispatcher
action runs when a user initiates your shortcut. It uses the ReactionsGetRequest
class to parse the response in the view, displaying the message text and the number of reactions to it.
The message_reactions
view looks like this.
See the sample app for more information.
The following are methods for ReactionsGetRequest
.
Builds a request object that's used when executing the API call.
Signature
Return Value
Type: Slack.ReactionsGetRequest.Builder
Contains methods to build an instance of the Slack.ReactionsGetRequest
class.
A Builder object is obtained by invoking one of the ReactionsGetRequest.builder
methods defined by the ReactionsGetRequest
class.
The following are methods for ReactionsGetRequest.Builder
. These methods are optional unless specified otherwise.
Required. Returns an instance of Slack.ReactionsGetRequest
.
Signature
Return Value
Type: Slack.ReactionsGetRequest
The channel where the message to get reactions for was posted.
Signature
Parameters
channel
Type: String
Return Value
Type: Slack.ReactionsGetRequest.Builder
The file to get reactions for.
Signature
Parameters
file
Type: String
Return Value
Type: Slack.ReactionsGetRequest.Builder
The file comment to get reactions for.
Signature
Parameters
fileComment
Type: String
Return Value
Type: Slack.ReactionsGetRequest.Builder
Specifies whether to return the complete reaction list.
Signature
Parameters
full Type: Boolean If true, always return the complete reaction list.
Return Value
Type: Slack.ReactionsGetRequest.Builder
Signature
Parameters
timestamp
Type: String
Return Value
Type: Slack.ReactionsGetRequest.Builder
Gets reactions for an item.
Usage
See Slack’s reactions.get method.
This class contains standard response methods.
The following are methods for ReactionsGetResponse
.
Signature
Return Value
Type: Slack.ReactionsGetResponse.Message
Signature
Return Value
Type: String
Sets the channel where the message to get reactions for was posted.
Signature
Parameters
channel
Type: String
Return Value
Type: void
Signature
Parameters
message
Type: Slack.ReactionsGetResponse.Message
Signature
Parameters
type
Type: String
Return Value
Type: void
The following are methods for ReactionsGetResponse.Message
.
Signature
Return Value
Type: String
Signature
Return Value
Type: Slack.BotProfile
Signature
Return Value
Type: String
Signature
Return Value
Type: List<Slack.Reaction>
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Parameters
botId
Type: String
Return Value
Type: void
Signature
Parameters
botProfile
Type: Slack.BotProfile
Return Value
Type: void
Signature
Parameters
permalink
Type: String
Return Value
Type: void
Signature
Parameters
reactions
Type: List<Slack.Reaction>
Return Value
Type: void
Signature
Parameters
subtype
Type: String
Return Value
Type: void
Signature
Parameters
team
Type: String
Signature
Parameters
ts
Type: String
Return Value
Type: void
Signature
Parameters
type
Type: String
Return Value
Type: void
Signature
Parameters
user Type String
Return Value
Type: void
Signature
Parameters
username
Type: String
Return Value
Type: void
Sends a request to list reactions made by a user.
Usage
See Slack's reactions.list method.
The following are methods for ReactionsListRequest
.
Builds a request object that's used when executing the API call.
Signature
Return Value
Type: Slack.ReactionsListRequest.Builder
Contains methods to build an instance of the Slack.ReactionsListRequest
class.
A Builder object is obtained by invoking one of the ReactionsListRequest.builder
methods defined by the ReactionsListRequest
class.
The following are methods for ReactionsListRequest.Builder
. These methods are optional unless specified otherwise.
Required. Returns an instance of Slack.ReactionsListRequest
.
Signature
Return Value
Type: Slack.ReactionsListRequest
Signature
Parameters
count
Type: Integer
Return Value
Type: Slack.ReactionsListRequest.Builder
Signature
Parameters
full
Type: Boolean
Return Value
Type: Slack.ReactionsListRequest.Builder
Signature
Parameters
limitValue
Type: Integer
Return Value
Type: Slack.ReactionsListRequest.Builder
Signature
Parameters
page
Type: Integer
Return Value
Type: Slack.ReactionsListRequest.Builder
Signature
Parameters
teamId
Type: String
Return Value
Type: Slack.ReactionsListRequest.Builder
Signature
Parameters
user
Type: String
Return Value
Type: Slack.ReactionsListRequest.Builder
Lists reactions made by a user.
This class contains standard response methods.
The following are methods for ReactionsListResponse
.
Signature
Return Value
Type: List<Slack.ReactionsListResponse.Item>
Signature
Return Value
Type: Slack.Paging
Signature
Parameters
items
Type: List<Slack.ReactionsListResponse.Item>
Return Value
Type: void
Signature
Parameters
paging
Type: Slack.Paging
The following are methods for ReactionsListResponse.Icons
.
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Parameters
image36
Type: String
Return Value
Type: void
Signature
Parameters
image48
Type: String
Return Value
Type: void
Signature
Parameters
image64
Type: String
Return Value
Type: void
Signature
Parameters
image72
Type: String
Return Value
Type: void
The following are methods for ReactionsListResponse.Item
.
Signature
Return Value
Type: String
Signature
Return Value
Type: Slack.ReactionsListResponse.Message
Signature
Return Value
Type: String
Signature
Parameters
channel
Type: String
Return Value
Type: void
Signature
Parameters
message
Type: Slack.ReactionsListResponse.Message
Return Value
Type: void
Signature
Parameters
type
Type: String
Return Value
Type: void
Represents a message in the response, which contains the channel ID for the message.
Usage
See Slack's reactions.list method.
The following are methods for ReactionsListResponse.Message
.
Signature
Return Value
Type: String
Signature
Return Value
Type: Slack.BotProfile
Signature
Return Value
Type: String
Signature
Return Value
Type: List<Slack.File>
Signature
Return Value
Type: Slack.ReactionsListResponse.Icons
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: List<Slack.Reaction>
Signature
Return Value
Type: Integer
Signature
Return Value
Type: List<String>
Signature
Return Value
Type: Integer
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: Slack.ReactionsListResponse.UserProfile
Signature
Return Value
Type: String
Signature
Return Value
Type: Boolean
Signature
Return Value
Type: Boolean
Signature
Return Value
Type: Boolean
Signature
Return Value
Type: Boolean
Signature
Parameters
botId
Type: String
Return Value
Type: void
Signature
Parameters
botProfile
Type: Slack.BotProfile
Return Value
Type: void
Signature
Parameters
clientMsgId
Type: String
Return Value
Type: void
Signature
Parameters
displayAsBot
Type: Boolean
Return Value
Type: void
Signature
Parameters
files
Type: List<Slack.File>
Return Value
Type: void
Signature
Parameters
icons
Type: Slack.ReactionsListResponse.Icons
Return Value
Type: void
Signature
Parameters
inviter
Type: String
Return Value
Type: void
Signature
Parameters
lastRead
Type: String
Return Value
Type: void
Signature
Parameters
latestReply
Type: String
Return Value
Type: void
Signature
Parameters
locked
Type: Boolean
Return Value
Type: void
Signature
Parameters
parentUserId
Type: String
Return Value
Type: void
Signature
Parameters
permalink
Type: String
Return Value
Type: void
Signature
Parameters
reactions
Type: List<Slack.Reaction>
Return Value
Type: void
Signature
Parameters
replyCount
Type: Integer
Return Value
Type: void
Signature
Parameters
replyUsers
Type: List<String>
Return Value
Type: void
Signature
Parameters
replyUsersCount
Type: Integer
Return Value
Type: void
Signature
Parameters
sourceTeam
Type: String
Return Value
Type: void
Signature
Parameters
subscribed
Type: Boolean
Return Value
Type: void
Signature
Parameters
subtype
Type: String
Return Value
Type: void
Signature
Parameters
team
Type: String
Return Value
Type: void
Signature
Parameters
text
Type: String
Return Value
Type: void
Signature
Parameters
threadTs
Type: String
Return Value
Type: void
Signature
Parameters
ts
Type: String
Return Value
Type: void
Signature
Parameters
type
Type: String
Return Value
Type: void
Signature
Parameters
upload
Type: Boolean
Return Value
Type: void
Signature
Parameters
user
Type: String
Return Value
Type: void
Signature
Parameters
username
Type: String
Return Value
Type: void
Signature
Parameters
userProfile
Type: Slack.ReactionsListResponse.UserProfile
Return Value
Type: void
Signature
Parameters
userTeam
Type: String
Return Value
Type: void
The following are methods for ReactionsListResponse.MessageRootReply
.
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Parameters
ts
Type: String
Return Value
Type: void
Signature
Parameters
user
Type: String
Return Value
Type: void
The following are methods for ReactionsListResponse.UserProfile
.
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: String
Signature
Return Value
Type: Boolean
Signature
Return Value
Type: Boolean
Signature
Parameters
avatarHash
Type: String
Return Value
Type: void
Signature
Parameters
displayName
Type: String
Return Value
Type: void
Signature
Parameters
firstName
Type: String
Return Value
Type: void
Signature
Parameters
image72
Type: String
Return Value
Type: void
Signature
Parameters
name
Type: String
Return Value
Type: void
Signature
Parameters
realName
Type: String
Return Value
Type: void
Signature
Parameters
restricted
Type: Boolean
Return Value
Type: void
Signature
Parameters
team
Type: String
Return Value
Type: void
Signature
Parameters
ultraRestricted
Type: Boolean
Return Value
Type: void
Sends a request to remove a reaction from an item.
Usage
See Slack’s reactions.remove method.
The following are methods for ReactionsRemoveRequest
.
Builds a request object that's used when executing the API call.
Signature
Return Value
Type: Slack.ReactionsRemoveRequest.Builder
Contains methods to build an instance of the Slack.ReactionsRemoveRequest
class.
A Builder object is obtained by invoking one of the ReactionsRemoveRequest.builder
methods defined by the ReactionsRemoveRequest
class.
The following are methods for ReactionsRemoveRequest.Builder
. These methods are optional unless specified otherwise. One of file(file)
, fileComment(fileComment)
, or the combination of channel(channel)
and timestamp(timestamp)
must be specified.
Required. Returns an instance of Slack.ReactionsRemoveRequest
.
Signature
Return Value
Type: Slack.ReactionsRemoveRequest
The channel where the message to remove reaction from was posted.
Signature
Parameters
channel
Type: String
Return Value
Type: Slack.ReactionsRemoveRequest.Builder
The file to remove reaction from.
Signature
Parameters
file
Type: String
Return Value
Type: Slack.ReactionsRemoveRequest.Builder
The file comment to get reactions for.
Signature
Parameters
fileComment
Type: String
Return Value
Type: Slack.ReactionsRemoveRequest.Builder
Required. The reaction (emoji) name.
Signature
Parameters
name
Type: String
Return Value
Type: Slack.ReactionsRemoveRequest.Builder
Timestamp of the message to remove reaction from.
Signature
Parameters
timestamp
Type: String
Return Value
Type: Slack.ReactionsRemoveRequest.Builder
Removes a reaction from an item.
Usage
See Slack’s reactions.remove method.
This class contains standard response methods.