Ejemplo n.º 1
0
        public async Task <Build> UpdateBuildTemplateAsync(string buildId, string templateId)
        {
            var response = await _client.PutDataAsync(TeamCityBuildTemplateUrl(buildId), templateId,
                                                      MediaTypeNames.Text.Plain, _credentials, JsonConvert.DeserializeObject <Build>);

            if (response.Success)
            {
                return(response.ResponseData);
            }

            throw new TeamCityOperationException(response.Errors, "Error updating build with template");
        }
Ejemplo n.º 2
0
        public async Task<Project> Update(string updateProjectJson)
        {   
            var result = await _httpClientWrapper.PutDataAsync(ProjectsUrl, updateProjectJson, MediaContentTypes.Json,
                null, JsonConvert.DeserializeObject<Project>);

            return result.ResponseData;
        }