diff --git a/src/bot/api.rs b/src/bot/api.rs index 37efa01f..d10d83b1 100644 --- a/src/bot/api.rs +++ b/src/bot/api.rs @@ -1,12 +1,9 @@ use crate::{ bot::Bot, requests::{ - edit_message_live_location::EditMessageLiveLocation, - forward_message::ForwardMessage, get_file::GetFile, get_me::GetMe, - send_audio::SendAudio, send_location::SendLocation, - send_media_group::SendMediaGroup, send_message::SendMessage, - send_photo::SendPhoto, - stop_message_live_location::StopMessageLiveLocation, ChatId, + ChatId, EditMessageLiveLocation, ForwardMessage, GetFile, GetMe, + SendAudio, SendLocation, SendMediaGroup, SendMessage, SendPhoto, + StopMessageLiveLocation, }, types::{InputFile, InputMedia}, }; diff --git a/src/requests/get_user_profile_photos.rs b/src/requests/get_user_profile_photos.rs index 7123151b..5feca84e 100644 --- a/src/requests/get_user_profile_photos.rs +++ b/src/requests/get_user_profile_photos.rs @@ -5,7 +5,7 @@ use crate::requests::RequestContext; ///Use this method to get a list of profile pictures for a user. Returns a /// UserProfilePhotos object. #[derive(Debug, Clone, Serialize)] -struct GetUserProfilePhotos<'a> { +pub struct GetUserProfilePhotos<'a> { #[serde(skip_serializing)] ctx: RequestContext<'a>, /// Unique identifier of the target user diff --git a/src/requests/kick_chat_member.rs b/src/requests/kick_chat_member.rs index b33616ce..baabe494 100644 --- a/src/requests/kick_chat_member.rs +++ b/src/requests/kick_chat_member.rs @@ -6,7 +6,7 @@ use crate::requests::RequestContext; /// bot must be an administrator in the chat for this to work and must have the /// appropriate admin rights. Returns True on success. #[derive(Debug, Clone, Serialize)] -struct KickChatMember<'a> { +pub struct KickChatMember<'a> { #[serde(skip_serializing)] ctx: RequestContext<'a>, } diff --git a/src/requests/mod.rs b/src/requests/mod.rs index 0c793a52..3eef8f34 100644 --- a/src/requests/mod.rs +++ b/src/requests/mod.rs @@ -7,6 +7,22 @@ use std::{future::Future, pin::Pin}; use crate::RequestError; +pub use self::{ + answer_pre_checkout_query::AnswerPreCheckoutQuery, + answer_shipping_query::AnswerShippingQuery, + edit_message_live_location::EditMessageLiveLocation, + forward_message::ForwardMessage, get_chat::GetChat, get_file::GetFile, + get_me::GetMe, get_updates::GetUpdates, + get_user_profile_photos::GetUserProfilePhotos, + kick_chat_member::KickChatMember, restrict_chat_member::RestrictChatMember, + send_audio::SendAudio, send_chat_action::SendChatAction, + send_contact::SendContact, send_location::SendLocation, + send_media_group::SendMediaGroup, send_message::SendMessage, + send_photo::SendPhoto, send_poll::SendPoll, send_venue::SendVenue, + stop_message_live_location::StopMessageLiveLocation, + unban_chat_member::UnbanChatMember, +}; + pub type ResponseResult = Result; /// Request that can be sent to telegram. @@ -63,25 +79,25 @@ mod tests { } } -pub mod answer_pre_checkout_query; -pub mod answer_shipping_query; -pub mod edit_message_live_location; -pub mod forward_message; -pub mod get_chat; -pub mod get_file; -pub mod get_me; -pub mod get_updates; -pub mod get_user_profile_photos; -pub mod kick_chat_member; -pub mod restrict_chat_member; -pub mod send_audio; -pub mod send_chat_action; -pub mod send_contact; -pub mod send_location; -pub mod send_media_group; -pub mod send_message; -pub mod send_photo; -pub mod send_poll; -pub mod send_venue; -pub mod stop_message_live_location; -pub mod unban_chat_member; +mod answer_pre_checkout_query; +mod answer_shipping_query; +mod edit_message_live_location; +mod forward_message; +mod get_chat; +mod get_file; +mod get_me; +mod get_updates; +mod get_user_profile_photos; +mod kick_chat_member; +mod restrict_chat_member; +mod send_audio; +mod send_chat_action; +mod send_contact; +mod send_location; +mod send_media_group; +mod send_message; +mod send_photo; +mod send_poll; +mod send_venue; +mod stop_message_live_location; +mod unban_chat_member; diff --git a/src/requests/restrict_chat_member.rs b/src/requests/restrict_chat_member.rs index 6957922b..781dead6 100644 --- a/src/requests/restrict_chat_member.rs +++ b/src/requests/restrict_chat_member.rs @@ -2,7 +2,7 @@ use crate::requests::RequestContext; //TODO:: need implementation #[derive(Debug, Clone, Serialize)] -struct RestrictChatMember<'a> { +pub struct RestrictChatMember<'a> { #[serde(skip_serializing)] ctx: RequestContext<'a>, } diff --git a/src/requests/unban_chat_member.rs b/src/requests/unban_chat_member.rs index d7a9b436..ffaace92 100644 --- a/src/requests/unban_chat_member.rs +++ b/src/requests/unban_chat_member.rs @@ -2,7 +2,7 @@ use crate::requests::RequestContext; //TODO:: need implementation #[derive(Debug, Clone, Serialize)] -struct UnbanChatMember<'a> { +pub struct UnbanChatMember<'a> { #[serde(skip_serializing)] ctx: RequestContext<'a>, }