Ejemplo n.º 1
0
        public async Task <IEnumerable <SelectedUserGroup> > GetUserGroupsAsync(string login, int?p = null, int?ps = null, string q = null, SelectedTypes?selected = null)
        {
            var queryParamValues = new Dictionary <string, object>
            {
                [nameof(login)]    = login,
                [nameof(p)]        = p,
                [nameof(ps)]       = ps,
                [nameof(q)]        = q,
                [nameof(selected)] = SelectedTypesConverter.ToString(selected)
            };

            return(await GetUsersUrl("groups")
                   .SetQueryParams(queryParamValues)
                   .GetJsonNamedNodeAsync <IEnumerable <SelectedUserGroup> >("groups")
                   .ConfigureAwait(false));
        }
Ejemplo n.º 2
0
        public async Task <IEnumerable <QualityProfileProjectStatus> > GetQualityProfileProjectsStatusAsync(string key, int?p = null, int?ps = null, string q = null, SelectedTypes?selected = null)
        {
            var queryParamValues = new Dictionary <string, object>
            {
                [nameof(key)]      = key,
                [nameof(p)]        = p,
                [nameof(ps)]       = ps,
                [nameof(q)]        = q,
                [nameof(selected)] = SelectedTypesConverter.ToString(selected)
            };

            return(await GetQualityProfilesUrl("projects")
                   .SetQueryParams(queryParamValues)
                   .GetJsonNamedNodeAsync <IEnumerable <QualityProfileProjectStatus> >("results")
                   .ConfigureAwait(false));
        }
Ejemplo n.º 3
0
        public async Task <IEnumerable <SelectedQualityGate> > SearchQualityGatesAsync(string gateId, string organization = null, int?page = null, int?pageSize = null, string query = null, SelectedTypes?selected = null)
        {
            var queryParamValues = new Dictionary <string, object>
            {
                [nameof(gateId)]       = gateId,
                [nameof(organization)] = organization,
                [nameof(page)]         = page,
                [nameof(pageSize)]     = pageSize,
                [nameof(query)]        = query,
                [nameof(selected)]     = SelectedTypesConverter.ToString(selected)
            };

            return(await GetQualityGatesUrl("search")
                   .SetQueryParams(queryParamValues)
                   .GetJsonNamedNodeAsync <IEnumerable <SelectedQualityGate> >("results")
                   .ConfigureAwait(false));
        }