telegram_bot_fork_raw/requests/
get_me.rs

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