azure-devops 0.1.0

Idiomatic Rust client for Azure DevOps REST APIs
Documentation
use super::super::models::{Wiql, WorkItemQueryResult};
use super::super::WorkItemsClient;
use crate::constants::ApiPath;
use crate::error::Result;

impl WorkItemsClient<'_> {
    /// Execute a WIQL (Work Item Query Language) query.
    ///
    /// # Arguments
    ///
    /// * `project` — The project name to scope the query to.
    /// * `wiql` — A [`Wiql`] object containing the WIQL query string.
    ///
    /// # Returns
    ///
    /// A [`WorkItemQueryResult`] with matching work item references.
    pub async fn query_by_wiql(&self, project: &str, wiql: &Wiql) -> Result<WorkItemQueryResult> {
        let p = ApiPath::wiql(project);
        self.http.post(&p, &[], Some(wiql)).await
    }
}