teloxide/src/types/file.rs

21 lines
791 B
Rust
Raw Normal View History

2019-12-11 22:19:48 +06:00
/// This object represents a file ready to be downloaded. The file can be
/// downloaded via the link `https://api.telegram.org/file/bot<token>/<file_path>`.
/// It is guaranteed that the link will be valid for at least 1 hour. When the
/// link expires, a new one can be requested by calling [`Bot::get_file`].
///
/// [The official docs](https://core.telegram.org/bots/api#file).
///
/// [`Bot::get_file`]: ../../teloxide/struct.Bot.html#method.get_file
#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct File {
2019-12-11 22:19:48 +06:00
/// Identifier for this file.
pub file_id: String,
2019-12-11 22:19:48 +06:00
/// File size, if known.
pub file_size: u32,
2019-12-11 22:19:48 +06:00
/// File path. Use `https://api.telegram.org/file/bot<token>/<file_path>`
/// to get the file.
2019-09-19 01:30:30 +03:00
pub file_path: String,
}