datadog_api/apis/
users.rs

1use crate::{client::DatadogClient, models::UsersResponse, Result};
2
3/// API client for Datadog users endpoints.
4pub struct UsersApi {
5    client: DatadogClient,
6}
7
8impl UsersApi {
9    /// Creates a new API client.
10    #[must_use]
11    pub const fn new(client: DatadogClient) -> Self {
12        Self { client }
13    }
14
15    pub async fn list_users(&self) -> Result<UsersResponse> {
16        self.client.get("/api/v1/users").await
17    }
18}