Exemplo n.º 1
0
        /// <summary>
        /// Gets the teams.
        /// </summary>
        /// <param name="projectId">The project identifier.</param>
        /// <returns>Task&lt;IReadOnlyList&lt;JsonGeneralPurposeObject&gt;&gt;.</returns>
        public async Task <IReadOnlyList <JsonTeam> > GetTeams(string projectId)
        {
            StructuredHttpExchange exchange = StructuredHttpExchange.Get(CoreRestCalls.Teams);

            exchange.SetRoute("{projectId}", projectId);
            exchange.SetRoute("{*teamId}", String.Empty);
            IReadOnlyList <JsonTeam> result = await ProcessCollectionRequest(exchange, o => JsonParsers.ValuesToObjects(o, JsonTeam.FromToken));

            return(result);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the connected services.
        /// </summary>
        /// <param name="projectId">The project identifier.</param>
        /// <returns>Task&lt;IReadOnlyList&lt;JsonGeneralPurposeObject&gt;&gt;.</returns>
        public async Task <IReadOnlyList <JsonGeneralPurposeObject> > GetConnectedServices(string projectId)
        {
            StructuredHttpExchange exchange = StructuredHttpExchange.Get(CoreRestCalls.ConnectedServices);

            exchange.SetRoute("{projectId}", projectId);
            exchange.SetRoute("{name}", String.Empty);
            IReadOnlyList <JsonGeneralPurposeObject> result = await ProcessCollectionRequest(exchange, o => JsonParsers.ValuesToObjects(o, JsonGeneralPurposeObject.FromToken));

            return(result);
        }
Exemplo n.º 3
0
        /// <summary>
        ///     Gets the project team.
        /// </summary>
        /// <param name="projectId">The project identifier.</param>
        /// <param name="teamId">The team identifier.</param>
        /// <returns>Task&lt;JsonProjectTeam&gt;.</returns>
        public async Task <JsonProjectTeam> GetProjectTeam(Guid projectId, Guid teamId)
        {
            StructuredHttpExchange exchange = StructuredHttpExchange.Get(ProjectRestCalls.ProjectTeam);

            exchange.SetRoute("{projectId}", projectId);
            exchange.SetRoute("{teamId}", teamId);
            JsonProjectTeam result = await ProcessCollectionRequest(exchange, JsonProjectTeam.FromToken);

            return(result);
        }
Exemplo n.º 4
0
        /// <summary>
        ///     Gets the project team members.
        /// </summary>
        /// <param name="projectId">The project identifier.</param>
        /// <param name="teamId">The team identifier.</param>
        /// <returns>Task&lt;IReadOnlyList&lt;JsonProjectTeamMember&gt;&gt;.</returns>
        public async Task <IReadOnlyList <JsonProjectTeamMember> > GetProjectTeamMembers(Guid projectId, Guid teamId)
        {
            StructuredHttpExchange exchange = StructuredHttpExchange.Get(ProjectRestCalls.ProjectTeamMembers);

            exchange.SetRoute("{projectId}", projectId);
            exchange.SetRoute("{teamId}", teamId);
            IReadOnlyList <JsonProjectTeamMember> result = await ProcessCollectionRequest(exchange, o => JsonParsers.ValuesToObjects(o, JsonProjectTeamMember.FromToken));

            return(result);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Gets the members.
        /// </summary>
        /// <param name="projectId">The project identifier.</param>
        /// <param name="teamId">The team identifier.</param>
        /// <returns>Task&lt;IReadOnlyList&lt;JsonIdentity&gt;&gt;.</returns>
        public async Task <IReadOnlyList <JsonIdentity> > GetMembers(string projectId, string teamId)
        {
            StructuredHttpExchange exchange = StructuredHttpExchange.Get(CoreRestCalls.Members);

            exchange.SetRoute("{projectId}", projectId);
            exchange.SetRoute("{teamId}", teamId);
            IReadOnlyList <JsonIdentity> result = await ProcessCollectionRequest(exchange, o => JsonParsers.ValuesToObjects(o, JsonIdentity.FromToken));

            return(result);
        }
Exemplo n.º 6
0
        /// <summary>
        ///     Gets the project.
        /// </summary>
        /// <param name="projectName">Name of the project.</param>
        /// <returns>Task&lt;JsonProject&gt;.</returns>
        public async Task <JsonProject> GetProject(string projectName)
        {
            StructuredHttpExchange exchange = StructuredHttpExchange.Get(ProjectRestCalls.ProjectByName);

            exchange.SetRoute("{projectName}", projectName);
            JsonProject result = await ProcessCollectionRequest(exchange, JsonProject.FromToken);

            return(result);
        }
Exemplo n.º 7
0
        /// <summary>
        ///     Gets the changeset work items.
        /// </summary>
        /// <param name="changeSetId">The change set identifier.</param>
        /// <returns>Task&lt;IReadOnlyList&lt;JsonGeneralPurposeObject&gt;&gt;.</returns>
        public async Task <IReadOnlyList <JsonGeneralPurposeObject> > GetChangesetWorkItems(int changeSetId)
        {
            StructuredHttpExchange exchange = StructuredHttpExchange.Get(TfvcRestCalls.ChangesetWorkItems);

            exchange.SetRoute("{id}", changeSetId);
            IReadOnlyList <JsonGeneralPurposeObject> result = await ProcessCollectionRequest(exchange, o => JsonParsers.ValuesToObjects(o, JsonGeneralPurposeObject.FromToken));

            return(result);
        }
Exemplo n.º 8
0
        public async Task <JsonBuild> GetBuild(string project, int buildId)
        {
            StructuredHttpExchange exchange = StructuredHttpExchange.Get(BuildRestCalls.Build);

            exchange.SetRoute("{buildId}", buildId);
            JsonBuild result = await ProcessProjectRequest(project, exchange, JsonBuild.FromToken);

            return(result);
        }
Exemplo n.º 9
0
        /// <summary>
        ///     Gets the project specific information.
        /// </summary>
        /// <param name="project">The project.</param>
        /// <returns>Task&lt;IReadOnlyList&lt;JsonProjectInfo&gt;&gt;.</returns>
        public async Task <IReadOnlyList <JsonProjectInfo> > GetProjectSpecificInfo(string project)
        {
            StructuredHttpExchange exchange = StructuredHttpExchange.Get(TfvcRestCalls.ProjectSpecificInfo);

            exchange.SetRoute("{projectId}", project);
            IReadOnlyList <JsonProjectInfo> result = await ProcessCollectionRequest(exchange, o => JsonParsers.ValuesToObjects(o, JsonProjectInfo.FromToken));

            return(result);
        }
Exemplo n.º 10
0
        /// <summary>
        /// Gets the label items.
        /// </summary>
        /// <param name="labelId">The label identifier.</param>
        /// <returns>Task&lt;IReadOnlyList&lt;JsonTfvcLabelItem&gt;&gt;.</returns>
        public async Task <IReadOnlyList <JsonTfvcLabelItem> > GetLabelItems(int labelId)
        {
            StructuredHttpExchange exchange = StructuredHttpExchange.Get(TfvcRestCalls.LabelItems);

            exchange.SetRoute("{labelId}", labelId);
            IReadOnlyList <JsonTfvcLabelItem> result = await ProcessCollectionRequest(exchange, o => JsonParsers.ValuesToObjects(o, JsonTfvcLabelItem.FromToken));

            return(result);
        }
Exemplo n.º 11
0
        public async Task <JsonBuildQueue> GetQueue(int queueId)
        {
            StructuredHttpExchange exchange = StructuredHttpExchange.Get(BuildRestCalls.Queue);

            exchange.SetRoute("{queueId}", queueId);
            JsonBuildQueue result = await ProcessCollectionRequest(exchange, JsonBuildQueue.FromToken);

            return(result);
        }
Exemplo n.º 12
0
        public async Task <JsonBuildQuality> GetQuality(string project, int qualityId)
        {
            StructuredHttpExchange exchange = StructuredHttpExchange.Get(BuildRestCalls.Quality);

            exchange.SetRoute("{qualityId}", qualityId);
            JsonBuildQuality result = await ProcessProjectRequest(project, exchange, JsonBuildQuality.FromToken);

            return(result);
        }
Exemplo n.º 13
0
        public async Task <JsonBuildDefinition> GetDefinition(string project, int definitionId)
        {
            StructuredHttpExchange exchange = StructuredHttpExchange.Get(BuildRestCalls.Definition);

            exchange.SetRoute("{definitionId}", definitionId);
            JsonBuildDefinition result = await ProcessProjectRequest(project, exchange, JsonBuildDefinition.FromToken);

            return(result);
        }
Exemplo n.º 14
0
        public async Task <IReadOnlyList <JsonBuildDetails> > GetBuildDetails(string project, int buildId)
        {
            StructuredHttpExchange exchange = StructuredHttpExchange.Get(BuildRestCalls.BuildDetails);

            exchange.SetRoute("{buildId}", buildId);
            IReadOnlyList <JsonBuildDetails> result = await ProcessProjectRequest(project, exchange, o => JsonParsers.ValuesToObjects(o, JsonBuildDetails.FromToken));

            return(result);
        }
Exemplo n.º 15
0
        /// <summary>
        /// Gets the identity MRU.
        /// </summary>
        /// <returns>Task&lt;IReadOnlyList&lt;JsonGeneralPurposeObject&gt;&gt;.</returns>
        public async Task <IReadOnlyList <JsonGeneralPurposeObject> > GetIdentityMru()
        {
            StructuredHttpExchange exchange = StructuredHttpExchange.Get(CoreRestCalls.IdentityMru);

            exchange.SetRoute("{mruName}", String.Empty);
            IReadOnlyList <JsonGeneralPurposeObject> result = await ProcessCollectionRequest(exchange, o => JsonParsers.ValuesToObjects(o, JsonGeneralPurposeObject.FromToken));

            return(result);
        }
Exemplo n.º 16
0
        /// <summary>
        ///     Gets the shelveset work items.
        /// </summary>
        /// <param name="shelvesetId">The shelveset identifier.</param>
        /// <returns>Task&lt;IReadOnlyList&lt;JsonWorkItem&gt;&gt;.</returns>
        public async Task <IReadOnlyList <JsonWorkItem> > GetShelvesetWorkItems(string shelvesetId)
        {
            StructuredHttpExchange exchange = StructuredHttpExchange.Get(TfvcRestCalls.ShelvesetWorkItems);

            exchange.SetRoute("{shelvesetId}", shelvesetId);
            IReadOnlyList <JsonWorkItem> result = await ProcessCollectionRequest(exchange, o => JsonParsers.ValuesToObjects(o, JsonWorkItem.FromToken));

            return(result);
        }
Exemplo n.º 17
0
        /// <summary>
        /// Gets the users.
        /// </summary>
        /// <param name="roomId">The room identifier.</param>
        /// <returns>Task&lt;IReadOnlyList&lt;JsonRoomMember&gt;&gt;.</returns>
        public async Task <IReadOnlyList <JsonRoomMember> > GetUsers(string roomId)
        {
            StructuredHttpExchange exchange = StructuredHttpExchange.Get(ChatRestCalls.Users);

            exchange.SetRoute("{roomId}", roomId);
            IReadOnlyList <JsonRoomMember> result = await ProcessCollectionRequest(exchange, o => JsonParsers.ValuesToObjects(o, JsonRoomMember.FromToken));

            return(result);
        }