Skip to main content

azure_devops/pull_requests/methods/
list.rs

1use super::super::models::{GitPullRequest, GitPullRequestSearchCriteria};
2use super::super::PullRequestsClient;
3use crate::constants::ApiPath;
4use crate::error::Result;
5
6impl PullRequestsClient<'_> {
7    pub async fn list(
8        &self,
9        repo: &str,
10        criteria: &GitPullRequestSearchCriteria,
11    ) -> Result<Vec<GitPullRequest>> {
12        let qp = crate::pull_requests::helpers::pr_criteria_params(criteria);
13        self.http
14            .get(&ApiPath::prs(repo), &crate::util::ref_query(&qp))
15            .await
16    }
17}