diff --git a/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETCore.approved.txt b/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETCore.approved.txt index 5ce70d54d..7308de563 100644 --- a/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETCore.approved.txt +++ b/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETCore.approved.txt @@ -3762,7 +3762,7 @@ Octopus.Client.Repositories.Async Task> GetChannels(Octopus.Client.Model.ProjectResource) Task GetProgression(Octopus.Client.Model.ProjectResource) Task GetReleaseByVersion(Octopus.Client.Model.ProjectResource, String) - Task> GetReleases(Octopus.Client.Model.ProjectResource, Int32, Nullable) + Task> GetReleases(Octopus.Client.Model.ProjectResource, Int32, Nullable, String) Task> GetTriggers(Octopus.Client.Model.ProjectResource) Task SetLogo(Octopus.Client.Model.ProjectResource, String, Stream) } diff --git a/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETFramework.approved.txt b/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETFramework.approved.txt index 3aa5b305c..0c17a1bb9 100644 --- a/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETFramework.approved.txt +++ b/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETFramework.approved.txt @@ -4168,7 +4168,7 @@ Octopus.Client.Repositories Octopus.Client.Model.ResourceCollection GetChannels(Octopus.Client.Model.ProjectResource) Octopus.Client.Model.ProgressionResource GetProgression(Octopus.Client.Model.ProjectResource) Octopus.Client.Model.ReleaseResource GetReleaseByVersion(Octopus.Client.Model.ProjectResource, String) - Octopus.Client.Model.ResourceCollection GetReleases(Octopus.Client.Model.ProjectResource, Int32, Nullable) + Octopus.Client.Model.ResourceCollection GetReleases(Octopus.Client.Model.ProjectResource, Int32, Nullable, String) Octopus.Client.Model.ResourceCollection GetTriggers(Octopus.Client.Model.ProjectResource) void SetLogo(Octopus.Client.Model.ProjectResource, String, Stream) } @@ -4612,7 +4612,7 @@ Octopus.Client.Repositories.Async Task> GetChannels(Octopus.Client.Model.ProjectResource) Task GetProgression(Octopus.Client.Model.ProjectResource) Task GetReleaseByVersion(Octopus.Client.Model.ProjectResource, String) - Task> GetReleases(Octopus.Client.Model.ProjectResource, Int32, Nullable) + Task> GetReleases(Octopus.Client.Model.ProjectResource, Int32, Nullable, String) Task> GetTriggers(Octopus.Client.Model.ProjectResource) Task SetLogo(Octopus.Client.Model.ProjectResource, String, Stream) } diff --git a/source/Octopus.Client/Repositories/Async/ProjectRepository.cs b/source/Octopus.Client/Repositories/Async/ProjectRepository.cs index 060fa9e50..82b15053e 100644 --- a/source/Octopus.Client/Repositories/Async/ProjectRepository.cs +++ b/source/Octopus.Client/Repositories/Async/ProjectRepository.cs @@ -1,4 +1,3 @@ -using System; using System.IO; using System.Collections.Generic; using System.Threading.Tasks; @@ -10,14 +9,7 @@ namespace Octopus.Client.Repositories.Async public interface IProjectRepository : IFindByName, IGet, ICreate, IModify, IDelete, IGetAll { - /// - /// - /// - /// - /// Number of records to skip - /// Number of records to take (First supported in Server 3.14.15) - /// - Task> GetReleases(ProjectResource project, int skip = 0, int? take = null); + Task> GetReleases(ProjectResource project, int skip = 0, int? take = null, string searchByVersion = null); Task> GetAllReleases(ProjectResource project); Task GetReleaseByVersion(ProjectResource project, string version); Task> GetChannels(ProjectResource project); @@ -35,12 +27,12 @@ public ProjectRepository(IOctopusAsyncClient client) { } - public Task> GetReleases(ProjectResource project, int skip = 0, int? take = null) + public Task> GetReleases(ProjectResource project, int skip = 0, int? take = null, string searchByVersion = null) { - return Client.List(project.Link("Releases"), new { skip, take }); + return Client.List(project.Link("Releases"), new { skip, take, searchByVersion }); } - public Task> GetAllReleases(ProjectResource project) + public Task> GetAllReleases(ProjectResource project) { return Client.ListAll(project.Link("Releases")); } diff --git a/source/Octopus.Client/Repositories/ProjectRepository.cs b/source/Octopus.Client/Repositories/ProjectRepository.cs index 503448570..6ad2b945b 100644 --- a/source/Octopus.Client/Repositories/ProjectRepository.cs +++ b/source/Octopus.Client/Repositories/ProjectRepository.cs @@ -1,4 +1,3 @@ -using System; using System.Collections.Generic; using System.IO; using Octopus.Client.Editors; @@ -8,14 +7,7 @@ namespace Octopus.Client.Repositories { public interface IProjectRepository : IFindByName, IGet, ICreate, IModify, IDelete, IGetAll { - /// - /// - /// - /// - /// Number of records to skip - /// Number of records to take (First supported in Server 3.14.159) - /// - ResourceCollection GetReleases(ProjectResource project, int skip = 0, int? take = null); + ResourceCollection GetReleases(ProjectResource project, int skip = 0, int? take = null, string searchByVersion = null); IReadOnlyList GetAllReleases(ProjectResource project); ReleaseResource GetReleaseByVersion(ProjectResource project, string version); ResourceCollection GetChannels(ProjectResource project); @@ -33,9 +25,9 @@ public ProjectRepository(IOctopusClient client) { } - public ResourceCollection GetReleases(ProjectResource project, int skip = 0, int? take = null) + public ResourceCollection GetReleases(ProjectResource project, int skip = 0, int? take = null, string searchByVersion = null) { - return Client.List(project.Link("Releases"), new { skip, take }); + return Client.List(project.Link("Releases"), new { skip, take, searchByVersion }); } public IReadOnlyList GetAllReleases(ProjectResource project)