azure-devops 0.1.0

Idiomatic Rust client for Azure DevOps REST APIs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::super::models::ProjectList;
use super::super::ProjectsClient;
use crate::constants::ApiPath;
use crate::error::Result;

impl ProjectsClient<'_> {
    /// List all projects in the organization.
    ///
    /// # Returns
    ///
    /// A [`ProjectList`] containing a `count` and `value` vector of
    /// [`ProjectReference`](crate::projects::models::ProjectReference) objects.
    pub async fn list(&self) -> Result<ProjectList> {
        self.http.get(&ApiPath::projects(), &[]).await
    }
}