API Reference Slackbox v#0.1.0

Copy Markdown View Source

Modules

Slackbox — a Swoosh-style Slack library.

The contract every Slackbox adapter implements (Live, Local, Test).

Live adapter. A thin, owned Req-based Slack Web API client — the SAME app code that renders in the fake dev UI (Local) actually posts to Slack when this adapter is configured.

Local adapter. Persists outbound messages into the in-memory Slackbox.Store (which powers the fake-Slack dev UI) instead of talking to the real Slack API.

Test adapter. Captures each outbound call by sending {:slackbox, action, args} to the current process and to every pid in $callers (so captures survive Task.async and async: true tests). Pair with Slackbox.TestAssertions.

A Slack-like "fake Slack" dashboard, rendered live. A host app can mount it with live "/dev/slack", Slackbox.DashboardLive.

A one-command demo server for the fake-Slack dev UI.

A sample Slack app standing in for the user's own app in the demo. It plays the role of the app that receives interactions and events

A Slack message with composable pipe builders — the Slack analogue of Swoosh.Email. The struct alone fully determines what the fake Slack dev UI renders, so message content lives here (not in per-call options).

Turns a module into your app's Slack notifier — the single choke point every outbound Slack call flows through, dispatching to a per-environment adapter.

A Plug.Router a host app mounts to receive Slack response_url callbacks.

Slack request signing (HMAC-SHA256).

Turns a UI button click in the fake-Slack dashboard into a realistic inbound Slack interaction.

In-memory store of Slack messages for the fake-Slack dev UI.

Pure inbound-payload builders for unit-testing your Slack endpoints.

Assertions for the Slackbox.Adapters.Test adapter, in the spirit of Swoosh.TestAssertions. import it in your test module

Mix Tasks

Boot a self-contained demo server for the fake-Slack dev UI.