Noizu.Slack.Webhook (Noizu.Slack v0.1.0)

Copy Markdown View Source

Incoming webhooks — no client or token; the URL is the credential (treat it as a secret: never log it).

Noizu.Slack.Webhook.post(url, %{text: "deploy finished", blocks: blocks})

Slack answers 200 "ok" on success and a plain-text error otherwise (invalid_payload, no_text, channel_is_archived, …).

Options

Summary

Functions

POST <webhook url> — posts a JSON message payload to an incoming webhook.

Functions

post(url, payload, opts \\ [])

@spec post(String.t(), map() | String.t(), keyword()) ::
  {:ok, String.t()} | {:error, Noizu.Slack.Error.t()}

POST <webhook url> — posts a JSON message payload to an incoming webhook.