Ejemplo n.º 1
0
        /// <summary>
        /// Get a list of iterations in this group.
        /// </summary>
        /// <param name="groupId">The ID, path or <see cref="Group"/> of the group.</param>
        /// <param name="options">Query options.</param>
        public async Task <IList <Iteration> > GetIterationsAsync(GroupId groupId, Action <IterationsQueryOptions> options = null)
        {
            var queryOptions = new IterationsQueryOptions();

            options?.Invoke(queryOptions);

            string url = _queryIterationsBuilder.Build($"groups/{groupId}/iterations", queryOptions);

            return(await _httpFacade.GetPagedList <Iteration>(url));
        }
Ejemplo n.º 2
0
        public async Task <IList <Iteration> > GetAsync(ProjectId projectId = null, GroupId groupId = null,
                                                        Action <IterationsQueryOptions> options = null)
        {
            var queryOptions = new IterationsQueryOptions();

            options?.Invoke(queryOptions);

            string path = "iterations";

            if (projectId != null)
            {
                path = $"projects/{projectId}/iterations";
            }
            else if (groupId != null)
            {
                path = $"groups/{groupId}/iterations";
            }

            string url = _queryBuilder.Build(path, queryOptions);

            return(await _httpFacade.GetPagedList <Iteration>(url));
        }