azure-devops 0.1.0

Idiomatic Rust client for Azure DevOps REST APIs
Documentation
use super::super::models::Project;
use super::super::ProjectsClient;
use crate::constants::ApiPath;
use crate::error::Result;

impl ProjectsClient<'_> {
    /// Get a single project by its ID or name.
    ///
    /// # Arguments
    ///
    /// * `project_id` — The project's UUID or unique name.
    ///
    /// # Returns
    ///
    /// The full [`Project`] object, or an [`AzureDevOpsError`](crate::AzureDevOpsError)
    /// if the project does not exist or the request fails.
    pub async fn get(&self, project_id: &str) -> Result<Project> {
        self.http.get(&ApiPath::project(project_id), &[]).await
    }
}