public interface Shortcut
| Modifier and Type | Method and Description |
|---|---|
ReactionsAddResponse |
addReaction(Message message,
ReactionName reactionName)
Adds a reaction to a specified message.
|
Optional<ChannelId> |
findChannelIdByName(ChannelName name)
Returns ChannelId corresponding to a given channel name if exists.
|
Optional<ChannelName> |
findChannelNameById(ChannelId channelId)
Returns a channel's human readable name corresponding to a given channel id if exists.
|
List<Message> |
findRecentMessagesByName(ChannelName name)
Returns a list of messages in the channel a given name matches.
|
ChatPostMessageResponse |
post(ChannelName channel,
String text)
Posts a message to a given channel.
|
ChatPostMessageResponse |
post(ChannelName channel,
String text,
List<Attachment> attachments)
Posts a message to a given channel.
|
ChatPostMessageResponse |
postAsBot(ChannelName channel,
String text) |
ChatPostMessageResponse |
postAsBot(ChannelName channel,
String text,
List<Attachment> attachments) |
SearchAllResponse |
search(String query)
Returns search result by a given query.
|
void |
updateChannelsCache()
Shortcut internally has a cache for channels API response.
|
void updateChannelsCache()
throws IOException,
SlackApiException
IOExceptionSlackApiExceptionOptional<ChannelId> findChannelIdByName(ChannelName name) throws IOException, SlackApiException
IOExceptionSlackApiExceptionOptional<ChannelName> findChannelNameById(ChannelId channelId)
List<Message> findRecentMessagesByName(ChannelName name) throws IOException, SlackApiException
IOExceptionSlackApiExceptionReactionsAddResponse addReaction(Message message, ReactionName reactionName) throws IOException, SlackApiException
IOExceptionSlackApiExceptionSearchAllResponse search(String query) throws IOException, SlackApiException
IOExceptionSlackApiExceptionChatPostMessageResponse post(ChannelName channel, String text) throws IOException, SlackApiException
IOExceptionSlackApiExceptionChatPostMessageResponse postAsBot(ChannelName channel, String text) throws IOException, SlackApiException
IOExceptionSlackApiExceptionChatPostMessageResponse post(ChannelName channel, String text, List<Attachment> attachments) throws IOException, SlackApiException
IOExceptionSlackApiExceptionChatPostMessageResponse postAsBot(ChannelName channel, String text, List<Attachment> attachments) throws IOException, SlackApiException
IOExceptionSlackApiExceptionCopyright © 2018. All Rights Reserved.