diff --git a/src/core/types/input_media.rs b/src/core/types/input_media.rs index e69de29b..c416295d 100644 --- a/src/core/types/input_media.rs +++ b/src/core/types/input_media.rs @@ -0,0 +1,68 @@ +use serde::Deserialize; + +pub enum InputMedia { + InputMediaPhoto(InputMediaPhoto), + InputMediaVideo(InputMediaVideo), + InputMediaAnimation(InputMediaAnimation), + InputMediaAudio(InputMediaAudiotype), + InputMediaDocument(InputMediaDocument), +} + +pub enum ThumbKind { + InputFile, + String, +} + +#[derive(Debug, Serialize)] +pub struct InputMediaPhoto { + type_: String, + media: String, + caption: Option, + parse_mode: Option, +} + +#[derive(Debug, Serialize)] +pub struct InputMediaVideo { + type_: String, + media: String, + thumb: ThumbKind, + caption: Option, + parse_mode: Option, + width: Option, + height: Option, + duration: Option, + supports_streaming: Option, +} + +#[derive(Debug, Serialize)] +pub struct InputMediaAnimation { + type_: String, + media: String, + thumb: Option, + caption: Option, + parse_mode: Option, + width: Option, + height: Option, + duration: Option, +} + +#[derive(Debug, Serialize)] +pub struct InputMediaAudio { + type_: String, + media: String, + thumb: Option, + caption: Option, + parse_mode: Option, + duration: Option, + performer: Option, + title: Option +} + +#[derive(Debug, Serialize)] +pub struct InputMediaDocument { + type_: String, + media: String, + thumb: Option, + caption: Option, + parse_mode: parse_mode, +} \ No newline at end of file