Slackbox.Adapter behaviour (Slackbox v0.1.0)

Copy Markdown View Source

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

A single call/3 entry point dispatches every Slack action, so adapters can pattern-match on the action atom rather than implementing one callback each.

Summary

Types

action()

@type action() ::
  :post_message | :post_ephemeral | :update | :delete | :open_view | :respond

args()

@type args() :: map()

config()

@type config() :: keyword()

Callbacks

call(action, args, config)

@callback call(action(), args(), config()) :: {:ok, map()} | {:error, term()}