azure_devops/work_items/methods/
get_many_with_options.rs1use super::super::models::WorkItem;
2use super::super::options::GetWorkItemOptions;
3use super::super::WorkItemsClient;
4use crate::constants;
5use crate::constants::ApiPath;
6use crate::error::Result;
7
8impl WorkItemsClient<'_> {
9 pub async fn get_many_with_options(
20 &self,
21 ids: &[i64],
22 options: &GetWorkItemOptions,
23 ) -> Result<Vec<WorkItem>> {
24 let ids_str = ids
25 .iter()
26 .map(|id| id.to_string())
27 .collect::<Vec<_>>()
28 .join(",");
29 let mut query = options.to_query_params();
30 query.push((constants::query::IDS.into(), ids_str));
31 let p = ApiPath::work_items();
32 self.http.get(&p, &crate::util::ref_query(&query)).await
33 }
34}