mattermost_api_rust_driver/api/users.rs
1use super::{ApiClient, ApiError};
2use reqwest::Method;
3use serde_derive::Deserialize;
4
5#[derive(Debug, Deserialize)]
6pub struct UserMeResponse {
7 pub id: u64,
8 pub username: String,
9 pub email: String,
10}
11
12impl ApiClient {
13 pub async fn get_users_me(&self) -> Result<UserMeResponse, ApiError> {
14 self.send_request(Method::GET, "/users/me", None::<()>)
15 .await
16 }
17}