A simple wrapper for posting to slack channels
Add slack_notifier
to your list of dependencies in mix.exs
:
def deps do
[{:slack_notifier, "~> 0.1.0"}]
end
Add to your config webhook url:
config :slack_notifier, webhook: "https://hooks.slack.com/services/xxx"
Documentation https://hexdocs.pm/slack_notifier.
Send message:
SlackNotifier.ping("Test slack notifier without icon")
:ok
Send message with icon emoji:
SlackNotifier.ping("Test slack notifier", icon_emoji: ":sos:")
:ok