public async Task <IEnumerable <PullRequest> > GetDashboardPullRequestsAsync(PullRequestStates?state = null, Roles?role = null, List <ParticipantStatus> status = null, PullRequestOrders?order = PullRequestOrders.Newest, int?closedSinceSeconds = null, int?maxPages = null, int?limit = null, int?start = null) { var queryParamValues = new Dictionary <string, object> { ["state"] = BitbucketHelpers.PullRequestStateToString(state), ["role"] = BitbucketHelpers.RoleToString(role), ["status"] = status != null?string.Join(",", status.Select(BitbucketHelpers.ParticipantStatusToString)) : null, ["order"] = BitbucketHelpers.PullRequestOrderToString(order), ["closedSince"] = closedSinceSeconds, ["limit"] = limit, ["start"] = start, }; return(await GetPagedResultsAsync(maxPages, queryParamValues, async qpv => await GetDashboardUrl("/pull-requests") .SetQueryParams(qpv) .GetJsonAsync <PagedResults <PullRequest> >() .ConfigureAwait(false)) .ConfigureAwait(false)); }
protected override string ConvertToString(PullRequestStates value) { return(BitbucketHelpers.PullRequestStateToString(value)); }