azure-devops 0.1.0

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

impl WorkItemsClient<'_> {
    /// Get a single work item by its numeric ID.
    ///
    /// # Arguments
    ///
    /// * `id` — The work item ID (e.g., `42`).
    ///
    /// # Returns
    ///
    /// The [`WorkItem`] with its `fields` map populated.
    pub async fn get(&self, id: i64) -> Result<WorkItem> {
        let p = ApiPath::work_item(id);
        self.http.get(&p, &[]).await
    }
}