# Slink v0.6.0 - API Reference

## Modules

- [Slink](Slink.md): A lightweight Slack bot toolkit.

- Transports
  - [Slink.EventsApi.Plug](Slink.EventsApi.Plug.md): Events API transport: a `Plug` that receives Slack's HTTP event callbacks.
  - [Slink.SocketMode](Slink.SocketMode.md): Socket Mode transport: a `GenServer` that keeps a WebSocket open to Slack.

- Web API
  - [Slink.API](Slink.API.md): A thin Slack Web API client built on `Req`.
  - [Slink.API.Error](Slink.API.Error.md): Raised by `Slink.API.stream/3` when a page fetch fails mid-stream.
  - [Slink.Identity](Slink.Identity.md): Caches the bot's own identity (`auth.test`) per token.
  - [Slink.Rate](Slink.Rate.md): Per-channel outbound rate limiting for Slack Web API calls.
  - [Slink.Rate.Channel](Slink.Rate.Channel.md): 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`.

- Events
  - [Slink.Context](Slink.Context.md): The context passed to `c:Slink.handle_event/2`.
  - [Slink.Dedup](Slink.Dedup.md): Drops Slack's *retried* event deliveries so a handler never fires twice.
  - [Slink.Event](Slink.Event.md): A Slack event, normalised into one shape regardless of transport.

- Block Kit
  - [Slink.BlockKit](Slink.BlockKit.md): Plain functions that build Block Kit maps — no DSL, no macros.

- Installation
  - [Slink.OAuth](Slink.OAuth.md): The OAuth install flow for a multi-workspace ("Add to Slack") app.
  - [Slink.OAuth.Install](Slink.OAuth.Install.md): A completed workspace installation, normalised from `oauth.v2.access`.
  - [Slink.OAuth.Plug](Slink.OAuth.Plug.md): The OAuth redirect endpoint: turns Slack's `?code=…` callback into a stored
installation.

- Testing
  - [Slink.Testing](Slink.Testing.md): Unit-test your bot's `c:Slink.handle_event/2` without Slack.
  - [Slink.Testing.Run](Slink.Testing.Run.md): What a `Slink.Testing.run/3` observed.

- Examples
  - [Slink.ExampleBot](Slink.ExampleBot.md): A tiny example bot. Replies to `app_mention` events and logs everything else.

## Mix Tasks

- [mix slink.smoke](Mix.Tasks.Slink.Smoke.md): 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.

