API Reference Slink v#0.6.0

Copy Markdown View Source

Modules

A lightweight Slack bot toolkit.

A thin Slack Web API client built on Req.

Raised by Slink.API.stream/3 when a page fetch fails mid-stream.

Plain functions that build Block Kit maps — no DSL, no macros.

The context passed to Slink.handle_event/2.

Drops Slack's retried event deliveries so a handler never fires twice.

A Slack event, normalised into one shape regardless of transport.

Events API transport: a Plug that receives Slack's HTTP event callbacks.

A tiny example bot. Replies to app_mention events and logs everything else.

Caches the bot's own identity (auth.test) per token.

The OAuth install flow for a multi-workspace ("Add to Slack") app.

A completed workspace installation, normalised from oauth.v2.access.

The OAuth redirect endpoint: turns Slack's ?code=… callback into a stored installation.

Per-channel outbound rate limiting for Slack Web API calls.

A single channel's outbound queue. Drains one request, then waits the configured interval before the next — so a channel never exceeds Slack's ~1 msg/sec limit. One of these runs per channel under Slink.Rate.Supervisor.

Socket Mode transport: a GenServer that keeps a WebSocket open to Slack.

Unit-test your bot's Slink.handle_event/2 without Slack.

Mix Tasks

Verifies a real workspace end to end — auth.test, but for everything Slink uses, including whether the AI streaming surface is enabled for the app.