use crate::{client::MaxClient, error::Result};
use crate::types::BotInfo;

impl MaxClient {
    /// Возвращает информацию о боте.
    ///
    /// # Пример
    ///
    /// ```no_run
    /// # use maxbot::MaxClient;
    /// # async fn example() -> Result<(), Box<dyn std::error::Error>> {
    /// let client = MaxClient::new("token");
    /// let me = client.get_me().await?;
    /// println!("Имя бота: {}", me.user.first_name);
    /// # Ok(())
    /// # }
    /// ```
    pub async fn get_me(&self) -> Result<BotInfo> {
        self.request(reqwest::Method::GET, "/me", &[], None).await
    }
}
