Skip to content

asdfzxcx/simple_slack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleSlack

Build Status Hex.pm Hex.pm

Very simple slack client using incoming webhooks.

Installation

Add simple_slack to application and deps in mix.exs.

Then, update your dependencies by $ mix deps.get.

Usage

Get your token on slack webhook page.

$ iex -S mix
iex> token = "T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
iex> SimpleSlack.notify_text(token, "Ika is a sushi.")

Other examples:

SimpleSlack.notify(token, %{text: "Maguro is a sushi too.",
                            username: "sushi-bot",
                            icon_emoji: ":sushi:"})

SimpleSlack.notify(token, %{text: "Tako is a sushi too.",
                            attachments: [%{author_name: "sushi-taisho",
                                            fallback: "Required plain-text summary of the attachment.",
                                            title: "sushi-attachment",
                                            text: "Optional text"}]})

For more details about Slack API

See Basic message formatting and Attaching content and links to messages.

About

Very simple slack client using incoming webhooks.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Elixir 100.0%