datadog_api/apis/
teams.rs

1use crate::{client::DatadogClient, models::TeamsResponse, Result};
2
3/// API client for Datadog teams endpoints.
4pub struct TeamsApi {
5    client: DatadogClient,
6}
7
8impl TeamsApi {
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_teams(&self) -> Result<TeamsResponse> {
16        self.client.get("/api/v2/teams").await
17    }
18}