/// <summary> /// Gets the teams. /// </summary> /// <param name="projectId">The project identifier.</param> /// <returns>Task<IReadOnlyList<JsonGeneralPurposeObject>>.</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); }
/// <summary> /// Gets the connected services. /// </summary> /// <param name="projectId">The project identifier.</param> /// <returns>Task<IReadOnlyList<JsonGeneralPurposeObject>>.</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); }
/// <summary> /// Gets the project team. /// </summary> /// <param name="projectId">The project identifier.</param> /// <param name="teamId">The team identifier.</param> /// <returns>Task<JsonProjectTeam>.</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); }
/// <summary> /// Gets the project team members. /// </summary> /// <param name="projectId">The project identifier.</param> /// <param name="teamId">The team identifier.</param> /// <returns>Task<IReadOnlyList<JsonProjectTeamMember>>.</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); }
/// <summary> /// Gets the members. /// </summary> /// <param name="projectId">The project identifier.</param> /// <param name="teamId">The team identifier.</param> /// <returns>Task<IReadOnlyList<JsonIdentity>>.</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); }
/// <summary> /// Gets the project. /// </summary> /// <param name="projectName">Name of the project.</param> /// <returns>Task<JsonProject>.</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); }
/// <summary> /// Gets the changeset work items. /// </summary> /// <param name="changeSetId">The change set identifier.</param> /// <returns>Task<IReadOnlyList<JsonGeneralPurposeObject>>.</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); }
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); }
/// <summary> /// Gets the project specific information. /// </summary> /// <param name="project">The project.</param> /// <returns>Task<IReadOnlyList<JsonProjectInfo>>.</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); }
/// <summary> /// Gets the label items. /// </summary> /// <param name="labelId">The label identifier.</param> /// <returns>Task<IReadOnlyList<JsonTfvcLabelItem>>.</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); }
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); }
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); }
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); }
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); }
/// <summary> /// Gets the identity MRU. /// </summary> /// <returns>Task<IReadOnlyList<JsonGeneralPurposeObject>>.</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); }
/// <summary> /// Gets the shelveset work items. /// </summary> /// <param name="shelvesetId">The shelveset identifier.</param> /// <returns>Task<IReadOnlyList<JsonWorkItem>>.</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); }
/// <summary> /// Gets the users. /// </summary> /// <param name="roomId">The room identifier.</param> /// <returns>Task<IReadOnlyList<JsonRoomMember>>.</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); }