Added Video

This commit is contained in:
Mr-Andersen 2019-09-03 21:22:37 +03:00
parent 2d074e73e2
commit 3a80ecacc0
5 changed files with 29 additions and 17 deletions

View file

@ -4,7 +4,7 @@ use crate::core::types::{
VideoNote, Voice,
};
#[derive(Debug, Deserialize, Hash, PartialEq, Eq)]
#[derive(Debug, Deserialize, Eq, Hash, PartialEq)]
pub struct Message {
pub message_id: i64,
pub from: Option<Box<User>>,

View file

@ -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(tag = "type")]
pub enum MessageEntityKind {

View file

@ -31,6 +31,7 @@ pub use self::{
input_file::InputFile,
input_media::InputMedia,
parse_mode::ParseMode,
video::Video
};
mod answer_pre_checkout_query;
@ -59,3 +60,4 @@ mod user;
mod input_file;
mod input_media;
mod parse_mode;
mod video;

View file

@ -1,38 +1,35 @@
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct Location;
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct InlineKeyboardMarkup;
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct PassportData;
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct Poll;
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct Animation;
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct Game;
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct Contact;
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
pub struct Video;
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct VideoNote;
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct Venue;
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct Voice;
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct MaskPosition;
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct ChatMemberStatus;

13
src/core/types/video.rs Normal file
View 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>
}