Skip to content

Commit

Permalink
Adding project group to event filters
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkSiedle committed Apr 1, 2019
1 parent ffb2f86 commit 016201d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5698,7 +5698,7 @@ Octopus.Client.Repositories
Octopus.Client.Repositories.ICanExtendSpaceContext<IEventRepository>
{
Octopus.Client.Model.ResourceCollection<EventResource> List(Int32, String, String, Boolean)
Octopus.Client.Model.ResourceCollection<EventResource> List(Int32, Nullable<Int32>, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable<Int64>, Nullable<Int64>, String, String)
Octopus.Client.Model.ResourceCollection<EventResource> List(Int32, Nullable<Int32>, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable<Int64>, Nullable<Int64>, String, String, String)
}
interface IFeaturesConfigurationRepository
{
Expand Down Expand Up @@ -6277,7 +6277,7 @@ Octopus.Client.Repositories.Async
Octopus.Client.Repositories.Async.ICanExtendSpaceContext<IEventRepository>
{
Task<ResourceCollection<EventResource>> List(Int32, String, String, Boolean)
Task<ResourceCollection<EventResource>> List(Int32, Nullable<Int32>, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable<Int64>, Nullable<Int64>, String, String)
Task<ResourceCollection<EventResource>> List(Int32, Nullable<Int32>, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable<Int64>, Nullable<Int64>, String, String, String)
}
interface IFeaturesConfigurationRepository
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5720,7 +5720,7 @@ Octopus.Client.Repositories
Octopus.Client.Repositories.ICanExtendSpaceContext<IEventRepository>
{
Octopus.Client.Model.ResourceCollection<EventResource> List(Int32, String, String, Boolean)
Octopus.Client.Model.ResourceCollection<EventResource> List(Int32, Nullable<Int32>, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable<Int64>, Nullable<Int64>, String, String)
Octopus.Client.Model.ResourceCollection<EventResource> List(Int32, Nullable<Int32>, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable<Int64>, Nullable<Int64>, String, String, String)
}
interface IFeaturesConfigurationRepository
{
Expand Down Expand Up @@ -6299,7 +6299,7 @@ Octopus.Client.Repositories.Async
Octopus.Client.Repositories.Async.ICanExtendSpaceContext<IEventRepository>
{
Task<ResourceCollection<EventResource>> List(Int32, String, String, Boolean)
Task<ResourceCollection<EventResource>> List(Int32, Nullable<Int32>, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable<Int64>, Nullable<Int64>, String, String)
Task<ResourceCollection<EventResource>> List(Int32, Nullable<Int32>, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable<Int64>, Nullable<Int64>, String, String, String)
}
interface IFeaturesConfigurationRepository
{
Expand Down
10 changes: 7 additions & 3 deletions source/Octopus.Client/Repositories/Async/EventRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Task<ResourceCollection<EventResource>> List(int skip = 0,
/// <param name="toAutoId"></param>
/// <param name="documentTypes"></param>
/// <param name="eventAgents"></param>
/// <param name="projectGroups"></param>
/// <returns></returns>
Task<ResourceCollection<EventResource>> List(int skip = 0,
int? take = null,
Expand All @@ -55,7 +56,8 @@ Task<ResourceCollection<EventResource>> List(int skip = 0,
long? fromAutoId = null,
long? toAutoId = null,
string documentTypes = null,
string eventAgents = null);
string eventAgents = null,
string projectGroups = null);
}

class EventRepository : MixedScopeBaseRepository<EventResource>, IEventRepository
Expand Down Expand Up @@ -103,7 +105,8 @@ public async Task<ResourceCollection<EventResource>> List(int skip = 0,
long? fromAutoId = null,
long? toAutoId = null,
string documentTypes = null,
string eventAgents = null)
string eventAgents = null,
string projectGroups = null)
{
var parameters = ParameterHelper.CombineParameters(GetAdditionalQueryParameters(), new
{
Expand All @@ -125,7 +128,8 @@ public async Task<ResourceCollection<EventResource>> List(int skip = 0,
fromAutoId,
toAutoId,
documentTypes,
eventAgents
eventAgents,
projectGroups,
});

return await Client.List<EventResource>(await Repository.Link("Events").ConfigureAwait(false), parameters).ConfigureAwait(false);
Expand Down
10 changes: 7 additions & 3 deletions source/Octopus.Client/Repositories/EventRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ ResourceCollection<EventResource> List(int skip = 0,
/// <param name="toAutoId"></param>
/// <param name="documentTypes"></param>
/// <param name="eventAgents"></param>
/// <param name="projectGroups"></param>
/// <returns></returns>
ResourceCollection<EventResource> List(int skip = 0,
int? take = null,
Expand All @@ -54,7 +55,8 @@ ResourceCollection<EventResource> List(int skip = 0,
long? fromAutoId = null,
long? toAutoId = null,
string documentTypes = null,
string eventAgents = null);
string eventAgents = null,
string projectGroups = null);
}

class EventRepository : MixedScopeBaseRepository<EventResource>, IEventRepository
Expand Down Expand Up @@ -102,7 +104,8 @@ public ResourceCollection<EventResource> List(int skip = 0,
long? fromAutoId = null,
long? toAutoId = null,
string documentTypes = null,
string eventAgents = null)
string eventAgents = null,
string projectGroups = null)
{
var parameters = ParameterHelper.CombineParameters(AdditionalQueryParameters, new
{
Expand All @@ -124,7 +127,8 @@ public ResourceCollection<EventResource> List(int skip = 0,
fromAutoId,
toAutoId,
documentTypes,
eventAgents
eventAgents,
projectGroups,
});
return Client.List<EventResource>(Repository.Link("Events"), parameters);
}
Expand Down

0 comments on commit 016201d

Please sign in to comment.