public class Slack extends Object
| Constructor and Description |
|---|
Slack(String webhookUrl) |
Slack(String webhookUrl,
Proxy proxy) |
Slack(String webhookUrl,
String hostname,
int port) |
| Modifier and Type | Method and Description |
|---|---|
Slack |
displayName(String user)
Change the display name
|
Slack |
icon(String imageOrIcon)
Change the bot icon
|
Slack |
parse(String parse)
Possible values being "full" or "none"
|
void |
push(List<SlackAttachment> attachments)
Publish message as SlackAttachment
|
void |
push(SlackAttachment attachment)
Publish message as SlackAttachment
|
void |
push(SlackMessage message)
Publishes messages to Slack Webhook
|
Slack |
sendToChannel(String channel)
Send the message to a particular channel
|
Slack |
sendToUser(String sendToUser)
Send the message to a particular user
|
Slack |
setWebhookUrl(String webhookUrl)
Update the webhook url of the underlying Slack service
|
public Slack(String webhookUrl)
public Slack sendToChannel(String channel)
channel - Channel to sendpublic Slack sendToUser(String sendToUser)
sendToUser - User to sendpublic Slack displayName(String user)
user - Display namepublic Slack icon(String imageOrIcon)
imageOrIcon - Icon Image URL or emoji code from http://www.emoji-cheat-sheet.com/public Slack parse(String parse)
parse - public Slack setWebhookUrl(String webhookUrl)
webhookUrl - public void push(SlackMessage message) throws IOException
message - Message to sendIOExceptionpublic void push(SlackAttachment attachment) throws IOException
attachment - SlackAttachment to sendIOExceptionpublic void push(List<SlackAttachment> attachments) throws IOException
attachments - SlackAttachment to sendIOExceptionCopyright © 2017. All rights reserved.