diff --git a/src/core/types/CallbackQuery.rs b/src/core/types/callback_query.rs similarity index 100% rename from src/core/types/CallbackQuery.rs rename to src/core/types/callback_query.rs diff --git a/src/core/types/ChatMember.rs b/src/core/types/chat_member.rs similarity index 100% rename from src/core/types/ChatMember.rs rename to src/core/types/chat_member.rs diff --git a/src/core/types/ForceReply.rs b/src/core/types/force_reply.rs similarity index 100% rename from src/core/types/ForceReply.rs rename to src/core/types/force_reply.rs diff --git a/src/core/types/InlineKeyboardButton.rs b/src/core/types/inline_keyboard_button.rs similarity index 100% rename from src/core/types/InlineKeyboardButton.rs rename to src/core/types/inline_keyboard_button.rs diff --git a/src/core/types/InlineKeyboardMarkup.rs b/src/core/types/inline_keyboard_markup.rs similarity index 100% rename from src/core/types/InlineKeyboardMarkup.rs rename to src/core/types/inline_keyboard_markup.rs diff --git a/src/core/types/input_file.rs b/src/core/types/input_file.rs new file mode 100644 index 00000000..5475c572 --- /dev/null +++ b/src/core/types/input_file.rs @@ -0,0 +1,8 @@ +use serde::Deserialize; + +#[derive(Debug, Deserialize, Hash, PartialEq, Eq)] +pub enum InputFile { + File(std::fs::File), + Url(String), + FileId(String), +} diff --git a/src/core/types/input_media.rs b/src/core/types/input_media.rs new file mode 100644 index 00000000..c416295d --- /dev/null +++ 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 diff --git a/src/core/types/KeyboardButton.rs b/src/core/types/keyboard_button.rs similarity index 100% rename from src/core/types/KeyboardButton.rs rename to src/core/types/keyboard_button.rs diff --git a/src/core/types/login_url.rs b/src/core/types/login_url.rs new file mode 100644 index 00000000..d9b65771 --- /dev/null +++ b/src/core/types/login_url.rs @@ -0,0 +1,9 @@ +use serde::Deserialize; + +#[derive(Debug, Deserialize, Hash, PartialEq, Eq)] +pub struct LoginUrl { + url: String, + forward_text: Option, + bot_username: Option, + request_write_access: Option, +} \ No newline at end of file diff --git a/src/core/types/ReplyKeyboardMarkup.rs b/src/core/types/reply_keyboard_markup.rs similarity index 100% rename from src/core/types/ReplyKeyboardMarkup.rs rename to src/core/types/reply_keyboard_markup.rs diff --git a/src/core/types/ReplyKeyboardRemove.rs b/src/core/types/reply_keyboard_remove.rs similarity index 100% rename from src/core/types/ReplyKeyboardRemove.rs rename to src/core/types/reply_keyboard_remove.rs diff --git a/src/core/types/response_paramter.rs b/src/core/types/response_paramter.rs new file mode 100644 index 00000000..66a8d10d --- /dev/null +++ b/src/core/types/response_paramter.rs @@ -0,0 +1,7 @@ +use serde::Deserialize; + +#[derive(Debug, Deserialize, Hash, PartialEq, Eq)] +pub struct ResponseParameters { + migrate_to_chat_id: Option, + retry_after: Option, +} \ No newline at end of file