I started playing around with TeamCitySharp and noticed there was no way to get details about a build. In my case I wanted to find the last successful completed build and the start and finish and other interesting tidbits.
I added a method to Build to do this.
public Build LastSuccessfulCompletedBuildWithDetails(string configId)
{
var locator = BuildLocator.WithDimensions(running: false, status: BuildStatus.SUCCESS);
var path = $"/app/rest/buildTypes/id:{configId}/builds/{locator}";
var build = _caller.Get<Build>(path);
return build ?? new Build();
}
I started playing around with TeamCitySharp and noticed there was no way to get details about a build. In my case I wanted to find the last successful completed build and the start and finish and other interesting tidbits.
I added a method to Build to do this.