Nadia. API
(nadia v1.6.1)
View Source
Provides basic functionalities for Telegram Bot API.
Summary
Functions
Use this function to build file url.
iex> Nadia.API.build_file_url("document/file_10") "https://api.telegram.org/file/bot#{Nadia.Config.token()}/document/file_10"
@spec build_file_url(Nadia.Client.t(), binary()) :: binary()
@spec request(binary(), [{atom(), any()}], atom()) :: :ok | {:error, Nadia.Model.Error.t()} | {:ok, any()}
Generic method to call Telegram Bot API.
Args:
method- name of API methodoptions- keyword list of optionsfile_field- legacy binary field whose existing local path should be uploaded
Explicit Nadia.InputFile values are discovered in every top-level option
and in Nadia's structured JSON media payloads.
@spec request(Nadia.Client.t(), binary(), [{atom(), any()}] | map(), atom() | nil) :: :ok | {:error, Nadia.Model.Error.t()} | {:ok, any()}