Nadia.Client (nadia v1.5.0)

View Source

Immutable Telegram Bot API client configuration.

Summary

Functions

Builds the legacy default client from application config.

Builds the legacy default client from top-level application config.

Builds a named client from config :nadia, bots: [...].

Builds a client from explicit options.

Types

api_environment()

@type api_environment() :: :production | :test

t()

@type t() :: %Nadia.Client{
  api_environment: api_environment(),
  base_url: binary(),
  file_base_url: binary(),
  http_client: module(),
  proxy: term(),
  proxy_auth: term(),
  recv_timeout: non_neg_integer(),
  token: binary() | nil
}

Functions

default()

@spec default() :: t()

Builds the legacy default client from application config.

from_config()

@spec from_config() :: t()

Builds the legacy default client from top-level application config.

from_config(name)

@spec from_config(atom()) :: t()

Builds a named client from config :nadia, bots: [...].

new(opts \\ [])

@spec new(keyword() | map()) :: t()

Builds a client from explicit options.