From 9a5a00745f86c1c336946b7d40bcd8f5e7adbd28 Mon Sep 17 00:00:00 2001 From: van800 Date: Sat, 12 Apr 2014 13:19:29 +0200 Subject: [PATCH] implement get Build ById --- src/TeamCitySharp/ActionTypes/Builds.cs | 9 ++++++++- src/TeamCitySharp/ActionTypes/IBuilds.cs | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/TeamCitySharp/ActionTypes/Builds.cs b/src/TeamCitySharp/ActionTypes/Builds.cs index 4c52f340..1a0a316b 100644 --- a/src/TeamCitySharp/ActionTypes/Builds.cs +++ b/src/TeamCitySharp/ActionTypes/Builds.cs @@ -34,7 +34,14 @@ public Build LastBuildByAgent(string agentName) )).SingleOrDefault(); } - public void Add2QueueBuildByBuildConfigId(string buildConfigId) + public Build ById(string buildId) + { + var build = _caller.GetFormat("/app/rest/builds/id:{0}", buildId); + + return build; + } + + public void Add2QueueBuildByBuildConfigId(string buildConfigId) { _caller.GetFormat("/action.html?add2Queue={0}", buildConfigId); } diff --git a/src/TeamCitySharp/ActionTypes/IBuilds.cs b/src/TeamCitySharp/ActionTypes/IBuilds.cs index 6afba988..8f166190 100644 --- a/src/TeamCitySharp/ActionTypes/IBuilds.cs +++ b/src/TeamCitySharp/ActionTypes/IBuilds.cs @@ -23,6 +23,7 @@ public interface IBuilds List NonSuccessfulBuildsForUser(string userName); List ByBranch(string branchName); Build LastBuildByAgent(string agentName); + Build ById(string buildId); void Add2QueueBuildByBuildConfigId(string buildConfigId); } } \ No newline at end of file