azure-devops 0.1.0

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

impl WorkItemsClient<'_> {
    /// List work item fields available in a specific project.
    ///
    /// # Arguments
    ///
    /// * `project` — The project name.
    ///
    /// # Returns
    ///
    /// A `Vec<WorkItemField>` for the given project.
    pub async fn get_fields_for_project(&self, project: &str) -> Result<Vec<WorkItemField>> {
        let p = ApiPath::fields();
        self.http
            .get(&p, &[(constants::query::PROJECT, project)])
            .await
    }
}