mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
Added Video
This commit is contained in:
parent
2d074e73e2
commit
3a80ecacc0
5 changed files with 29 additions and 17 deletions
|
@ -4,7 +4,7 @@ use crate::core::types::{
|
||||||
VideoNote, Voice,
|
VideoNote, Voice,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Hash, PartialEq, Eq)]
|
#[derive(Debug, Deserialize, Eq, Hash, PartialEq)]
|
||||||
pub struct Message {
|
pub struct Message {
|
||||||
pub message_id: i64,
|
pub message_id: i64,
|
||||||
pub from: Option<Box<User>>,
|
pub from: Option<Box<User>>,
|
||||||
|
|
|
@ -10,7 +10,7 @@ pub struct MessageEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[derive(Deserialize, Debug, PartialEq, Hash, Eq)]
|
#[derive(Debug, Deserialize, Eq, Hash, PartialEq)]
|
||||||
#[serde(rename_all = "snake_case")]
|
#[serde(rename_all = "snake_case")]
|
||||||
#[serde(tag = "type")]
|
#[serde(tag = "type")]
|
||||||
pub enum MessageEntityKind {
|
pub enum MessageEntityKind {
|
||||||
|
|
|
@ -31,6 +31,7 @@ pub use self::{
|
||||||
input_file::InputFile,
|
input_file::InputFile,
|
||||||
input_media::InputMedia,
|
input_media::InputMedia,
|
||||||
parse_mode::ParseMode,
|
parse_mode::ParseMode,
|
||||||
|
video::Video
|
||||||
};
|
};
|
||||||
|
|
||||||
mod answer_pre_checkout_query;
|
mod answer_pre_checkout_query;
|
||||||
|
@ -59,3 +60,4 @@ mod user;
|
||||||
mod input_file;
|
mod input_file;
|
||||||
mod input_media;
|
mod input_media;
|
||||||
mod parse_mode;
|
mod parse_mode;
|
||||||
|
mod video;
|
||||||
|
|
|
@ -1,38 +1,35 @@
|
||||||
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
|
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
|
||||||
pub struct Location;
|
pub struct Location;
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
|
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
|
||||||
pub struct InlineKeyboardMarkup;
|
pub struct InlineKeyboardMarkup;
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
|
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
|
||||||
pub struct PassportData;
|
pub struct PassportData;
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
|
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
|
||||||
pub struct Poll;
|
pub struct Poll;
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
|
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
|
||||||
pub struct Animation;
|
pub struct Animation;
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
|
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
|
||||||
pub struct Game;
|
pub struct Game;
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
|
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
|
||||||
pub struct Contact;
|
pub struct Contact;
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
|
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
|
||||||
pub struct Video;
|
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
|
|
||||||
pub struct VideoNote;
|
pub struct VideoNote;
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
|
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
|
||||||
pub struct Venue;
|
pub struct Venue;
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
|
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
|
||||||
pub struct Voice;
|
pub struct Voice;
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
|
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
|
||||||
pub struct MaskPosition;
|
pub struct MaskPosition;
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
|
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
|
||||||
pub struct ChatMemberStatus;
|
pub struct ChatMemberStatus;
|
||||||
|
|
13
src/core/types/video.rs
Normal file
13
src/core/types/video.rs
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
use crate::core::types::{PhotoSize, UnsignedInteger};
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
|
||||||
|
pub struct Video {
|
||||||
|
pub file_id: String,
|
||||||
|
pub width: UnsignedInteger,
|
||||||
|
pub height: UnsignedInteger,
|
||||||
|
pub duration: UnsignedInteger,
|
||||||
|
pub thumb: Option<PhotoSize>,
|
||||||
|
pub mime_type: Option<String>,
|
||||||
|
pub file_size: Option<UnsignedInteger>
|
||||||
|
}
|
Loading…
Reference in a new issue