A package that allows sending to slack. It uses a configuration file stored in the home directory of the user. It allows for multiple named configurations, if several slack servers are used.
NOTE Version 1.0 breaks compatibility with earlier versions.
using Pkg
Pkg.add("Slacker")
using Slacker
# replace the url with your incoming Webhook URL
cfg = SlackConfig("https://hooks.slack.com/services/....", "JuliaBot", "#general", ":ghost:")
addConfig(cfg)
sendMessage("Hi this is a Test from Slacker.")
using Slacker
cfg1 = SlackConfig("url1", "JuliaBot", "#general", ":ghost:")
cfg2 = SlackConfig("url2", "JuliaBot2", "@sumidu", ":smile:")
addConfig(cfg, "server1")
addConfig(cfg, "server2")
sendMessage("Hi this is a Test from Slacker to server1.", "server1")
sendMessage("Hi this is a Test from Slacker to server1.", "server2")
using Slacker
cfg = loadConfig("server1")
cfg.channel = "#random"
cfg.user = "Julia Random Bot"
cfg.icon_emoji = ":grinning:"
sendMessage("Hi this is a Test from Slacker to server1.", cfg)