Alexia.API (alexia v0.8.1)
Provides basic functionalities for Telegram Bot API.
Link to this section Summary
Link to this section Functions
Link to this function
build_file_url(bot_id, file_path)
Specs
Use this function to build file url.
iex> Alexia.API.build_file_url("bot_token","document/file_10") "https://api.telegram.org/file/botbot_token/document/file_10"
Link to this function
request(method, bot_id, options \\ [], file_field \\ nil)
Specs
request(binary(), binary(), [{atom(), any()}], atom()) :: :ok | {:error, Alexia.Model.Error.t()} | {:ok, any()}
Generic method to call Telegram Bot API.
Args:
method
- name of API methodbot_token
- token of the botoptions
- orddict of optionsfile_field
- specify the key of file_field inoptions
when sending files
Link to this function
request?(method, bot_id, options \\ [], file_field \\ nil)
Link to this function