ex_gram v0.10.0 ExGram.File View Source

Helpers when dealing with telegram files

Link to this section Summary

Functions

Generate the full file URL ready to be downloaded, usage

Link to this section Functions

Link to this function

file_url(file, ops \\ [])

View Source
file_url(ExGram.Model.File.t(), keyword()) :: String.t()

Generate the full file URL ready to be downloaded, usage:

First, you need to extract the File with ExGram.get_file(file_id)

Then:

ExGram.File.file_url(file)

You can pass the usual :bot and :token params:

ExGram.File.file_url(file, bot: :my_bot) ExGram.File.file_url(file, token: "MyBotToken")