# `Noizu.Telegram.Client`
[🔗](https://github.com/noizu-labs-sdks/elixir-telegram/blob/v0.1.0/lib/noizu/telegram/client.ex#L1)

Bot API client configuration: token + base URL.

Precedence for `new/1` (later wins): app env `:noizu_telegram, :client`
defaults, then `opts`, then `TELEGRAM_BOT_TOKEN`.

The token is part of the Bot API URL path, so `Inspect` redacts it and
`redact/2` scrubs it from error text.

# `t`

```elixir
@type t() :: %Noizu.Telegram.Client{
  base_url: String.t(),
  req_options: keyword(),
  retry: keyword(),
  token: String.t() | nil,
  user_agent: String.t() | nil
}
```

# `from_opts`

```elixir
@spec from_opts(keyword()) :: t()
```

Client from call opts: `opts[:client]` wins; otherwise `new/1` on the
remaining opts (token override, env, app env).

# `new`

```elixir
@spec new(keyword()) :: t()
```

# `redact`

```elixir
@spec redact(t() | nil, String.t()) :: String.t()
```

Redact the client's token wherever it appears in `text`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
