From 449be03daa71215d226477f0422cbeb17c56b7b9 Mon Sep 17 00:00:00 2001 From: mroloux Date: Tue, 1 Feb 2022 17:25:32 +0100 Subject: [PATCH] Seasons (#46) * Added seasons * Version bump --- .../Seasons/AddEventsToPartialSeasonTest.cs | 20 +++ .../Seasons/CreateEventsInSeasonTest.cs | 30 ++++ .../Seasons/CreatePartialSeasonTest.cs | 30 ++++ .../Seasons/CreateSeasonTest.cs | 90 ++++++++++ .../Seasons/DeletePartialSeasonTest.cs | 19 ++ .../Seasons/DeleteSeasonTest.cs | 18 ++ SeatsioDotNet.Test/Seasons/ListSeasonsTest.cs | 21 +++ .../RemoveEventFromPartialSeasonTest.cs | 20 +++ .../Seasons/RetrievePartialSeasonTest.cs | 32 ++++ .../Seasons/RetrieveSeasonTest.cs | 35 ++++ SeatsioDotNet.Test/SeatsioDotNet.Test.csproj | 26 +-- SeatsioDotNet/Events/Event.cs | 1 - SeatsioDotNet/Seasons/Season.cs | 14 ++ SeatsioDotNet/Seasons/Seasons.cs | 167 ++++++++++++++++++ SeatsioDotNet/SeatsioClient.cs | 2 + SeatsioDotNet/SeatsioDotNet.csproj | 2 +- 16 files changed, 512 insertions(+), 15 deletions(-) create mode 100644 SeatsioDotNet.Test/Seasons/AddEventsToPartialSeasonTest.cs create mode 100644 SeatsioDotNet.Test/Seasons/CreateEventsInSeasonTest.cs create mode 100644 SeatsioDotNet.Test/Seasons/CreatePartialSeasonTest.cs create mode 100644 SeatsioDotNet.Test/Seasons/CreateSeasonTest.cs create mode 100644 SeatsioDotNet.Test/Seasons/DeletePartialSeasonTest.cs create mode 100644 SeatsioDotNet.Test/Seasons/DeleteSeasonTest.cs create mode 100644 SeatsioDotNet.Test/Seasons/ListSeasonsTest.cs create mode 100644 SeatsioDotNet.Test/Seasons/RemoveEventFromPartialSeasonTest.cs create mode 100644 SeatsioDotNet.Test/Seasons/RetrievePartialSeasonTest.cs create mode 100644 SeatsioDotNet.Test/Seasons/RetrieveSeasonTest.cs create mode 100644 SeatsioDotNet/Seasons/Season.cs create mode 100644 SeatsioDotNet/Seasons/Seasons.cs diff --git a/SeatsioDotNet.Test/Seasons/AddEventsToPartialSeasonTest.cs b/SeatsioDotNet.Test/Seasons/AddEventsToPartialSeasonTest.cs new file mode 100644 index 0000000..f220997 --- /dev/null +++ b/SeatsioDotNet.Test/Seasons/AddEventsToPartialSeasonTest.cs @@ -0,0 +1,20 @@ +using System.Linq; +using Xunit; + +namespace SeatsioDotNet.Test.Seasons +{ + public class AddEventsToPartialSeasonTest : SeatsioClientTest + { + [Fact] + public void Test() + { + var chartKey = CreateTestChart(); + var topLevelSeason = Client.Seasons.Create(chartKey, eventKeys: new[] {"event1", "event2"}); + var partialSeason = Client.Seasons.CreatePartialSeason(topLevelSeason.Key, partialSeasonKey: "aPartialSeason"); + + var updatedPartialSeason = Client.Seasons.AddEventsToPartialSeason(topLevelSeason.Key, partialSeason.Key, new[] {"event1", "event2"}); + + Assert.Equal(new[] {"event1", "event2"}, updatedPartialSeason.Events.Select(e => e.Key)); + } + } +} \ No newline at end of file diff --git a/SeatsioDotNet.Test/Seasons/CreateEventsInSeasonTest.cs b/SeatsioDotNet.Test/Seasons/CreateEventsInSeasonTest.cs new file mode 100644 index 0000000..efa99fd --- /dev/null +++ b/SeatsioDotNet.Test/Seasons/CreateEventsInSeasonTest.cs @@ -0,0 +1,30 @@ +using System.Linq; +using Xunit; + +namespace SeatsioDotNet.Test.Seasons +{ + public class CreateEventsInSeasonTest : SeatsioClientTest + { + [Fact] + public void EventsKeysCanBePassedIn() + { + var chartKey = CreateTestChart(); + var season = Client.Seasons.Create(chartKey); + + var updatedSeason = Client.Seasons.CreateEvents(season.Key, eventKeys: new[] {"event1", "event2"}); + + Assert.Equal(new[] {"event1", "event2"}, updatedSeason.Events.Select(e => e.Key)); + } + + [Fact] + public void NumberOfEventsCanBePassedIn() + { + var chartKey = CreateTestChart(); + var season = Client.Seasons.Create(chartKey); + + var updatedSeason = Client.Seasons.CreateEvents(season.Key, numberOfEvents: 2); + + Assert.Equal(2, updatedSeason.Events.Count); + } + } +} \ No newline at end of file diff --git a/SeatsioDotNet.Test/Seasons/CreatePartialSeasonTest.cs b/SeatsioDotNet.Test/Seasons/CreatePartialSeasonTest.cs new file mode 100644 index 0000000..9ec1077 --- /dev/null +++ b/SeatsioDotNet.Test/Seasons/CreatePartialSeasonTest.cs @@ -0,0 +1,30 @@ +using System.Linq; +using Xunit; + +namespace SeatsioDotNet.Test.Seasons +{ + public class CreatePartialSeasonTest : SeatsioClientTest + { + [Fact] + public void KeyCanBePassedIn() + { + var chartKey = CreateTestChart(); + var topLevelSeason = Client.Seasons.Create(chartKey); + + var partialSeason = Client.Seasons.CreatePartialSeason(topLevelSeason.Key, partialSeasonKey: "aPartialSeason"); + + Assert.Equal("aPartialSeason", partialSeason.Key); + } + + [Fact] + public void EventKeysCanBePassedIn() + { + var chartKey = CreateTestChart(); + var topLevelSeason = Client.Seasons.Create(chartKey, eventKeys: new[] {"event1", "event2"}); + + var partialSeason = Client.Seasons.CreatePartialSeason(topLevelSeason.Key, eventKeys: new[] {"event1", "event2"}); + + Assert.Equal(new[] {"event1", "event2"}, partialSeason.Events.Select(e => e.Key)); + } + } +} \ No newline at end of file diff --git a/SeatsioDotNet.Test/Seasons/CreateSeasonTest.cs b/SeatsioDotNet.Test/Seasons/CreateSeasonTest.cs new file mode 100644 index 0000000..1ca8228 --- /dev/null +++ b/SeatsioDotNet.Test/Seasons/CreateSeasonTest.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using SeatsioDotNet.Charts; +using SeatsioDotNet.Events; +using Xunit; + +namespace SeatsioDotNet.Test.Seasons +{ + public class CreateSeasonTest : SeatsioClientTest + { + [Fact] + public void ChartKeyIsMandatory() + { + var chartKey = CreateTestChart(); + + var season = Client.Seasons.Create(chartKey); + + Assert.NotNull(season.Key); + Assert.NotEqual(0, season.Id); + Assert.Empty(season.PartialSeasonKeys); + Assert.Empty(season.Events); + + var seasonEvent = season.SeasonEvent; + Assert.Equal(season.Key, seasonEvent.Key); + Assert.NotEqual(0, seasonEvent.Id); + Assert.Equal(chartKey, seasonEvent.ChartKey); + Assert.Equal("INHERIT", seasonEvent.TableBookingConfig.Mode); + Assert.True(seasonEvent.SupportsBestAvailable); + Assert.Null(seasonEvent.ForSaleConfig); + CustomAssert.CloseTo(DateTimeOffset.Now, seasonEvent.CreatedOn.Value); + Assert.Null(seasonEvent.UpdatedOn); + } + + [Fact] + public void KeyCanBePassedIn() + { + var chartKey = CreateTestChart(); + + var season = Client.Seasons.Create(chartKey, key: "aSeason"); + + Assert.Equal("aSeason", season.Key); + } + + [Fact] + public void NumberOfEventsCanBePassedIn() + { + var chartKey = CreateTestChart(); + + var season = Client.Seasons.Create(chartKey, numberOfEvents: 2); + + Assert.Equal(2, season.Events.Count); + } + + [Fact] + public void EventKeysCanBePassedIn() + { + var chartKey = CreateTestChart(); + + var season = Client.Seasons.Create(chartKey, eventKeys: new[] {"event1", "event2"}); + + Assert.Equal(new[] {"event1", "event2"}, season.Events.Select(e => e.Key)); + } + + [Fact] + public void TableBookingConfigCanBePassedIn() + { + var chartKey = CreateTestChart(); + + var season = Client.Seasons.Create(chartKey, tableBookingConfig: TableBookingConfig.AllBySeat()); + + Assert.Equal(TableBookingConfig.AllBySeat().Mode, season.SeasonEvent.TableBookingConfig.Mode); + } + + [Fact] + public void SocialDistancingRulesetKeyCanBePassedIn() + { + var chartKey = CreateTestChart(); + var rulesets = new Dictionary() + { + { "ruleset1", SocialDistancingRuleset.RuleBased("My first ruleset").Build() }, + }; + Client.Charts.SaveSocialDistancingRulesets(chartKey, rulesets); + + var season = Client.Seasons.Create(chartKey, socialDistancingRulesetKey: "ruleset1"); + + Assert.Equal("ruleset1", season.SeasonEvent.SocialDistancingRulesetKey); + } + } +} \ No newline at end of file diff --git a/SeatsioDotNet.Test/Seasons/DeletePartialSeasonTest.cs b/SeatsioDotNet.Test/Seasons/DeletePartialSeasonTest.cs new file mode 100644 index 0000000..ad8ba41 --- /dev/null +++ b/SeatsioDotNet.Test/Seasons/DeletePartialSeasonTest.cs @@ -0,0 +1,19 @@ +using Xunit; + +namespace SeatsioDotNet.Test.Seasons +{ + public class DeletePartialSeasonTest : SeatsioClientTest + { + [Fact] + public void Test() + { + var chartKey = CreateTestChart(); + var season = Client.Seasons.Create(chartKey); + var partialSeason = Client.Seasons.CreatePartialSeason(season.Key); + + Client.Seasons.DeletePartialSeason(season.Key, partialSeason.Key); + + Assert.Throws(() => Client.Seasons.RetrievePartialSeason(season.Key, partialSeason.Key)); + } + } +} \ No newline at end of file diff --git a/SeatsioDotNet.Test/Seasons/DeleteSeasonTest.cs b/SeatsioDotNet.Test/Seasons/DeleteSeasonTest.cs new file mode 100644 index 0000000..7625a3a --- /dev/null +++ b/SeatsioDotNet.Test/Seasons/DeleteSeasonTest.cs @@ -0,0 +1,18 @@ +using Xunit; + +namespace SeatsioDotNet.Test.Seasons +{ + public class DeleteSeasonTest : SeatsioClientTest + { + [Fact] + public void Test() + { + var chartKey = CreateTestChart(); + var season = Client.Seasons.Create(chartKey); + + Client.Seasons.Delete(season.Key); + + Assert.Throws(() => Client.Seasons.Retrieve(season.Key)); + } + } +} \ No newline at end of file diff --git a/SeatsioDotNet.Test/Seasons/ListSeasonsTest.cs b/SeatsioDotNet.Test/Seasons/ListSeasonsTest.cs new file mode 100644 index 0000000..57aa3d0 --- /dev/null +++ b/SeatsioDotNet.Test/Seasons/ListSeasonsTest.cs @@ -0,0 +1,21 @@ +using System.Linq; +using Xunit; + +namespace SeatsioDotNet.Test.Seasons +{ + public class ListSeasonsTest : SeatsioClientTest + { + [Fact] + public void Test() + { + var chartKey = CreateTestChart(); + var season1 = Client.Seasons.Create(chartKey); + var season2 = Client.Seasons.Create(chartKey); + var season3 = Client.Seasons.Create(chartKey); + + var seasons = Client.Seasons.ListAll(); + + Assert.Equal(new[] {season3.Key, season2.Key, season1.Key}, seasons.Select(s => s.Key)); + } + } +} \ No newline at end of file diff --git a/SeatsioDotNet.Test/Seasons/RemoveEventFromPartialSeasonTest.cs b/SeatsioDotNet.Test/Seasons/RemoveEventFromPartialSeasonTest.cs new file mode 100644 index 0000000..a864155 --- /dev/null +++ b/SeatsioDotNet.Test/Seasons/RemoveEventFromPartialSeasonTest.cs @@ -0,0 +1,20 @@ +using System.Linq; +using Xunit; + +namespace SeatsioDotNet.Test.Seasons +{ + public class RemoveEventFromPartialSeasonTest : SeatsioClientTest + { + [Fact] + public void Test() + { + var chartKey = CreateTestChart(); + var topLevelSeason = Client.Seasons.Create(chartKey, eventKeys: new[] {"event1", "event2"}); + var partialSeason = Client.Seasons.CreatePartialSeason(topLevelSeason.Key, eventKeys: new[] {"event1", "event2"}); + + var updatedPartialSeason = Client.Seasons.RemoveEventFromPartialSeason(topLevelSeason.Key, partialSeason.Key, "event2"); + + Assert.Equal(new[] {"event1"}, updatedPartialSeason.Events.Select(e => e.Key)); + } + } +} \ No newline at end of file diff --git a/SeatsioDotNet.Test/Seasons/RetrievePartialSeasonTest.cs b/SeatsioDotNet.Test/Seasons/RetrievePartialSeasonTest.cs new file mode 100644 index 0000000..8f1daf3 --- /dev/null +++ b/SeatsioDotNet.Test/Seasons/RetrievePartialSeasonTest.cs @@ -0,0 +1,32 @@ +using System; +using Xunit; + +namespace SeatsioDotNet.Test.Seasons +{ + public class RetrievePartialSeasonTest : SeatsioClientTest + { + [Fact] + public void Test() + { + var chartKey = CreateTestChart(); + + var season = Client.Seasons.Create(chartKey); + var partialSeason = Client.Seasons.CreatePartialSeason(season.Key); + + var retrievedPartialSeason = Client.Seasons.RetrievePartialSeason(season.Key, partialSeason.Key); + + Assert.NotNull(retrievedPartialSeason.Key); + Assert.NotEqual(0, retrievedPartialSeason.Id); + + var seasonEvent = retrievedPartialSeason.SeasonEvent; + Assert.Equal(retrievedPartialSeason.Key, seasonEvent.Key); + Assert.NotEqual(0, seasonEvent.Id); + Assert.Equal(chartKey, seasonEvent.ChartKey); + Assert.Equal("INHERIT", seasonEvent.TableBookingConfig.Mode); + Assert.True(seasonEvent.SupportsBestAvailable); + Assert.Null(seasonEvent.ForSaleConfig); + CustomAssert.CloseTo(DateTimeOffset.Now, seasonEvent.CreatedOn.Value); + Assert.Null(seasonEvent.UpdatedOn); + } + } +} \ No newline at end of file diff --git a/SeatsioDotNet.Test/Seasons/RetrieveSeasonTest.cs b/SeatsioDotNet.Test/Seasons/RetrieveSeasonTest.cs new file mode 100644 index 0000000..60b196a --- /dev/null +++ b/SeatsioDotNet.Test/Seasons/RetrieveSeasonTest.cs @@ -0,0 +1,35 @@ +using System; +using Xunit; + +namespace SeatsioDotNet.Test.Seasons +{ + public class RetrieveSeasonTest : SeatsioClientTest + { + [Fact] + public void Test() + { + var chartKey = CreateTestChart(); + + var season = Client.Seasons.Create(chartKey); + var partialSeason1 = Client.Seasons.CreatePartialSeason(season.Key); + var partialSeason2 = Client.Seasons.CreatePartialSeason(season.Key); + + var retrievedSeason = Client.Seasons.Retrieve(season.Key); + + Assert.NotNull(retrievedSeason.Key); + Assert.NotEqual(0, retrievedSeason.Id); + Assert.Equal(new[] {partialSeason1.Key, partialSeason2.Key}, retrievedSeason.PartialSeasonKeys); + Assert.Empty(retrievedSeason.Events); + + var seasonEvent = retrievedSeason.SeasonEvent; + Assert.Equal(season.Key, seasonEvent.Key); + Assert.NotEqual(0, seasonEvent.Id); + Assert.Equal(chartKey, seasonEvent.ChartKey); + Assert.Equal("INHERIT", seasonEvent.TableBookingConfig.Mode); + Assert.True(seasonEvent.SupportsBestAvailable); + Assert.Null(seasonEvent.ForSaleConfig); + CustomAssert.CloseTo(DateTimeOffset.Now, seasonEvent.CreatedOn.Value); + Assert.Null(seasonEvent.UpdatedOn); + } + } +} \ No newline at end of file diff --git a/SeatsioDotNet.Test/SeatsioDotNet.Test.csproj b/SeatsioDotNet.Test/SeatsioDotNet.Test.csproj index de528bd..b2f7808 100644 --- a/SeatsioDotNet.Test/SeatsioDotNet.Test.csproj +++ b/SeatsioDotNet.Test/SeatsioDotNet.Test.csproj @@ -1,19 +1,19 @@  - + netcoreapp2.0 - - + + - + - - + + - - - - - Always - - + + + + + Always + + \ No newline at end of file diff --git a/SeatsioDotNet/Events/Event.cs b/SeatsioDotNet/Events/Event.cs index ebd5b86..9e94971 100644 --- a/SeatsioDotNet/Events/Event.cs +++ b/SeatsioDotNet/Events/Event.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using RestSharp.Deserializers; namespace SeatsioDotNet.Events { diff --git a/SeatsioDotNet/Seasons/Season.cs b/SeatsioDotNet/Seasons/Season.cs new file mode 100644 index 0000000..e1c0d18 --- /dev/null +++ b/SeatsioDotNet/Seasons/Season.cs @@ -0,0 +1,14 @@ +using System.Collections.Generic; +using SeatsioDotNet.Events; + +namespace SeatsioDotNet.Seasons +{ + public class Season + { + public long Id { get; set; } + public string Key { get; set; } + public List PartialSeasonKeys { get; set; } + public Event SeasonEvent { get; set; } + public List Events { get; set; } + } +} \ No newline at end of file diff --git a/SeatsioDotNet/Seasons/Seasons.cs b/SeatsioDotNet/Seasons/Seasons.cs new file mode 100644 index 0000000..3926108 --- /dev/null +++ b/SeatsioDotNet/Seasons/Seasons.cs @@ -0,0 +1,167 @@ +using System.Collections.Generic; +using RestSharp; +using SeatsioDotNet.Events; +using SeatsioDotNet.Util; +using static SeatsioDotNet.Util.RestUtil; + +namespace SeatsioDotNet.Seasons +{ + public class Seasons + { + private readonly RestClient _restClient; + + public Seasons(RestClient restClient) + { + _restClient = restClient; + } + + public Season Create(string chartKey, string key = null, int? numberOfEvents = null, IEnumerable eventKeys = null, TableBookingConfig tableBookingConfig = null, string socialDistancingRulesetKey = null) + { + Dictionary requestBody = new Dictionary(); + requestBody.Add("chartKey", chartKey); + + if (key != null) + { + requestBody.Add("key", key); + } + + if (numberOfEvents != null) + { + requestBody.Add("numberOfEvents", numberOfEvents); + } + + if (eventKeys != null) + { + requestBody.Add("eventKeys", eventKeys); + } + + if (tableBookingConfig != null) + { + requestBody.Add("tableBookingConfig", tableBookingConfig.AsJsonObject()); + } + + if (socialDistancingRulesetKey != null) + { + requestBody.Add("socialDistancingRulesetKey", socialDistancingRulesetKey); + } + + var restRequest = new RestRequest("/seasons", Method.POST).AddJsonBody(requestBody); + return AssertOk(_restClient.Execute(restRequest)); + } + + public Season CreatePartialSeason(string topLevelSeasonKey, string partialSeasonKey = null, IEnumerable eventKeys = null) + { + Dictionary requestBody = new Dictionary(); + + if (partialSeasonKey != null) + { + requestBody.Add("key", partialSeasonKey); + } + + if (eventKeys != null) + { + requestBody.Add("eventKeys", eventKeys); + } + + var restRequest = new RestRequest("/seasons/{topLevelSeasonKey}/partial-seasons", Method.POST) + .AddUrlSegment("topLevelSeasonKey", topLevelSeasonKey) + .AddJsonBody(requestBody); + return AssertOk(_restClient.Execute(restRequest)); + } + + public Season Retrieve(string key) + { + var restRequest = new RestRequest("/seasons/{key}", Method.GET) + .AddUrlSegment("key", key); + return AssertOk(_restClient.Execute(restRequest)); + } + + public Season RetrievePartialSeason(string topLevelSeasonKey, string partialSeasonKey) + { + var restRequest = new RestRequest("/seasons/{topLevelSeasonKey}/partial-seasons/{partialSeasonKey}", Method.GET) + .AddUrlSegment("topLevelSeasonKey", topLevelSeasonKey) + .AddUrlSegment("partialSeasonKey", partialSeasonKey); + return AssertOk(_restClient.Execute(restRequest)); + } + + public void Delete(string key) + { + var restRequest = new RestRequest("/seasons/{key}", Method.DELETE) + .AddUrlSegment("key", key); + AssertOk(_restClient.Execute(restRequest)); + } + + public void DeletePartialSeason(string topLevelSeasonKey, string partialSeasonKey) + { + var restRequest = new RestRequest("/seasons/{topLevelSeasonKey}/partial-seasons/{partialSeasonKey}", Method.DELETE) + .AddUrlSegment("topLevelSeasonKey", topLevelSeasonKey) + .AddUrlSegment("partialSeasonKey", partialSeasonKey); + AssertOk(_restClient.Execute(restRequest)); + } + + public Season AddEventsToPartialSeason(string topLevelSeasonKey, string partialSeasonKey, string[] eventKeys) + { + Dictionary requestBody = new Dictionary(); + requestBody.Add("eventKeys", eventKeys); + var restRequest = new RestRequest("/seasons/{topLevelSeasonKey}/partial-seasons/{partialSeasonKey}/actions/add-events", Method.POST) + .AddUrlSegment("topLevelSeasonKey", topLevelSeasonKey) + .AddUrlSegment("partialSeasonKey", partialSeasonKey) + .AddJsonBody(requestBody); + return AssertOk(_restClient.Execute(restRequest)); + } + + public Season RemoveEventFromPartialSeason(string topLevelSeasonKey, string partialSeasonKey, string eventKey) + { + var restRequest = new RestRequest("/seasons/{topLevelSeasonKey}/partial-seasons/{partialSeasonKey}/events/{eventKey}", Method.DELETE) + .AddUrlSegment("topLevelSeasonKey", topLevelSeasonKey) + .AddUrlSegment("partialSeasonKey", partialSeasonKey) + .AddUrlSegment("eventKey", eventKey); + return AssertOk(_restClient.Execute(restRequest)); + } + + public Season CreateEvents(string key, string[] eventKeys = null, int? numberOfEvents = null) + { + Dictionary requestBody = new Dictionary(); + + if (numberOfEvents != null) + { + requestBody.Add("numberOfEvents", numberOfEvents); + } + + if (eventKeys != null) + { + requestBody.Add("eventKeys", eventKeys); + } + + var restRequest = new RestRequest("/seasons/{key}/actions/create-events", Method.POST) + .AddUrlSegment("key", key) + .AddJsonBody(requestBody); + return AssertOk(_restClient.Execute(restRequest)); + } + + public IEnumerable ListAll() + { + return List().All(); + } + + public Page ListFirstPage(int? pageSize = null) + { + return List().FirstPage(pageSize: pageSize); + } + + public Page ListPageAfter(long id, int? pageSize = null) + { + return List().PageAfter(id, pageSize: pageSize); + } + + public Page ListPageBefore(long id, int? pageSize = null) + { + return List().PageBefore(id, pageSize: pageSize); + } + + private Lister List() + { + return new Lister(new PageFetcher(_restClient, "/seasons")); + } + } +} \ No newline at end of file diff --git a/SeatsioDotNet/SeatsioClient.cs b/SeatsioDotNet/SeatsioClient.cs index d5936b8..a5a2aa8 100644 --- a/SeatsioDotNet/SeatsioClient.cs +++ b/SeatsioDotNet/SeatsioClient.cs @@ -16,6 +16,7 @@ public class SeatsioClient public EventReports.EventReports EventReports { get; } public ChartReports.ChartReports ChartReports { get; } public UsageReports.UsageReports UsageReports { get; } + public Seasons.Seasons Seasons { get; } private SeatsioRestClient RestClient; @@ -35,6 +36,7 @@ public SeatsioClient(string secretKey, string workspaceKey, string baseUrl) EventReports = new EventReports.EventReports(RestClient); ChartReports = new ChartReports.ChartReports(RestClient); UsageReports = new UsageReports.UsageReports(RestClient); + Seasons = new Seasons.Seasons(RestClient); } public SeatsioClient(Region region, string secretKey, string workspaceKey) : this(secretKey, workspaceKey, diff --git a/SeatsioDotNet/SeatsioDotNet.csproj b/SeatsioDotNet/SeatsioDotNet.csproj index d9eb0a6..f5893ea 100644 --- a/SeatsioDotNet/SeatsioDotNet.csproj +++ b/SeatsioDotNet/SeatsioDotNet.csproj @@ -2,7 +2,7 @@ Library true - 84.3.0 + 85.0.0 mroloux;bverbeken Official Seats.io .NET API client Official Seats.io .NET API client