Slack
A client for the Slack API.
Usage
Most of the API methods work by first creating a Slack client
(Slack.client(token)
) and then passing it in to an API call. Note that a
Slack.Client
is only a convenience wrapper for a map with a :token
key.
{:ok, %{"channel" => channel}} =
token
|> Slack.client
|> Slack.Channel.create(name: "mynewchannel")
Installation
If available in Hex, the package can be installed as:
Add
slack
to your list of dependencies inmix.exs
:def deps do [{:slack_ex, "~> 0.0.12"}] end ```