Slack BlockKit
Megaphone provides a fluent BlockKit API to build a SlackMessage
. It starts by calling the newSlackMessage
provided to the toSlack
method on the Notification.
function toSlack( notifiable, newSlackMessage ) {
return newSlackMessage();
}
For the individual methods and building blocks, please see the reference documentation.
SlackMessageAn important callout is the dump
method. This method can writeDump
a memento of the SlackMessage
instance when passing the raw
parameter as true
. The default, however, is to writeDump
a URL that takes you to Slack's BlockKit Builder to visually see your message.
public void function dump(
boolean raw = false,
string output = "browser",
string format = "html",
boolean abort = false,
string label = "",
boolean metainfo = false,
numeric top = 9999,
string show = "",
string hide = "",
numeric keys = 9999,
boolean expand = true,
boolean showUDFs = true
);
Example URL:
Last updated