diff --git a/SeatsioDotNet.Test/Events/BookObjectsTest.cs b/SeatsioDotNet.Test/Events/BookObjectsTest.cs index 7c13af7..e7c9d87 100644 --- a/SeatsioDotNet.Test/Events/BookObjectsTest.cs +++ b/SeatsioDotNet.Test/Events/BookObjectsTest.cs @@ -26,6 +26,26 @@ public void Test() {"A-2", new Labels("2", "seat", "A", "row")} }); } + + + [Fact] + public void Sections() + { + var chartKey = CreateTestChartWithSections(); + var evnt = Client.Events.Create(chartKey); + + var result = Client.Events.Book(evnt.Key, new[] {"Section A-A-1", "Section A-A-2"}); + + Assert.Equal(ObjectStatus.Booked, Client.Events.RetrieveObjectStatus(evnt.Key, "Section A-A-1").Status); + Assert.Equal(ObjectStatus.Booked, Client.Events.RetrieveObjectStatus(evnt.Key, "Section A-A-2").Status); + Assert.Equal(ObjectStatus.Free, Client.Events.RetrieveObjectStatus(evnt.Key, "Section A-A-3").Status); + + result.Labels.Should().BeEquivalentTo(new Dictionary + { + {"Section A-A-1", new Labels("1", "seat", "A", "row", "Section A", "Entrance 1")}, + {"Section A-A-2", new Labels("2", "seat", "A", "row", "Section A", "Entrance 1")} + }); + } [Fact] public void HoldToken() diff --git a/SeatsioDotNet.Test/SeatsioClientTest.cs b/SeatsioDotNet.Test/SeatsioClientTest.cs index 99e97b5..2c96f3c 100644 --- a/SeatsioDotNet.Test/SeatsioClientTest.cs +++ b/SeatsioDotNet.Test/SeatsioClientTest.cs @@ -28,14 +28,23 @@ private TestUser CreateTestUser() } protected string CreateTestChart() + { + return CreateTestChartFromJson(TestChartJson()); + } + + protected string CreateTestChartWithSections() + { + return CreateTestChartFromJson(TestChartWithSectionsJson()); + } + + protected string CreateTestChartFromJson(String json) { var restClient = new RestClient(BaseUrl); var chartKey = Guid.NewGuid().ToString(); - var testChartJson = TestChartJson(); var request = new RestRequest("/system/public/{designerKey}/charts/{chartKey}", Method.POST) .AddUrlSegment("designerKey", User.DesignerKey) .AddUrlSegment("chartKey", chartKey) - .AddParameter("application/json", testChartJson, ParameterType.RequestBody); + .AddParameter("application/json", json, ParameterType.RequestBody); RestUtil.AssertOk(restClient.Execute(request)); return chartKey; } @@ -49,5 +58,10 @@ private string TestChartJson() { return "{\"name\":\"Sample chart\",\"tablesLabelCounter\":3,\"uuidCounter\":369,\"categories\":{\"list\":[{\"label\":\"Cat1\",\"color\":\"#87A9CD\",\"accessible\":false,\"key\":9},{\"label\":\"Cat2\",\"color\":\"#5E42ED\",\"accessible\":false,\"key\":10}],\"maxCategoryKey\":10},\"version\":17,\"venueType\":\"ROWS_WITHOUT_SECTIONS\",\"showAllButtons\":false,\"sectionScaleFactor\":100,\"subChart\":{\"height\":95,\"width\":442,\"tables\":[],\"texts\":[],\"rows\":[{\"label\":\"A\",\"seatLabeling\":{\"algoName\":\"SimpleNumbers\",\"startAtIndex\":0,\"isInverted\":false},\"objectLabeling\":{\"algoName\":\"SimpleLettersUppercase\",\"prefix\":\"\",\"startAtIndex\":0},\"seats\":[{\"x\":151.94,\"y\":9,\"label\":\"1\",\"categoryLabel\":\"Cat1\",\"categoryAccessible\":false,\"categoryKey\":9,\"uuid\":\"uuid288\"},{\"x\":171.94,\"y\":9,\"label\":\"2\",\"categoryLabel\":\"Cat1\",\"categoryAccessible\":false,\"categoryKey\":9,\"uuid\":\"uuid289\"},{\"x\":191.94,\"y\":9,\"label\":\"3\",\"categoryLabel\":\"Cat1\",\"categoryAccessible\":false,\"categoryKey\":9,\"uuid\":\"uuid290\"},{\"x\":211.94,\"y\":9,\"label\":\"4\",\"categoryLabel\":\"Cat1\",\"categoryAccessible\":false,\"categoryKey\":9,\"uuid\":\"uuid291\"},{\"x\":231.94,\"y\":9,\"label\":\"5\",\"categoryLabel\":\"Cat1\",\"categoryAccessible\":false,\"categoryKey\":9,\"uuid\":\"uuid292\"},{\"x\":251.94,\"y\":9,\"label\":\"6\",\"categoryLabel\":\"Cat1\",\"categoryAccessible\":false,\"categoryKey\":9,\"uuid\":\"uuid293\"},{\"x\":271.94,\"y\":9,\"label\":\"7\",\"categoryLabel\":\"Cat1\",\"categoryAccessible\":false,\"categoryKey\":9,\"uuid\":\"uuid294\"},{\"x\":291.94,\"y\":9,\"label\":\"8\",\"categoryLabel\":\"Cat1\",\"categoryAccessible\":false,\"categoryKey\":9,\"uuid\":\"uuid295\"}],\"curve\":0,\"chairSpacing\":4,\"objectType\":\"row\",\"uuid\":\"uuid297\"},{\"label\":\"B\",\"seatLabeling\":{\"algoName\":\"SimpleNumbers\",\"startAtIndex\":0,\"isInverted\":false},\"objectLabeling\":{\"algoName\":\"SimpleLettersUppercase\",\"prefix\":\"\",\"startAtIndex\":0},\"seats\":[{\"x\":151.94,\"y\":33,\"label\":\"1\",\"categoryLabel\":\"Cat1\",\"categoryAccessible\":false,\"categoryKey\":9,\"uuid\":\"uuid298\"},{\"x\":171.94,\"y\":33,\"label\":\"2\",\"categoryLabel\":\"Cat1\",\"categoryAccessible\":false,\"categoryKey\":9,\"uuid\":\"uuid299\"},{\"x\":191.94,\"y\":33,\"label\":\"3\",\"categoryLabel\":\"Cat1\",\"categoryAccessible\":false,\"categoryKey\":9,\"uuid\":\"uuid300\"},{\"x\":211.94,\"y\":33,\"label\":\"4\",\"categoryLabel\":\"Cat1\",\"categoryAccessible\":false,\"categoryKey\":9,\"uuid\":\"uuid301\"},{\"x\":231.94,\"y\":33,\"label\":\"5\",\"categoryLabel\":\"Cat1\",\"categoryAccessible\":false,\"categoryKey\":9,\"uuid\":\"uuid302\"},{\"x\":251.94,\"y\":33,\"label\":\"6\",\"categoryLabel\":\"Cat1\",\"categoryAccessible\":false,\"categoryKey\":9,\"uuid\":\"uuid303\"},{\"x\":271.94,\"y\":33,\"label\":\"7\",\"categoryLabel\":\"Cat1\",\"categoryAccessible\":false,\"categoryKey\":9,\"uuid\":\"uuid304\"},{\"x\":291.94,\"y\":33,\"label\":\"8\",\"categoryLabel\":\"Cat1\",\"categoryAccessible\":false,\"categoryKey\":9,\"uuid\":\"uuid305\"}],\"curve\":0,\"chairSpacing\":4,\"objectType\":\"row\",\"uuid\":\"uuid307\"},{\"label\":\"C\",\"seatLabeling\":{\"algoName\":\"SimpleNumbers\",\"startAtIndex\":0,\"isInverted\":false},\"objectLabeling\":{\"algoName\":\"SimpleLettersUppercase\",\"prefix\":\"\",\"startAtIndex\":0},\"seats\":[{\"x\":151.94,\"y\":57,\"label\":\"1\",\"categoryLabel\":\"Cat2\",\"categoryAccessible\":false,\"categoryKey\":10,\"uuid\":\"uuid308\"},{\"x\":171.94,\"y\":57,\"label\":\"2\",\"categoryLabel\":\"Cat2\",\"categoryAccessible\":false,\"categoryKey\":10,\"uuid\":\"uuid309\"},{\"x\":191.94,\"y\":57,\"label\":\"3\",\"categoryLabel\":\"Cat2\",\"categoryAccessible\":false,\"categoryKey\":10,\"uuid\":\"uuid310\"},{\"x\":211.94,\"y\":57,\"label\":\"4\",\"categoryLabel\":\"Cat2\",\"categoryAccessible\":false,\"categoryKey\":10,\"uuid\":\"uuid311\"},{\"x\":231.94,\"y\":57,\"label\":\"5\",\"categoryLabel\":\"Cat2\",\"categoryAccessible\":false,\"categoryKey\":10,\"uuid\":\"uuid312\"},{\"x\":251.94,\"y\":57,\"label\":\"6\",\"categoryLabel\":\"Cat2\",\"categoryAccessible\":false,\"categoryKey\":10,\"uuid\":\"uuid313\"},{\"x\":271.94,\"y\":57,\"label\":\"7\",\"categoryLabel\":\"Cat2\",\"categoryAccessible\":false,\"categoryKey\":10,\"uuid\":\"uuid314\"},{\"x\":291.94,\"y\":57,\"label\":\"8\",\"categoryLabel\":\"Cat2\",\"categoryAccessible\":false,\"categoryKey\":10,\"uuid\":\"uuid315\"}],\"curve\":0,\"chairSpacing\":4,\"objectType\":\"row\",\"uuid\":\"uuid317\"},{\"label\":\"D\",\"seatLabeling\":{\"algoName\":\"SimpleNumbers\",\"startAtIndex\":0,\"isInverted\":false},\"objectLabeling\":{\"algoName\":\"SimpleLettersUppercase\",\"prefix\":\"\",\"startAtIndex\":0},\"seats\":[{\"x\":151.94,\"y\":81,\"label\":\"1\",\"categoryLabel\":\"Cat2\",\"categoryAccessible\":false,\"categoryKey\":10,\"uuid\":\"uuid318\"},{\"x\":171.94,\"y\":81,\"label\":\"2\",\"categoryLabel\":\"Cat2\",\"categoryAccessible\":false,\"categoryKey\":10,\"uuid\":\"uuid319\"},{\"x\":191.94,\"y\":81,\"label\":\"3\",\"categoryLabel\":\"Cat2\",\"categoryAccessible\":false,\"categoryKey\":10,\"uuid\":\"uuid320\"},{\"x\":211.94,\"y\":81,\"label\":\"4\",\"categoryLabel\":\"Cat2\",\"categoryAccessible\":false,\"categoryKey\":10,\"uuid\":\"uuid321\"},{\"x\":231.94,\"y\":81,\"label\":\"5\",\"categoryLabel\":\"Cat2\",\"categoryAccessible\":false,\"categoryKey\":10,\"uuid\":\"uuid322\"},{\"x\":251.94,\"y\":81,\"label\":\"6\",\"categoryLabel\":\"Cat2\",\"categoryAccessible\":false,\"categoryKey\":10,\"uuid\":\"uuid323\"},{\"x\":271.94,\"y\":81,\"label\":\"7\",\"categoryLabel\":\"Cat2\",\"categoryAccessible\":false,\"categoryKey\":10,\"uuid\":\"uuid324\"},{\"x\":291.94,\"y\":81,\"label\":\"8\",\"categoryLabel\":\"Cat2\",\"categoryAccessible\":false,\"categoryKey\":10,\"uuid\":\"uuid325\"}],\"curve\":0,\"chairSpacing\":4,\"objectType\":\"row\",\"uuid\":\"uuid327\"}],\"shapes\":[],\"booths\":[],\"generalAdmissionAreas\":[{\"categoryLabel\":\"Cat1\",\"categoryKey\":9,\"capacity\":100,\"label\":\"GA1\",\"labelSize\":24,\"labelShown\":true,\"labelHorizontalOffset\":0,\"labelVerticalOffset\":0,\"objectType\":\"generalAdmission\",\"uuid\":\"uuid368\",\"type\":\"circle\",\"center\":{\"x\":53.22,\"y\":48.89},\"rotationAngle\":0,\"radius1\":52.222222222222626,\"radius2\":45.55555555555566},{\"categoryLabel\":\"Cat2\",\"categoryKey\":10,\"capacity\":100,\"label\":\"GA2\",\"labelSize\":24,\"labelShown\":true,\"labelHorizontalOffset\":0,\"labelVerticalOffset\":0,\"objectType\":\"generalAdmission\",\"uuid\":\"uuid369\",\"type\":\"circle\",\"center\":{\"x\":389.22,\"y\":48.89},\"rotationAngle\":0,\"radius1\":52.222222222222626,\"radius2\":45.55555555555566}],\"sections\":[],\"focalPoint\":{\"x\":223.89,\"y\":42.67},\"snapOffset\":{\"x\":0.06,\"y\":3}}}"; } + + private string TestChartWithSectionsJson() + { + return "{\"name\": \"Sample chart with sections\",\"tablesLabelCounter\": 1,\"uuidCounter\": 101,\"categories\": {\"list\": [{\"label\": \"cat1\",\"color\": \"#AEDB54\",\"accessible\": false,\"key\": 1},{\"label\": \"cat2\",\"color\": \"#AFCA54\",\"accessible\": false,\"key\": 4}],\"maxCategoryKey\": 11},\"rowSpacing\": 8,\"version\": 17,\"venueType\": \"ROWS_WITH_SECTIONS\",\"sectionScaleFactor\": 100,\"subChart\": {\"height\": 276,\"width\": 303,\"tables\": [],\"texts\": [],\"rows\": [],\"shapes\": [],\"booths\": [],\"generalAdmissionAreas\": [],\"sections\": [{\"points\": [{\"x\": 0.75,\"y\": 0.75},{\"x\": 0.75,\"y\": 240.75},{\"x\": 132.75,\"y\": 240.75},{\"x\": 132.75,\"y\": 0.75}],\"label\": \"Section A\",\"labelSize\": 12,\"labelHorizontalOffset\": 0,\"labelVerticalOffset\": 0,\"labelRotationAngle\": 0,\"uuid\": \"uuid2\",\"categoryLabel\": \"cat1\",\"categoryKey\": 1,\"topLeft\": {\"x\": 0,\"y\": 0},\"entrance\": \"Entrance 1\",\"viewFromYourSeatImage\": null,\"subChart\": {\"height\": 242,\"width\": 134,\"tables\": [],\"texts\": [],\"rows\": [{\"label\": \"A\",\"seatLabeling\": {\"algoName\": \"SimpleNumbers\",\"startAtIndex\": null,\"isInverted\": null},\"objectLabeling\": {\"algoName\": \"SimpleLettersUppercase\",\"prefix\": null,\"startAtIndex\": null},\"seats\": [{\"x\": 18.25,\"y\": 41.25,\"label\": \"1\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid5\"},{\"x\": 38.25,\"y\": 41.25,\"label\": \"2\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid6\"},{\"x\": 58.25,\"y\": 41.25,\"label\": \"3\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid7\"},{\"x\": 78.25,\"y\": 41.25,\"label\": \"4\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid8\"},{\"x\": 98.25,\"y\": 41.25,\"label\": \"5\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid9\"},{\"x\": 118.25,\"y\": 41.25,\"label\": \"6\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid10\"}],\"curve\": 0,\"chairSpacing\": 4,\"objectType\": \"row\",\"uuid\": \"uuid12\"},{\"label\": \"B\",\"seatLabeling\": {\"algoName\": \"SimpleNumbers\",\"startAtIndex\": null,\"isInverted\": null},\"objectLabeling\": {\"algoName\": \"SimpleLettersUppercase\",\"prefix\": null,\"startAtIndex\": null},\"seats\": [{\"x\": 18.25,\"y\": 65.25,\"label\": \"1\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid13\"},{\"x\": 38.25,\"y\": 65.25,\"label\": \"2\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid14\"},{\"x\": 58.25,\"y\": 65.25,\"label\": \"3\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid15\"},{\"x\": 78.25,\"y\": 65.25,\"label\": \"4\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid16\"},{\"x\": 98.25,\"y\": 65.25,\"label\": \"5\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid17\"},{\"x\": 118.25,\"y\": 65.25,\"label\": \"6\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid18\"}],\"curve\": 0,\"chairSpacing\": 4,\"objectType\": \"row\",\"uuid\": \"uuid20\"},{\"label\": \"C\",\"seatLabeling\": {\"algoName\": \"SimpleNumbers\",\"startAtIndex\": null,\"isInverted\": null},\"objectLabeling\": {\"algoName\": \"SimpleLettersUppercase\",\"prefix\": null,\"startAtIndex\": null},\"seats\": [{\"x\": 18.25,\"y\": 89.25,\"label\": \"1\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid21\"},{\"x\": 38.25,\"y\": 89.25,\"label\": \"2\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid22\"},{\"x\": 58.25,\"y\": 89.25,\"label\": \"3\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid23\"},{\"x\": 78.25,\"y\": 89.25,\"label\": \"4\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid24\"},{\"x\": 98.25,\"y\": 89.25,\"label\": \"5\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid25\"},{\"x\": 118.25,\"y\": 89.25,\"label\": \"6\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid26\"}],\"curve\": 0,\"chairSpacing\": 4,\"objectType\": \"row\",\"uuid\": \"uuid28\"},{\"label\": \"D\",\"seatLabeling\": {\"algoName\": \"SimpleNumbers\",\"startAtIndex\": null,\"isInverted\": null},\"objectLabeling\": {\"algoName\": \"SimpleLettersUppercase\",\"prefix\": null,\"startAtIndex\": null},\"seats\": [{\"x\": 18.25,\"y\": 113.25,\"label\": \"1\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid29\"},{\"x\": 38.25,\"y\": 113.25,\"label\": \"2\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid30\"},{\"x\": 58.25,\"y\": 113.25,\"label\": \"3\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid31\"},{\"x\": 78.25,\"y\": 113.25,\"label\": \"4\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid32\"},{\"x\": 98.25,\"y\": 113.25,\"label\": \"5\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid33\"},{\"x\": 118.25,\"y\": 113.25,\"label\": \"6\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid34\"}],\"curve\": 0,\"chairSpacing\": 4,\"objectType\": \"row\",\"uuid\": \"uuid36\"},{\"label\": \"E\",\"seatLabeling\": {\"algoName\": \"SimpleNumbers\",\"startAtIndex\": null,\"isInverted\": null},\"objectLabeling\": {\"algoName\": \"SimpleLettersUppercase\",\"prefix\": null,\"startAtIndex\": null},\"seats\": [{\"x\": 18.25,\"y\": 137.25,\"label\": \"1\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid37\"},{\"x\": 38.25,\"y\": 137.25,\"label\": \"2\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid38\"},{\"x\": 58.25,\"y\": 137.25,\"label\": \"3\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid39\"},{\"x\": 78.25,\"y\": 137.25,\"label\": \"4\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid40\"},{\"x\": 98.25,\"y\": 137.25,\"label\": \"5\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid41\"},{\"x\": 118.25,\"y\": 137.25,\"label\": \"6\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid42\"}],\"curve\": 0,\"chairSpacing\": 4,\"objectType\": \"row\",\"uuid\": \"uuid44\"},{\"label\": \"F\",\"seatLabeling\": {\"algoName\": \"SimpleNumbers\",\"startAtIndex\": null,\"isInverted\": null},\"objectLabeling\": {\"algoName\": \"SimpleLettersUppercase\",\"prefix\": null,\"startAtIndex\": null},\"seats\": [{\"x\": 18.25,\"y\": 161.25,\"label\": \"1\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid45\"},{\"x\": 38.25,\"y\": 161.25,\"label\": \"2\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid46\"},{\"x\": 58.25,\"y\": 161.25,\"label\": \"3\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid47\"},{\"x\": 78.25,\"y\": 161.25,\"label\": \"4\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid48\"},{\"x\": 98.25,\"y\": 161.25,\"label\": \"5\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid49\"},{\"x\": 118.25,\"y\": 161.25,\"label\": \"6\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid50\"}],\"curve\": 0,\"chairSpacing\": 4,\"objectType\": \"row\",\"uuid\": \"uuid52\"}],\"shapes\": [],\"booths\": [],\"generalAdmissionAreas\": []}},{\"points\": [{\"x\": 190.69,\"y\": 0.75},{\"x\": 190.69,\"y\": 240.75},{\"x\": 302.69,\"y\": 240.75},{\"x\": 302.69,\"y\": 0.75}],\"label\": \"Section B\",\"labelSize\": 12,\"labelHorizontalOffset\": 0,\"labelVerticalOffset\": 0,\"labelRotationAngle\": 0,\"uuid\": \"uuid4\",\"categoryLabel\": \"cat2\",\"categoryKey\": 4,\"topLeft\": {\"x\": 189.94,\"y\": 0},\"entrance\": \"Entrance 2\",\"viewFromYourSeatImage\": null,\"subChart\": {\"height\": 242,\"width\": 114,\"tables\": [],\"texts\": [],\"rows\": [{\"label\": \"A\",\"seatLabeling\": {\"algoName\": \"SimpleNumbers\",\"startAtIndex\": null,\"isInverted\": null},\"objectLabeling\": {\"algoName\": \"SimpleLettersUppercase\",\"prefix\": null,\"startAtIndex\": null},\"seats\": [{\"x\": 16.25,\"y\": 45.25,\"label\": \"1\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid53\"},{\"x\": 36.25,\"y\": 45.25,\"label\": \"2\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid54\"},{\"x\": 56.25,\"y\": 45.25,\"label\": \"3\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid55\"},{\"x\": 76.25,\"y\": 45.25,\"label\": \"4\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid56\"},{\"x\": 96.25,\"y\": 45.25,\"label\": \"5\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid57\"}],\"curve\": 0,\"chairSpacing\": 4,\"objectType\": \"row\",\"uuid\": \"uuid59\"},{\"label\": \"B\",\"seatLabeling\": {\"algoName\": \"SimpleNumbers\",\"startAtIndex\": null,\"isInverted\": null},\"objectLabeling\": {\"algoName\": \"SimpleLettersUppercase\",\"prefix\": null,\"startAtIndex\": null},\"seats\": [{\"x\": 16.25,\"y\": 69.25,\"label\": \"1\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid60\"},{\"x\": 36.25,\"y\": 69.25,\"label\": \"2\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid61\"},{\"x\": 56.25,\"y\": 69.25,\"label\": \"3\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid62\"},{\"x\": 76.25,\"y\": 69.25,\"label\": \"4\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid63\"},{\"x\": 96.25,\"y\": 69.25,\"label\": \"5\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid64\"}],\"curve\": 0,\"chairSpacing\": 4,\"objectType\": \"row\",\"uuid\": \"uuid66\"},{\"label\": \"C\",\"seatLabeling\": {\"algoName\": \"SimpleNumbers\",\"startAtIndex\": null,\"isInverted\": null},\"objectLabeling\": {\"algoName\": \"SimpleLettersUppercase\",\"prefix\": null,\"startAtIndex\": null},\"seats\": [{\"x\": 16.25,\"y\": 93.25,\"label\": \"1\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid67\"},{\"x\": 36.25,\"y\": 93.25,\"label\": \"2\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid68\"},{\"x\": 56.25,\"y\": 93.25,\"label\": \"3\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid69\"},{\"x\": 76.25,\"y\": 93.25,\"label\": \"4\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid70\"},{\"x\": 96.25,\"y\": 93.25,\"label\": \"5\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid71\"}],\"curve\": 0,\"chairSpacing\": 4,\"objectType\": \"row\",\"uuid\": \"uuid73\"},{\"label\": \"D\",\"seatLabeling\": {\"algoName\": \"SimpleNumbers\",\"startAtIndex\": null,\"isInverted\": null},\"objectLabeling\": {\"algoName\": \"SimpleLettersUppercase\",\"prefix\": null,\"startAtIndex\": null},\"seats\": [{\"x\": 16.25,\"y\": 117.25,\"label\": \"1\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid74\"},{\"x\": 36.25,\"y\": 117.25,\"label\": \"2\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid75\"},{\"x\": 56.25,\"y\": 117.25,\"label\": \"3\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid76\"},{\"x\": 76.25,\"y\": 117.25,\"label\": \"4\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid77\"},{\"x\": 96.25,\"y\": 117.25,\"label\": \"5\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid78\"}],\"curve\": 0,\"chairSpacing\": 4,\"objectType\": \"row\",\"uuid\": \"uuid80\"},{\"label\": \"E\",\"seatLabeling\": {\"algoName\": \"SimpleNumbers\",\"startAtIndex\": null,\"isInverted\": null},\"objectLabeling\": {\"algoName\": \"SimpleLettersUppercase\",\"prefix\": null,\"startAtIndex\": null},\"seats\": [{\"x\": 16.25,\"y\": 141.25,\"label\": \"1\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid81\"},{\"x\": 36.25,\"y\": 141.25,\"label\": \"2\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid82\"},{\"x\": 56.25,\"y\": 141.25,\"label\": \"3\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid83\"},{\"x\": 76.25,\"y\": 141.25,\"label\": \"4\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid84\"},{\"x\": 96.25,\"y\": 141.25,\"label\": \"5\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid85\"}],\"curve\": 0,\"chairSpacing\": 4,\"objectType\": \"row\",\"uuid\": \"uuid87\"},{\"label\": \"F\",\"seatLabeling\": {\"algoName\": \"SimpleNumbers\",\"startAtIndex\": null,\"isInverted\": null},\"objectLabeling\": {\"algoName\": \"SimpleLettersUppercase\",\"prefix\": null,\"startAtIndex\": null},\"seats\": [{\"x\": 16.25,\"y\": 165.25,\"label\": \"1\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid88\"},{\"x\": 36.25,\"y\": 165.25,\"label\": \"2\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid89\"},{\"x\": 56.25,\"y\": 165.25,\"label\": \"3\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid90\"},{\"x\": 76.25,\"y\": 165.25,\"label\": \"4\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid91\"},{\"x\": 96.25,\"y\": 165.25,\"label\": \"5\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid92\"}],\"curve\": 0,\"chairSpacing\": 4,\"objectType\": \"row\",\"uuid\": \"uuid94\"},{\"label\": \"G\",\"seatLabeling\": {\"algoName\": \"SimpleNumbers\",\"startAtIndex\": null,\"isInverted\": null},\"objectLabeling\": {\"algoName\": \"SimpleLettersUppercase\",\"prefix\": null,\"startAtIndex\": null},\"seats\": [{\"x\": 16.25,\"y\": 189.25,\"label\": \"1\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid95\"},{\"x\": 36.25,\"y\": 189.25,\"label\": \"2\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid96\"},{\"x\": 56.25,\"y\": 189.25,\"label\": \"3\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid97\"},{\"x\": 76.25,\"y\": 189.25,\"label\": \"4\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid98\"},{\"x\": 96.25,\"y\": 189.25,\"label\": \"5\",\"categoryLabel\": null,\"categoryAccessible\": null,\"categoryKey\": null,\"uuid\": \"uuid99\"}],\"curve\": 0,\"chairSpacing\": 4,\"objectType\": \"row\",\"uuid\": \"uuid101\"}],\"shapes\": [],\"booths\": [],\"generalAdmissionAreas\": []}}],\"focalPoint\": null,\"backgroundImage\": null,\"referenceChart\": null,\"snapOffset\": {\"x\": 3.25,\"y\": 3.25}}}"; + } } } \ No newline at end of file diff --git a/SeatsioDotNet/Events/Entrance.cs b/SeatsioDotNet/Events/Entrance.cs new file mode 100644 index 0000000..9a1c8cb --- /dev/null +++ b/SeatsioDotNet/Events/Entrance.cs @@ -0,0 +1,16 @@ +namespace SeatsioDotNet.Events +{ + public class Entrance + { + public string Label { get; set; } + + public Entrance() + { + } + + public Entrance(string label = null) + { + Label = label; + } + } +} \ No newline at end of file diff --git a/SeatsioDotNet/Events/Labels.cs b/SeatsioDotNet/Events/Labels.cs index bc5b8c1..82578a0 100644 --- a/SeatsioDotNet/Events/Labels.cs +++ b/SeatsioDotNet/Events/Labels.cs @@ -7,12 +7,13 @@ public class Labels public LabelAndType Own { get; set; } public LabelAndType Parent { get; set; } public string Section { get; set; } + public Entrance Entrance { get; set; } public Labels() { } - public Labels(string ownLabel = null, string ownType = null, string parentLabel = null, string parentType = null, string section = null) + public Labels(string ownLabel = null, string ownType = null, string parentLabel = null, string parentType = null, string section = null, string entrance = null) { Own = new LabelAndType(ownLabel, ownType); if (parentLabel != null) @@ -20,6 +21,11 @@ public Labels(string ownLabel = null, string ownType = null, string parentLabel Parent = new LabelAndType(parentLabel, parentType); } + if (entrance != null) + { + Entrance = new Entrance(entrance); + } + Section = section; } diff --git a/SeatsioDotNet/SeatsioDotNet.csproj b/SeatsioDotNet/SeatsioDotNet.csproj index e69bea6..a45887a 100644 --- a/SeatsioDotNet/SeatsioDotNet.csproj +++ b/SeatsioDotNet/SeatsioDotNet.csproj @@ -2,7 +2,7 @@ Library true - 28 + 29 mroloux;bverbeken Official Seats.io .NET API client Official Seats.io .NET API client