mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-03 09:49:07 +01:00
Merge pull request #30 from async-telegram-bot/fix_request_imports
Fix `request::` imports
This commit is contained in:
commit
e39ba98368
6 changed files with 45 additions and 32 deletions
|
@ -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},
|
||||
};
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>,
|
||||
}
|
||||
|
|
|
@ -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<T> = Result<T, RequestError>;
|
||||
|
||||
/// 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;
|
||||
|
|
|
@ -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>,
|
||||
}
|
||||
|
|
|
@ -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>,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue