Explicit connection configuration, passed as the first argument to every Web API call.
client = Noizu.Slack.Client.new()
{:ok, %{"user_id" => _}} = Noizu.Slack.Auth.test(client)Precedence
:token—opts[:token]→Application.get_env(:noizu_slack, :client)[:token]→System.get_env("SLACK_BOT_TOKEN").- every other field —
opts→ application env → default.
Options
:token— bot (xoxb-) or user (xoxp-) token. May be nil at construction; required at request time ({:error, %Error{tag: :config}}otherwise).:base_url— Web API root. Default"https://slack.com/api".:user_agent—User-Agentheader. Default"noizu_slack/0.1.0 (+https://github.com/noizu-labs-sdks/elixir-slack)".:req_options— keyword merged into everyReq.request/1(e.g.plug: {Req.Test, MyStub},receive_timeout:). The library's own method, url, auth header andretry: falsestay authoritative.:retry— keyword::max_attempts(default3, total attempts),:base_backoff_ms(default500, used when noRetry-Afteris sent),:max_retry_after_ms(default30_000, clamp on server-supplied delays),:sleep_fn(default&Process.sleep/1, test hook).
The Inspect implementation redacts the token.
Summary
Functions
The default User-Agent header value.
Builds a client. See the module doc for option precedence.