View Source Elixteg.API (elixteg v0.7.0)
Provides basic functionalities for Telegram Bot API.
Link to this section Summary
Link to this section Functions
Use this function to build file url.
iex> Elixteg.API.build_file_url("document/file_10") "https://api.telegram.org/file/bot#{Elixteg.Config.token()}/document/file_10"
@spec request(binary(), [{atom(), any()}], atom()) :: :ok | {:error, Elixteg.Model.Error.t()} | {:ok, any()}
Generic method to call Telegram Bot API.
Args:
method
- name of API methodoptions
- orddict of optionsfile_field
- specify the key of file_field inoptions
when sending files