From 3aac9a43c5099d0a4789776569094ae16baebe03 Mon Sep 17 00:00:00 2001 From: ferristhecrab Date: Thu, 12 Sep 2019 23:52:19 +0500 Subject: [PATCH] export implemented types --- src/core/types/game.rs | 2 +- src/core/types/mod.rs | 31 ++++++++++++++++--------------- src/core/types/video_note.rs | 3 ++- src/core/types/voice.rs | 2 +- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/core/types/game.rs b/src/core/types/game.rs index f347b2fc..2edf6383 100644 --- a/src/core/types/game.rs +++ b/src/core/types/game.rs @@ -1,6 +1,6 @@ use serde::Deserialize; -use crate::core::types::MessageEntity; +use crate::core::types::{MessageEntity, PhotoSize, Animation}; #[derive(Debug, Deserialize, Clone)] /// This object represents a game. Use BotFather to create and edit games, their short names diff --git a/src/core/types/mod.rs b/src/core/types/mod.rs index e03a14ee..c17d916e 100644 --- a/src/core/types/mod.rs +++ b/src/core/types/mod.rs @@ -2,13 +2,16 @@ use self::not_implemented_types::*; pub use self::{ answer_pre_checkout_query::AnswerPreCheckoutQuery, answer_shipping_query::AnswerShippingQuery, + animation::Animation, audio::Audio, chat::{Chat, ChatKind, NonPrivateChatKind}, chat_member::ChatMember, chat_permissions::ChatPermissions, chat_photo::ChatPhoto, + contact::Contact, document::Document, force_reply::ForceReply, + game::Game, inline_keyboard_button::{InlineKeyboardButton, InlineKeyboardButtonKind}, inline_keyboard_markup::InlineKeyboardMarkup, input_file::InputFile, @@ -16,6 +19,8 @@ pub use self::{ invoice::Invoice, keyboard_button::KeyboardButton, label_price::LabeledPrice, + location::Location, + mask_position::MaskPosition, message::{ ForwardKind, ForwardedFrom, MediaKind, Message, MessageKind, Sender, }, @@ -36,20 +41,13 @@ pub use self::{ sticker::Sticker, successful_payment::SuccessfulPayment, user::User, + venue::Venue, video::Video, - reply_markup::ReplyMarkup, - force_reply::ForceReply, - inline_keyboard_button::InlineKeyboardButton, - inline_keyboard_markup::InlineKeyboardMarkup, - reply_keyboard_remove::ReplyKeyboardRemove, - reply_keyboard_markup::ReplyKeyboardMarkup, - keyboard_button::KeyboardButton, - update::{Update, UpdateKind}, - chosen_inline_result::ChosenInlineResult, - location::Location, - callback_query::CallbackQuery, + video_note::VideoNote, + voice::Voice, }; +mod animation; mod answer_pre_checkout_query; mod answer_shipping_query; mod audio; @@ -57,8 +55,10 @@ mod chat; mod chat_member; mod chat_permissions; mod chat_photo; +mod contact; mod document; mod force_reply; +mod game; mod inline_keyboard_button; mod inline_keyboard_markup; mod input_file; @@ -66,6 +66,8 @@ mod input_media; mod invoice; mod keyboard_button; mod label_price; +mod location; +mod mask_position; mod message; mod message_entity; mod not_implemented_types; @@ -85,8 +87,7 @@ mod shipping_query; mod sticker; mod successful_payment; mod user; +mod venue; mod video; -mod update; -mod chosen_inline_result; -mod location; -mod callback_query; +mod video_note; +mod voice; diff --git a/src/core/types/video_note.rs b/src/core/types/video_note.rs index 4cab3979..00b3f6e2 100644 --- a/src/core/types/video_note.rs +++ b/src/core/types/video_note.rs @@ -1,9 +1,10 @@ use serde::Deserialize; +use crate::core::types::PhotoSize; #[derive(Debug, Deserialize, Clone)] /// This object represents a [video message](https://telegram.org/blog/video-messages-and-telescope) /// (available in Telegram apps as of v.4.0). -struct VideoNote { +pub struct VideoNote { /// Identifier for this file pub file_id: String, /// Video width and height (diameter of the video message) as defined by sender diff --git a/src/core/types/voice.rs b/src/core/types/voice.rs index ed6531c2..6147b470 100644 --- a/src/core/types/voice.rs +++ b/src/core/types/voice.rs @@ -2,7 +2,7 @@ use serde::Deserialize; #[derive(Debug, Deserialize, Clone)] /// This object represents a voice note. -struct Voice { +pub struct Voice { /// Identifier for this file pub file_id: String, /// Duration of the audio in seconds as defined by sender