telegram_bot_async_raw/requests/
get_me.rs

1use crate::{requests::*, types::*};
2
3/// A simple method for testing your bot's auth token. Requires no parameters.
4/// Returns basic information about the bot in form of a User object.
5#[derive(Debug, Clone, PartialEq, PartialOrd, Serialize)]
6#[must_use = "requests do nothing unless sent"]
7pub struct GetMe;
8
9impl Request for GetMe {
10    type Type = JsonRequestType<Self>;
11    type Response = JsonIdResponse<User>;
12
13    fn serialize(&self) -> Result<HttpRequest, Error> {
14        Self::Type::serialize(RequestUrl::method("getMe"), self)
15    }
16}