From 106a7c75a2b9b7d4ab3c0fed8dc528c63a2975b5 Mon Sep 17 00:00:00 2001 From: Ondrej Fiedler Date: Fri, 6 Jan 2023 17:03:29 +0100 Subject: [PATCH] Support Item Segmentations --- .../AddManualReqlSegmentBatchUnitTest.cs | 46 ++++ .../AddManualReqlSegmentUnitTest.cs | 40 ++++ ...CreateAutoReqlSegmentationBatchUnitTest.cs | 46 ++++ .../CreateAutoReqlSegmentationUnitTest.cs | 56 +++++ ...eateManualReqlSegmentationBatchUnitTest.cs | 46 ++++ .../CreateManualReqlSegmentationUnitTest.cs | 56 +++++ ...ePropertyBasedSegmentationBatchUnitTest.cs | 46 ++++ ...CreatePropertyBasedSegmentationUnitTest.cs | 56 +++++ .../DeleteManualReqlSegmentBatchUnitTest.cs | 50 +++++ .../DeleteManualReqlSegmentUnitTest.cs | 42 ++++ .../DeleteSegmentationBatchUnitTest.cs | 50 +++++ .../DeleteSegmentationUnitTest.cs | 58 +++++ .../GetSegmentationBatchUnitTest.cs | 48 ++++ .../GetSegmentationUnitTest.cs | 42 ++++ .../ListSegmentationsBatchUnitTest.cs | 50 +++++ .../ListSegmentationsUnitTest.cs | 46 ++++ ...ecommendItemSegmentsToItemBatchUnitTest.cs | 42 ++++ ...dItemSegmentsToItemSegmentBatchUnitTest.cs | 42 ++++ ...ommendItemSegmentsToItemSegmentUnitTest.cs | 54 +++++ .../RecommendItemSegmentsToItemUnitTest.cs | 54 +++++ ...ecommendItemSegmentsToUserBatchUnitTest.cs | 42 ++++ .../RecommendItemSegmentsToUserUnitTest.cs | 54 +++++ .../SearchItemSegmentsBatchUnitTest.cs | 42 ++++ .../SearchItemSegmentsUnitTest.cs | 54 +++++ ...UpdateAutoReqlSegmentationBatchUnitTest.cs | 46 ++++ .../UpdateAutoReqlSegmentationUnitTest.cs | 40 ++++ .../UpdateManualReqlSegmentBatchUnitTest.cs | 50 +++++ .../UpdateManualReqlSegmentUnitTest.cs | 42 ++++ ...dateManualReqlSegmentationBatchUnitTest.cs | 46 ++++ .../UpdateManualReqlSegmentationUnitTest.cs | 40 ++++ ...ePropertyBasedSegmentationBatchUnitTest.cs | 46 ++++ ...UpdatePropertyBasedSegmentationUnitTest.cs | 40 ++++ .../ApiRequests/AddBookmark.cs | 4 +- .../ApiRequests/AddCartAddition.cs | 12 +- .../ApiRequests/AddDetailView.cs | 4 +- .../ApiRequests/AddGroup.cs | 4 +- Src/Recombee.ApiClient/ApiRequests/AddItem.cs | 6 +- .../ApiRequests/AddItemProperty.cs | 6 +- .../ApiRequests/AddManualReqlSegment.cs | 93 ++++++++ .../ApiRequests/AddPurchase.cs | 16 +- .../ApiRequests/AddRating.cs | 4 +- .../ApiRequests/AddSearchSynonym.cs | 2 +- .../ApiRequests/AddSeries.cs | 4 +- Src/Recombee.ApiClient/ApiRequests/AddUser.cs | 2 +- .../ApiRequests/AddUserProperty.cs | 8 +- .../ApiRequests/CreateAutoReqlSegmentation.cs | 108 +++++++++ .../CreateManualReqlSegmentation.cs | 97 ++++++++ .../CreatePropertyBasedSegmentation.cs | 109 +++++++++ .../ApiRequests/DeleteAllSearchSynonyms.cs | 2 +- .../ApiRequests/DeleteBookmark.cs | 12 +- .../ApiRequests/DeleteCartAddition.cs | 12 +- .../ApiRequests/DeleteDetailView.cs | 12 +- .../ApiRequests/DeleteGroup.cs | 6 +- .../ApiRequests/DeleteItem.cs | 6 +- .../ApiRequests/DeleteItemProperty.cs | 2 +- .../ApiRequests/DeleteManualReqlSegment.cs | 70 ++++++ .../ApiRequests/DeleteMoreItems.cs | 10 +- .../ApiRequests/DeletePurchase.cs | 12 +- .../ApiRequests/DeleteRating.cs | 8 +- .../ApiRequests/DeleteSearchSynonym.cs | 4 +- .../ApiRequests/DeleteSegmentation.cs | 62 ++++++ .../ApiRequests/DeleteSeries.cs | 4 +- .../ApiRequests/DeleteUser.cs | 4 +- .../ApiRequests/DeleteUserProperty.cs | 4 +- .../ApiRequests/DeleteViewPortion.cs | 2 +- .../ApiRequests/GetItemPropertyInfo.cs | 2 +- .../ApiRequests/GetItemValues.cs | 8 +- .../ApiRequests/GetSegmentation.cs | 62 ++++++ .../ApiRequests/GetUserPropertyInfo.cs | 2 +- .../ApiRequests/GetUserValues.cs | 8 +- .../ApiRequests/InsertToGroup.cs | 8 +- .../ApiRequests/InsertToSeries.cs | 8 +- .../ApiRequests/ListGroupItems.cs | 6 +- .../ApiRequests/ListGroups.cs | 2 +- .../ApiRequests/ListItemBookmarks.cs | 8 +- .../ApiRequests/ListItemCartAdditions.cs | 8 +- .../ApiRequests/ListItemDetailViews.cs | 8 +- .../ApiRequests/ListItemProperties.cs | 2 +- .../ApiRequests/ListItemPurchases.cs | 8 +- .../ApiRequests/ListItemRatings.cs | 8 +- .../ApiRequests/ListItemViewPortions.cs | 8 +- .../ApiRequests/ListItems.cs | 6 +- .../ApiRequests/ListSearchSynonyms.cs | 2 +- .../ApiRequests/ListSegmentations.cs | 62 ++++++ .../ApiRequests/ListSeries.cs | 2 +- .../ApiRequests/ListSeriesItems.cs | 8 +- .../ApiRequests/ListUserBookmarks.cs | 4 +- .../ApiRequests/ListUserCartAdditions.cs | 4 +- .../ApiRequests/ListUserDetailViews.cs | 4 +- .../ApiRequests/ListUserProperties.cs | 2 +- .../ApiRequests/ListUserPurchases.cs | 4 +- .../ApiRequests/ListUserRatings.cs | 4 +- .../ApiRequests/ListUserViewPortions.cs | 4 +- .../ApiRequests/ListUsers.cs | 6 +- .../ApiRequests/MergeUsers.cs | 8 +- .../RecommendItemSegmentsToItem.cs | 209 ++++++++++++++++++ .../RecommendItemSegmentsToItemSegment.cs | 209 ++++++++++++++++++ .../RecommendItemSegmentsToUser.cs | 174 +++++++++++++++ .../ApiRequests/RecommendItemsToItem.cs | 98 ++++---- .../ApiRequests/RecommendItemsToUser.cs | 84 +++---- .../ApiRequests/RecommendNextItems.cs | 6 +- .../ApiRequests/RecommendUsersToItem.cs | 68 +++--- .../ApiRequests/RecommendUsersToUser.cs | 80 +++---- .../ApiRequests/RemoveFromGroup.cs | 2 +- .../ApiRequests/RemoveFromSeries.cs | 2 +- .../ApiRequests/ResetDatabase.cs | 4 +- .../ApiRequests/SearchItemSegments.cs | 181 +++++++++++++++ .../ApiRequests/SearchItems.cs | 62 +++--- .../ApiRequests/SetViewPortion.cs | 12 +- .../ApiRequests/UpdateAutoReqlSegmentation.cs | 98 ++++++++ .../ApiRequests/UpdateManualReqlSegment.cs | 92 ++++++++ .../UpdateManualReqlSegmentation.cs | 86 +++++++ .../ApiRequests/UpdateMoreItems.cs | 12 +- .../UpdatePropertyBasedSegmentation.cs | 98 ++++++++ .../Bindings/CartAddition.cs | 4 +- .../Bindings/ListSegmentationsResponse.cs | 54 +++++ Src/Recombee.ApiClient/Bindings/Purchase.cs | 6 +- .../Bindings/SearchSynonym.cs | 2 +- .../Bindings/Segmentation.cs | 90 ++++++++ .../Bindings/ViewPortion.cs | 4 +- .../Recombee.ApiClient.csproj | 2 +- .../RecombeeClient.Generated.cs | 186 ++++++++++++++++ Src/Recombee.ApiClient/RecombeeClient.cs | 2 +- 123 files changed, 4039 insertions(+), 387 deletions(-) create mode 100644 Src/Recombee.ApiClient.Tests/AddManualReqlSegmentBatchUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/AddManualReqlSegmentUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/CreateAutoReqlSegmentationBatchUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/CreateAutoReqlSegmentationUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/CreateManualReqlSegmentationBatchUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/CreateManualReqlSegmentationUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/CreatePropertyBasedSegmentationBatchUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/CreatePropertyBasedSegmentationUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/DeleteManualReqlSegmentBatchUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/DeleteManualReqlSegmentUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/DeleteSegmentationBatchUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/DeleteSegmentationUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/GetSegmentationBatchUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/GetSegmentationUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/ListSegmentationsBatchUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/ListSegmentationsUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToItemBatchUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToItemSegmentBatchUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToItemSegmentUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToItemUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToUserBatchUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToUserUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/SearchItemSegmentsBatchUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/SearchItemSegmentsUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/UpdateAutoReqlSegmentationBatchUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/UpdateAutoReqlSegmentationUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/UpdateManualReqlSegmentBatchUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/UpdateManualReqlSegmentUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/UpdateManualReqlSegmentationBatchUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/UpdateManualReqlSegmentationUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/UpdatePropertyBasedSegmentationBatchUnitTest.cs create mode 100644 Src/Recombee.ApiClient.Tests/UpdatePropertyBasedSegmentationUnitTest.cs create mode 100644 Src/Recombee.ApiClient/ApiRequests/AddManualReqlSegment.cs create mode 100644 Src/Recombee.ApiClient/ApiRequests/CreateAutoReqlSegmentation.cs create mode 100644 Src/Recombee.ApiClient/ApiRequests/CreateManualReqlSegmentation.cs create mode 100644 Src/Recombee.ApiClient/ApiRequests/CreatePropertyBasedSegmentation.cs create mode 100644 Src/Recombee.ApiClient/ApiRequests/DeleteManualReqlSegment.cs create mode 100644 Src/Recombee.ApiClient/ApiRequests/DeleteSegmentation.cs create mode 100644 Src/Recombee.ApiClient/ApiRequests/GetSegmentation.cs create mode 100644 Src/Recombee.ApiClient/ApiRequests/ListSegmentations.cs create mode 100644 Src/Recombee.ApiClient/ApiRequests/RecommendItemSegmentsToItem.cs create mode 100644 Src/Recombee.ApiClient/ApiRequests/RecommendItemSegmentsToItemSegment.cs create mode 100644 Src/Recombee.ApiClient/ApiRequests/RecommendItemSegmentsToUser.cs create mode 100644 Src/Recombee.ApiClient/ApiRequests/SearchItemSegments.cs create mode 100644 Src/Recombee.ApiClient/ApiRequests/UpdateAutoReqlSegmentation.cs create mode 100644 Src/Recombee.ApiClient/ApiRequests/UpdateManualReqlSegment.cs create mode 100644 Src/Recombee.ApiClient/ApiRequests/UpdateManualReqlSegmentation.cs create mode 100644 Src/Recombee.ApiClient/ApiRequests/UpdatePropertyBasedSegmentation.cs create mode 100644 Src/Recombee.ApiClient/Bindings/ListSegmentationsResponse.cs create mode 100644 Src/Recombee.ApiClient/Bindings/Segmentation.cs diff --git a/Src/Recombee.ApiClient.Tests/AddManualReqlSegmentBatchUnitTest.cs b/Src/Recombee.ApiClient.Tests/AddManualReqlSegmentBatchUnitTest.cs new file mode 100644 index 0000000..1ada71f --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/AddManualReqlSegmentBatchUnitTest.cs @@ -0,0 +1,46 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class AddManualReqlSegmentBatchUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestAddManualReqlSegment() + { + Object resp2; + resp2 = client.Send(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); + + Request[] requests = new Request[] { + new AddManualReqlSegment("seg1", "first-segment", "'str_property' != null", title: "First Segment") + }; + + BatchResponse batchResponse = client.Send(new Batch(requests)); + Assert.Equal(201, (int)batchResponse.StatusCodes.ElementAt(0)); + } + + [Fact] + public async void TestAddManualReqlSegmentAsync() + { + Object resp2; + resp2 = await client.SendAsync(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); + + Request[] requests = new Request[] { + new AddManualReqlSegment("seg1", "first-segment", "'str_property' != null", title: "First Segment") + }; + + BatchResponse batchResponse = await client.SendAsync(new Batch(requests)); + Assert.Equal(201, (int)batchResponse.StatusCodes.ElementAt(0)); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/AddManualReqlSegmentUnitTest.cs b/Src/Recombee.ApiClient.Tests/AddManualReqlSegmentUnitTest.cs new file mode 100644 index 0000000..7a663a0 --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/AddManualReqlSegmentUnitTest.cs @@ -0,0 +1,40 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class AddManualReqlSegmentUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestAddManualReqlSegment() + { + AddManualReqlSegment req; + RecombeeBinding resp; + Object resp2; + // it 'adds manual ReQL segment' + resp2 = client.Send(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); + resp = client.Send(new AddManualReqlSegment("seg1", "first-segment", "'str_property' != null", title: "First Segment")); + } + + [Fact] + public async void TestAddManualReqlSegmentAsync() + { + AddManualReqlSegment req; + RecombeeBinding resp; + Object resp2; + // it 'adds manual ReQL segment' + resp2 = await client.SendAsync(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); + resp = await client.SendAsync(new AddManualReqlSegment("seg1", "first-segment", "'str_property' != null", title: "First Segment")); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/CreateAutoReqlSegmentationBatchUnitTest.cs b/Src/Recombee.ApiClient.Tests/CreateAutoReqlSegmentationBatchUnitTest.cs new file mode 100644 index 0000000..ded0ef7 --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/CreateAutoReqlSegmentationBatchUnitTest.cs @@ -0,0 +1,46 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class CreateAutoReqlSegmentationBatchUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestCreateAutoReqlSegmentation() + { + Object resp2; + Request[] requests = new Request[] { + new CreateAutoReqlSegmentation("seg1", "items", "{'str_property'}", title: "Test Segmentation", description: "For test purposes"), + new CreateAutoReqlSegmentation("seg1", "items", "{'str_property'}", title: "Test Segmentation", description: "For test purposes") + }; + + BatchResponse batchResponse = client.Send(new Batch(requests)); + Assert.Equal(201, (int)batchResponse.StatusCodes.ElementAt(0)); + Assert.Equal(409, (int)batchResponse.StatusCodes.ElementAt(1)); + } + + [Fact] + public async void TestCreateAutoReqlSegmentationAsync() + { + Object resp2; + Request[] requests = new Request[] { + new CreateAutoReqlSegmentation("seg1", "items", "{'str_property'}", title: "Test Segmentation", description: "For test purposes"), + new CreateAutoReqlSegmentation("seg1", "items", "{'str_property'}", title: "Test Segmentation", description: "For test purposes") + }; + + BatchResponse batchResponse = await client.SendAsync(new Batch(requests)); + Assert.Equal(201, (int)batchResponse.StatusCodes.ElementAt(0)); + Assert.Equal(409, (int)batchResponse.StatusCodes.ElementAt(1)); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/CreateAutoReqlSegmentationUnitTest.cs b/Src/Recombee.ApiClient.Tests/CreateAutoReqlSegmentationUnitTest.cs new file mode 100644 index 0000000..c274df8 --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/CreateAutoReqlSegmentationUnitTest.cs @@ -0,0 +1,56 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class CreateAutoReqlSegmentationUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestCreateAutoReqlSegmentation() + { + CreateAutoReqlSegmentation req; + RecombeeBinding resp; + Object resp2; + // it 'creates auto ReQL segmentation' + resp = client.Send(new CreateAutoReqlSegmentation("seg1", "items", "{'str_property'}", title: "Test Segmentation", description: "For test purposes")); + try + { + client.Send(new CreateAutoReqlSegmentation("seg1", "items", "{'str_property'}", title: "Test Segmentation", description: "For test purposes")); + Assert.True(false,"No exception thrown"); + } + catch (ResponseException ex) + { + Assert.Equal(409, (int)ex.StatusCode); + } + } + + [Fact] + public async void TestCreateAutoReqlSegmentationAsync() + { + CreateAutoReqlSegmentation req; + RecombeeBinding resp; + Object resp2; + // it 'creates auto ReQL segmentation' + resp = await client.SendAsync(new CreateAutoReqlSegmentation("seg1", "items", "{'str_property'}", title: "Test Segmentation", description: "For test purposes")); + try + { + await client.SendAsync(new CreateAutoReqlSegmentation("seg1", "items", "{'str_property'}", title: "Test Segmentation", description: "For test purposes")); + Assert.True(false,"No exception thrown"); + } + catch (ResponseException ex) + { + Assert.Equal(409, (int)ex.StatusCode); + } + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/CreateManualReqlSegmentationBatchUnitTest.cs b/Src/Recombee.ApiClient.Tests/CreateManualReqlSegmentationBatchUnitTest.cs new file mode 100644 index 0000000..29a9b1b --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/CreateManualReqlSegmentationBatchUnitTest.cs @@ -0,0 +1,46 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class CreateManualReqlSegmentationBatchUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestCreateManualReqlSegmentation() + { + Object resp2; + Request[] requests = new Request[] { + new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes"), + new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes") + }; + + BatchResponse batchResponse = client.Send(new Batch(requests)); + Assert.Equal(201, (int)batchResponse.StatusCodes.ElementAt(0)); + Assert.Equal(409, (int)batchResponse.StatusCodes.ElementAt(1)); + } + + [Fact] + public async void TestCreateManualReqlSegmentationAsync() + { + Object resp2; + Request[] requests = new Request[] { + new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes"), + new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes") + }; + + BatchResponse batchResponse = await client.SendAsync(new Batch(requests)); + Assert.Equal(201, (int)batchResponse.StatusCodes.ElementAt(0)); + Assert.Equal(409, (int)batchResponse.StatusCodes.ElementAt(1)); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/CreateManualReqlSegmentationUnitTest.cs b/Src/Recombee.ApiClient.Tests/CreateManualReqlSegmentationUnitTest.cs new file mode 100644 index 0000000..9953dc3 --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/CreateManualReqlSegmentationUnitTest.cs @@ -0,0 +1,56 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class CreateManualReqlSegmentationUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestCreateManualReqlSegmentation() + { + CreateManualReqlSegmentation req; + RecombeeBinding resp; + Object resp2; + // it 'creates manual ReQL segmentation' + resp = client.Send(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); + try + { + client.Send(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); + Assert.True(false,"No exception thrown"); + } + catch (ResponseException ex) + { + Assert.Equal(409, (int)ex.StatusCode); + } + } + + [Fact] + public async void TestCreateManualReqlSegmentationAsync() + { + CreateManualReqlSegmentation req; + RecombeeBinding resp; + Object resp2; + // it 'creates manual ReQL segmentation' + resp = await client.SendAsync(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); + try + { + await client.SendAsync(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); + Assert.True(false,"No exception thrown"); + } + catch (ResponseException ex) + { + Assert.Equal(409, (int)ex.StatusCode); + } + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/CreatePropertyBasedSegmentationBatchUnitTest.cs b/Src/Recombee.ApiClient.Tests/CreatePropertyBasedSegmentationBatchUnitTest.cs new file mode 100644 index 0000000..79cfd9d --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/CreatePropertyBasedSegmentationBatchUnitTest.cs @@ -0,0 +1,46 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class CreatePropertyBasedSegmentationBatchUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestCreatePropertyBasedSegmentation() + { + Object resp2; + Request[] requests = new Request[] { + new CreatePropertyBasedSegmentation("seg1", "items", "str_property", title: "Test Segmentation", description: "For test purposes"), + new CreatePropertyBasedSegmentation("seg1", "items", "str_property", title: "Test Segmentation", description: "For test purposes") + }; + + BatchResponse batchResponse = client.Send(new Batch(requests)); + Assert.Equal(201, (int)batchResponse.StatusCodes.ElementAt(0)); + Assert.Equal(409, (int)batchResponse.StatusCodes.ElementAt(1)); + } + + [Fact] + public async void TestCreatePropertyBasedSegmentationAsync() + { + Object resp2; + Request[] requests = new Request[] { + new CreatePropertyBasedSegmentation("seg1", "items", "str_property", title: "Test Segmentation", description: "For test purposes"), + new CreatePropertyBasedSegmentation("seg1", "items", "str_property", title: "Test Segmentation", description: "For test purposes") + }; + + BatchResponse batchResponse = await client.SendAsync(new Batch(requests)); + Assert.Equal(201, (int)batchResponse.StatusCodes.ElementAt(0)); + Assert.Equal(409, (int)batchResponse.StatusCodes.ElementAt(1)); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/CreatePropertyBasedSegmentationUnitTest.cs b/Src/Recombee.ApiClient.Tests/CreatePropertyBasedSegmentationUnitTest.cs new file mode 100644 index 0000000..f0c9827 --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/CreatePropertyBasedSegmentationUnitTest.cs @@ -0,0 +1,56 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class CreatePropertyBasedSegmentationUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestCreatePropertyBasedSegmentation() + { + CreatePropertyBasedSegmentation req; + RecombeeBinding resp; + Object resp2; + // it 'creates property based segmentation' + resp = client.Send(new CreatePropertyBasedSegmentation("seg1", "items", "str_property", title: "Test Segmentation", description: "For test purposes")); + try + { + client.Send(new CreatePropertyBasedSegmentation("seg1", "items", "str_property", title: "Test Segmentation", description: "For test purposes")); + Assert.True(false,"No exception thrown"); + } + catch (ResponseException ex) + { + Assert.Equal(409, (int)ex.StatusCode); + } + } + + [Fact] + public async void TestCreatePropertyBasedSegmentationAsync() + { + CreatePropertyBasedSegmentation req; + RecombeeBinding resp; + Object resp2; + // it 'creates property based segmentation' + resp = await client.SendAsync(new CreatePropertyBasedSegmentation("seg1", "items", "str_property", title: "Test Segmentation", description: "For test purposes")); + try + { + await client.SendAsync(new CreatePropertyBasedSegmentation("seg1", "items", "str_property", title: "Test Segmentation", description: "For test purposes")); + Assert.True(false,"No exception thrown"); + } + catch (ResponseException ex) + { + Assert.Equal(409, (int)ex.StatusCode); + } + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/DeleteManualReqlSegmentBatchUnitTest.cs b/Src/Recombee.ApiClient.Tests/DeleteManualReqlSegmentBatchUnitTest.cs new file mode 100644 index 0000000..2c486b3 --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/DeleteManualReqlSegmentBatchUnitTest.cs @@ -0,0 +1,50 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class DeleteManualReqlSegmentBatchUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestDeleteManualReqlSegment() + { + Object resp2; + resp2 = client.Send(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); + + resp2 = client.Send(new AddManualReqlSegment("seg1", "first-segment", "'str_property' != null", title: "First Segment")); + + Request[] requests = new Request[] { + new DeleteManualReqlSegment("seg1", "first-segment") + }; + + BatchResponse batchResponse = client.Send(new Batch(requests)); + Assert.Equal(200, (int)batchResponse.StatusCodes.ElementAt(0)); + } + + [Fact] + public async void TestDeleteManualReqlSegmentAsync() + { + Object resp2; + resp2 = await client.SendAsync(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); + + resp2 = await client.SendAsync(new AddManualReqlSegment("seg1", "first-segment", "'str_property' != null", title: "First Segment")); + + Request[] requests = new Request[] { + new DeleteManualReqlSegment("seg1", "first-segment") + }; + + BatchResponse batchResponse = await client.SendAsync(new Batch(requests)); + Assert.Equal(200, (int)batchResponse.StatusCodes.ElementAt(0)); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/DeleteManualReqlSegmentUnitTest.cs b/Src/Recombee.ApiClient.Tests/DeleteManualReqlSegmentUnitTest.cs new file mode 100644 index 0000000..498883f --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/DeleteManualReqlSegmentUnitTest.cs @@ -0,0 +1,42 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class DeleteManualReqlSegmentUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestDeleteManualReqlSegment() + { + DeleteManualReqlSegment req; + RecombeeBinding resp; + Object resp2; + // it 'deletes manual ReQL segment' + resp2 = client.Send(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); + resp2 = client.Send(new AddManualReqlSegment("seg1", "first-segment", "'str_property' != null", title: "First Segment")); + resp = client.Send(new DeleteManualReqlSegment("seg1", "first-segment")); + } + + [Fact] + public async void TestDeleteManualReqlSegmentAsync() + { + DeleteManualReqlSegment req; + RecombeeBinding resp; + Object resp2; + // it 'deletes manual ReQL segment' + resp2 = await client.SendAsync(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); + resp2 = await client.SendAsync(new AddManualReqlSegment("seg1", "first-segment", "'str_property' != null", title: "First Segment")); + resp = await client.SendAsync(new DeleteManualReqlSegment("seg1", "first-segment")); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/DeleteSegmentationBatchUnitTest.cs b/Src/Recombee.ApiClient.Tests/DeleteSegmentationBatchUnitTest.cs new file mode 100644 index 0000000..23d7a23 --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/DeleteSegmentationBatchUnitTest.cs @@ -0,0 +1,50 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class DeleteSegmentationBatchUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestDeleteSegmentation() + { + Object resp2; + resp2 = client.Send(new CreatePropertyBasedSegmentation("seg1", "items", "str_property")); + + Request[] requests = new Request[] { + new DeleteSegmentation("seg1"), + new DeleteSegmentation("seg1") + }; + + BatchResponse batchResponse = client.Send(new Batch(requests)); + Assert.Equal(200, (int)batchResponse.StatusCodes.ElementAt(0)); + Assert.Equal(404, (int)batchResponse.StatusCodes.ElementAt(1)); + } + + [Fact] + public async void TestDeleteSegmentationAsync() + { + Object resp2; + resp2 = await client.SendAsync(new CreatePropertyBasedSegmentation("seg1", "items", "str_property")); + + Request[] requests = new Request[] { + new DeleteSegmentation("seg1"), + new DeleteSegmentation("seg1") + }; + + BatchResponse batchResponse = await client.SendAsync(new Batch(requests)); + Assert.Equal(200, (int)batchResponse.StatusCodes.ElementAt(0)); + Assert.Equal(404, (int)batchResponse.StatusCodes.ElementAt(1)); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/DeleteSegmentationUnitTest.cs b/Src/Recombee.ApiClient.Tests/DeleteSegmentationUnitTest.cs new file mode 100644 index 0000000..451e79b --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/DeleteSegmentationUnitTest.cs @@ -0,0 +1,58 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class DeleteSegmentationUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestDeleteSegmentation() + { + DeleteSegmentation req; + RecombeeBinding resp; + Object resp2; + // it 'deletes segmentation' + resp2 = client.Send(new CreatePropertyBasedSegmentation("seg1", "items", "str_property")); + resp = client.Send(new DeleteSegmentation("seg1")); + try + { + client.Send(new DeleteSegmentation("seg1")); + Assert.True(false,"No exception thrown"); + } + catch (ResponseException ex) + { + Assert.Equal(404, (int)ex.StatusCode); + } + } + + [Fact] + public async void TestDeleteSegmentationAsync() + { + DeleteSegmentation req; + RecombeeBinding resp; + Object resp2; + // it 'deletes segmentation' + resp2 = await client.SendAsync(new CreatePropertyBasedSegmentation("seg1", "items", "str_property")); + resp = await client.SendAsync(new DeleteSegmentation("seg1")); + try + { + await client.SendAsync(new DeleteSegmentation("seg1")); + Assert.True(false,"No exception thrown"); + } + catch (ResponseException ex) + { + Assert.Equal(404, (int)ex.StatusCode); + } + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/GetSegmentationBatchUnitTest.cs b/Src/Recombee.ApiClient.Tests/GetSegmentationBatchUnitTest.cs new file mode 100644 index 0000000..30bd6a5 --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/GetSegmentationBatchUnitTest.cs @@ -0,0 +1,48 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class GetSegmentationBatchUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestGetSegmentation() + { + Object resp2; + resp2 = client.Send(new CreatePropertyBasedSegmentation("seg1", "items", "str_property")); + + Request[] requests = new Request[] { + new GetSegmentation("seg1") + }; + + BatchResponse batchResponse = client.Send(new Batch(requests)); + Assert.Equal(200, (int)batchResponse.StatusCodes.ElementAt(0)); + Assert.Equal ("seg1",((Segmentation) batchResponse[0]).SegmentationId); + } + + [Fact] + public async void TestGetSegmentationAsync() + { + Object resp2; + resp2 = await client.SendAsync(new CreatePropertyBasedSegmentation("seg1", "items", "str_property")); + + Request[] requests = new Request[] { + new GetSegmentation("seg1") + }; + + BatchResponse batchResponse = await client.SendAsync(new Batch(requests)); + Assert.Equal(200, (int)batchResponse.StatusCodes.ElementAt(0)); + Assert.Equal ("seg1",((Segmentation) batchResponse[0]).SegmentationId); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/GetSegmentationUnitTest.cs b/Src/Recombee.ApiClient.Tests/GetSegmentationUnitTest.cs new file mode 100644 index 0000000..98d4191 --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/GetSegmentationUnitTest.cs @@ -0,0 +1,42 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class GetSegmentationUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestGetSegmentation() + { + GetSegmentation req; + Segmentation resp; + Object resp2; + // it 'gets existing segmentation' + resp2 = client.Send(new CreatePropertyBasedSegmentation("seg1", "items", "str_property")); + resp = client.Send(new GetSegmentation("seg1")); + Assert.Equal ("seg1",resp.SegmentationId); + } + + [Fact] + public async void TestGetSegmentationAsync() + { + GetSegmentation req; + Segmentation resp; + Object resp2; + // it 'gets existing segmentation' + resp2 = await client.SendAsync(new CreatePropertyBasedSegmentation("seg1", "items", "str_property")); + resp = await client.SendAsync(new GetSegmentation("seg1")); + Assert.Equal ("seg1",resp.SegmentationId); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/ListSegmentationsBatchUnitTest.cs b/Src/Recombee.ApiClient.Tests/ListSegmentationsBatchUnitTest.cs new file mode 100644 index 0000000..fc1c84b --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/ListSegmentationsBatchUnitTest.cs @@ -0,0 +1,50 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class ListSegmentationsBatchUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestListSegmentations() + { + Object resp2; + System.Threading.Thread.Sleep(10000); + resp2 = client.Send(new CreatePropertyBasedSegmentation("seg1", "items", "str_property")); + + Request[] requests = new Request[] { + new ListSegmentations("items") + }; + + BatchResponse batchResponse = client.Send(new Batch(requests)); + Assert.Equal(200, (int)batchResponse.StatusCodes.ElementAt(0)); + Assert.Equal(1, ((ListSegmentationsResponse) batchResponse[0]).Segmentations.Count()); + } + + [Fact] + public async void TestListSegmentationsAsync() + { + Object resp2; + System.Threading.Thread.Sleep(10000); + resp2 = await client.SendAsync(new CreatePropertyBasedSegmentation("seg1", "items", "str_property")); + + Request[] requests = new Request[] { + new ListSegmentations("items") + }; + + BatchResponse batchResponse = await client.SendAsync(new Batch(requests)); + Assert.Equal(200, (int)batchResponse.StatusCodes.ElementAt(0)); + Assert.Equal(1, ((ListSegmentationsResponse) batchResponse[0]).Segmentations.Count()); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/ListSegmentationsUnitTest.cs b/Src/Recombee.ApiClient.Tests/ListSegmentationsUnitTest.cs new file mode 100644 index 0000000..0b0f7fd --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/ListSegmentationsUnitTest.cs @@ -0,0 +1,46 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class ListSegmentationsUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestListSegmentations() + { + ListSegmentations req; + ListSegmentationsResponse resp; + Object resp2; + // it 'lists existing segmentations' + System.Threading.Thread.Sleep(10000); + resp2 = client.Send(new CreatePropertyBasedSegmentation("seg1", "items", "str_property")); + System.Threading.Thread.Sleep(10000); + resp = client.Send(new ListSegmentations("items")); + Assert.Equal(1, resp.Segmentations.Count()); + } + + [Fact] + public async void TestListSegmentationsAsync() + { + ListSegmentations req; + ListSegmentationsResponse resp; + Object resp2; + // it 'lists existing segmentations' + System.Threading.Thread.Sleep(10000); + resp2 = await client.SendAsync(new CreatePropertyBasedSegmentation("seg1", "items", "str_property")); + System.Threading.Thread.Sleep(10000); + resp = await client.SendAsync(new ListSegmentations("items")); + Assert.Equal(1, resp.Segmentations.Count()); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToItemBatchUnitTest.cs b/Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToItemBatchUnitTest.cs new file mode 100644 index 0000000..ee3dafa --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToItemBatchUnitTest.cs @@ -0,0 +1,42 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class RecommendItemSegmentsToItemBatchUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestRecommendItemSegmentsToItem() + { + Object resp2; + Request[] requests = new Request[] { + new RecommendItemSegmentsToItem("entity_id", "entity_id", 5, scenario: "scenario1", cascadeCreate: true) + }; + + BatchResponse batchResponse = client.Send(new Batch(requests)); + Assert.Equal(400, (int)batchResponse.StatusCodes.ElementAt(0)); + } + + [Fact] + public async void TestRecommendItemSegmentsToItemAsync() + { + Object resp2; + Request[] requests = new Request[] { + new RecommendItemSegmentsToItem("entity_id", "entity_id", 5, scenario: "scenario1", cascadeCreate: true) + }; + + BatchResponse batchResponse = await client.SendAsync(new Batch(requests)); + Assert.Equal(400, (int)batchResponse.StatusCodes.ElementAt(0)); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToItemSegmentBatchUnitTest.cs b/Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToItemSegmentBatchUnitTest.cs new file mode 100644 index 0000000..6b87187 --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToItemSegmentBatchUnitTest.cs @@ -0,0 +1,42 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class RecommendItemSegmentsToItemSegmentBatchUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestRecommendItemSegmentsToItemSegment() + { + Object resp2; + Request[] requests = new Request[] { + new RecommendItemSegmentsToItemSegment("segment_id", "entity_id", 5, scenario: "scenario1", cascadeCreate: true) + }; + + BatchResponse batchResponse = client.Send(new Batch(requests)); + Assert.Equal(400, (int)batchResponse.StatusCodes.ElementAt(0)); + } + + [Fact] + public async void TestRecommendItemSegmentsToItemSegmentAsync() + { + Object resp2; + Request[] requests = new Request[] { + new RecommendItemSegmentsToItemSegment("segment_id", "entity_id", 5, scenario: "scenario1", cascadeCreate: true) + }; + + BatchResponse batchResponse = await client.SendAsync(new Batch(requests)); + Assert.Equal(400, (int)batchResponse.StatusCodes.ElementAt(0)); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToItemSegmentUnitTest.cs b/Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToItemSegmentUnitTest.cs new file mode 100644 index 0000000..05a658e --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToItemSegmentUnitTest.cs @@ -0,0 +1,54 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class RecommendItemSegmentsToItemSegmentUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestRecommendItemSegmentsToItemSegment() + { + RecommendItemSegmentsToItemSegment req; + RecommendationResponse resp; + Object resp2; + // it 'rejects request to scenario which is not set up' + try + { + client.Send(new RecommendItemSegmentsToItemSegment("segment_id", "entity_id", 5, scenario: "scenario1", cascadeCreate: true)); + Assert.True(false,"No exception thrown"); + } + catch (ResponseException ex) + { + Assert.Equal(400, (int)ex.StatusCode); + } + } + + [Fact] + public async void TestRecommendItemSegmentsToItemSegmentAsync() + { + RecommendItemSegmentsToItemSegment req; + RecommendationResponse resp; + Object resp2; + // it 'rejects request to scenario which is not set up' + try + { + await client.SendAsync(new RecommendItemSegmentsToItemSegment("segment_id", "entity_id", 5, scenario: "scenario1", cascadeCreate: true)); + Assert.True(false,"No exception thrown"); + } + catch (ResponseException ex) + { + Assert.Equal(400, (int)ex.StatusCode); + } + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToItemUnitTest.cs b/Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToItemUnitTest.cs new file mode 100644 index 0000000..c07938b --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToItemUnitTest.cs @@ -0,0 +1,54 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class RecommendItemSegmentsToItemUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestRecommendItemSegmentsToItem() + { + RecommendItemSegmentsToItem req; + RecommendationResponse resp; + Object resp2; + // it 'rejects request to scenario which is not set up' + try + { + client.Send(new RecommendItemSegmentsToItem("entity_id", "entity_id", 5, scenario: "scenario1", cascadeCreate: true)); + Assert.True(false,"No exception thrown"); + } + catch (ResponseException ex) + { + Assert.Equal(400, (int)ex.StatusCode); + } + } + + [Fact] + public async void TestRecommendItemSegmentsToItemAsync() + { + RecommendItemSegmentsToItem req; + RecommendationResponse resp; + Object resp2; + // it 'rejects request to scenario which is not set up' + try + { + await client.SendAsync(new RecommendItemSegmentsToItem("entity_id", "entity_id", 5, scenario: "scenario1", cascadeCreate: true)); + Assert.True(false,"No exception thrown"); + } + catch (ResponseException ex) + { + Assert.Equal(400, (int)ex.StatusCode); + } + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToUserBatchUnitTest.cs b/Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToUserBatchUnitTest.cs new file mode 100644 index 0000000..3bc6631 --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToUserBatchUnitTest.cs @@ -0,0 +1,42 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class RecommendItemSegmentsToUserBatchUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestRecommendItemSegmentsToUser() + { + Object resp2; + Request[] requests = new Request[] { + new RecommendItemSegmentsToUser("entity_id", 5, scenario: "scenario1", cascadeCreate: true) + }; + + BatchResponse batchResponse = client.Send(new Batch(requests)); + Assert.Equal(400, (int)batchResponse.StatusCodes.ElementAt(0)); + } + + [Fact] + public async void TestRecommendItemSegmentsToUserAsync() + { + Object resp2; + Request[] requests = new Request[] { + new RecommendItemSegmentsToUser("entity_id", 5, scenario: "scenario1", cascadeCreate: true) + }; + + BatchResponse batchResponse = await client.SendAsync(new Batch(requests)); + Assert.Equal(400, (int)batchResponse.StatusCodes.ElementAt(0)); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToUserUnitTest.cs b/Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToUserUnitTest.cs new file mode 100644 index 0000000..ec0476e --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/RecommendItemSegmentsToUserUnitTest.cs @@ -0,0 +1,54 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class RecommendItemSegmentsToUserUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestRecommendItemSegmentsToUser() + { + RecommendItemSegmentsToUser req; + RecommendationResponse resp; + Object resp2; + // it 'rejects request to scenario which is not set up' + try + { + client.Send(new RecommendItemSegmentsToUser("entity_id", 5, scenario: "scenario1", cascadeCreate: true)); + Assert.True(false,"No exception thrown"); + } + catch (ResponseException ex) + { + Assert.Equal(400, (int)ex.StatusCode); + } + } + + [Fact] + public async void TestRecommendItemSegmentsToUserAsync() + { + RecommendItemSegmentsToUser req; + RecommendationResponse resp; + Object resp2; + // it 'rejects request to scenario which is not set up' + try + { + await client.SendAsync(new RecommendItemSegmentsToUser("entity_id", 5, scenario: "scenario1", cascadeCreate: true)); + Assert.True(false,"No exception thrown"); + } + catch (ResponseException ex) + { + Assert.Equal(400, (int)ex.StatusCode); + } + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/SearchItemSegmentsBatchUnitTest.cs b/Src/Recombee.ApiClient.Tests/SearchItemSegmentsBatchUnitTest.cs new file mode 100644 index 0000000..a7ecdd7 --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/SearchItemSegmentsBatchUnitTest.cs @@ -0,0 +1,42 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class SearchItemSegmentsBatchUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestSearchItemSegments() + { + Object resp2; + Request[] requests = new Request[] { + new SearchItemSegments("entity_id", "query", 5, scenario: "scenario1", cascadeCreate: true) + }; + + BatchResponse batchResponse = client.Send(new Batch(requests)); + Assert.Equal(400, (int)batchResponse.StatusCodes.ElementAt(0)); + } + + [Fact] + public async void TestSearchItemSegmentsAsync() + { + Object resp2; + Request[] requests = new Request[] { + new SearchItemSegments("entity_id", "query", 5, scenario: "scenario1", cascadeCreate: true) + }; + + BatchResponse batchResponse = await client.SendAsync(new Batch(requests)); + Assert.Equal(400, (int)batchResponse.StatusCodes.ElementAt(0)); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/SearchItemSegmentsUnitTest.cs b/Src/Recombee.ApiClient.Tests/SearchItemSegmentsUnitTest.cs new file mode 100644 index 0000000..55ed294 --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/SearchItemSegmentsUnitTest.cs @@ -0,0 +1,54 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class SearchItemSegmentsUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestSearchItemSegments() + { + SearchItemSegments req; + SearchResponse resp; + Object resp2; + // it 'rejects request to scenario which is not set up' + try + { + client.Send(new SearchItemSegments("entity_id", "query", 5, scenario: "scenario1", cascadeCreate: true)); + Assert.True(false,"No exception thrown"); + } + catch (ResponseException ex) + { + Assert.Equal(400, (int)ex.StatusCode); + } + } + + [Fact] + public async void TestSearchItemSegmentsAsync() + { + SearchItemSegments req; + SearchResponse resp; + Object resp2; + // it 'rejects request to scenario which is not set up' + try + { + await client.SendAsync(new SearchItemSegments("entity_id", "query", 5, scenario: "scenario1", cascadeCreate: true)); + Assert.True(false,"No exception thrown"); + } + catch (ResponseException ex) + { + Assert.Equal(400, (int)ex.StatusCode); + } + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/UpdateAutoReqlSegmentationBatchUnitTest.cs b/Src/Recombee.ApiClient.Tests/UpdateAutoReqlSegmentationBatchUnitTest.cs new file mode 100644 index 0000000..fdcba90 --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/UpdateAutoReqlSegmentationBatchUnitTest.cs @@ -0,0 +1,46 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class UpdateAutoReqlSegmentationBatchUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestUpdateAutoReqlSegmentation() + { + Object resp2; + resp2 = client.Send(new CreateAutoReqlSegmentation("seg1", "items", "{'str_property'}", title: "Test Segmentation", description: "For test purposes")); + + Request[] requests = new Request[] { + new UpdateAutoReqlSegmentation("seg1", title: "New title", expression: "{'str_property' + 'str_property'}", description: "Updated") + }; + + BatchResponse batchResponse = client.Send(new Batch(requests)); + Assert.Equal(200, (int)batchResponse.StatusCodes.ElementAt(0)); + } + + [Fact] + public async void TestUpdateAutoReqlSegmentationAsync() + { + Object resp2; + resp2 = await client.SendAsync(new CreateAutoReqlSegmentation("seg1", "items", "{'str_property'}", title: "Test Segmentation", description: "For test purposes")); + + Request[] requests = new Request[] { + new UpdateAutoReqlSegmentation("seg1", title: "New title", expression: "{'str_property' + 'str_property'}", description: "Updated") + }; + + BatchResponse batchResponse = await client.SendAsync(new Batch(requests)); + Assert.Equal(200, (int)batchResponse.StatusCodes.ElementAt(0)); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/UpdateAutoReqlSegmentationUnitTest.cs b/Src/Recombee.ApiClient.Tests/UpdateAutoReqlSegmentationUnitTest.cs new file mode 100644 index 0000000..3186d55 --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/UpdateAutoReqlSegmentationUnitTest.cs @@ -0,0 +1,40 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class UpdateAutoReqlSegmentationUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestUpdateAutoReqlSegmentation() + { + UpdateAutoReqlSegmentation req; + RecombeeBinding resp; + Object resp2; + // it 'updates auto ReQL segmentation' + resp2 = client.Send(new CreateAutoReqlSegmentation("seg1", "items", "{'str_property'}", title: "Test Segmentation", description: "For test purposes")); + resp = client.Send(new UpdateAutoReqlSegmentation("seg1", title: "New title", expression: "{'str_property' + 'str_property'}", description: "Updated")); + } + + [Fact] + public async void TestUpdateAutoReqlSegmentationAsync() + { + UpdateAutoReqlSegmentation req; + RecombeeBinding resp; + Object resp2; + // it 'updates auto ReQL segmentation' + resp2 = await client.SendAsync(new CreateAutoReqlSegmentation("seg1", "items", "{'str_property'}", title: "Test Segmentation", description: "For test purposes")); + resp = await client.SendAsync(new UpdateAutoReqlSegmentation("seg1", title: "New title", expression: "{'str_property' + 'str_property'}", description: "Updated")); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/UpdateManualReqlSegmentBatchUnitTest.cs b/Src/Recombee.ApiClient.Tests/UpdateManualReqlSegmentBatchUnitTest.cs new file mode 100644 index 0000000..9dbd402 --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/UpdateManualReqlSegmentBatchUnitTest.cs @@ -0,0 +1,50 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class UpdateManualReqlSegmentBatchUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestUpdateManualReqlSegment() + { + Object resp2; + resp2 = client.Send(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); + + resp2 = client.Send(new AddManualReqlSegment("seg1", "first-segment", "'str_property' != null", title: "First Segment")); + + Request[] requests = new Request[] { + new UpdateManualReqlSegment("seg1", "first-segment", "'str_property' == null", title: "Updated Segment") + }; + + BatchResponse batchResponse = client.Send(new Batch(requests)); + Assert.Equal(200, (int)batchResponse.StatusCodes.ElementAt(0)); + } + + [Fact] + public async void TestUpdateManualReqlSegmentAsync() + { + Object resp2; + resp2 = await client.SendAsync(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); + + resp2 = await client.SendAsync(new AddManualReqlSegment("seg1", "first-segment", "'str_property' != null", title: "First Segment")); + + Request[] requests = new Request[] { + new UpdateManualReqlSegment("seg1", "first-segment", "'str_property' == null", title: "Updated Segment") + }; + + BatchResponse batchResponse = await client.SendAsync(new Batch(requests)); + Assert.Equal(200, (int)batchResponse.StatusCodes.ElementAt(0)); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/UpdateManualReqlSegmentUnitTest.cs b/Src/Recombee.ApiClient.Tests/UpdateManualReqlSegmentUnitTest.cs new file mode 100644 index 0000000..29844f1 --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/UpdateManualReqlSegmentUnitTest.cs @@ -0,0 +1,42 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class UpdateManualReqlSegmentUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestUpdateManualReqlSegment() + { + UpdateManualReqlSegment req; + RecombeeBinding resp; + Object resp2; + // it 'updates manual ReQL segment' + resp2 = client.Send(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); + resp2 = client.Send(new AddManualReqlSegment("seg1", "first-segment", "'str_property' != null", title: "First Segment")); + resp = client.Send(new UpdateManualReqlSegment("seg1", "first-segment", "'str_property' == null", title: "Updated Segment")); + } + + [Fact] + public async void TestUpdateManualReqlSegmentAsync() + { + UpdateManualReqlSegment req; + RecombeeBinding resp; + Object resp2; + // it 'updates manual ReQL segment' + resp2 = await client.SendAsync(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); + resp2 = await client.SendAsync(new AddManualReqlSegment("seg1", "first-segment", "'str_property' != null", title: "First Segment")); + resp = await client.SendAsync(new UpdateManualReqlSegment("seg1", "first-segment", "'str_property' == null", title: "Updated Segment")); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/UpdateManualReqlSegmentationBatchUnitTest.cs b/Src/Recombee.ApiClient.Tests/UpdateManualReqlSegmentationBatchUnitTest.cs new file mode 100644 index 0000000..3b2e26c --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/UpdateManualReqlSegmentationBatchUnitTest.cs @@ -0,0 +1,46 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class UpdateManualReqlSegmentationBatchUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestUpdateManualReqlSegmentation() + { + Object resp2; + resp2 = client.Send(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); + + Request[] requests = new Request[] { + new UpdateManualReqlSegmentation("seg1", title: "New title", description: "Updated") + }; + + BatchResponse batchResponse = client.Send(new Batch(requests)); + Assert.Equal(200, (int)batchResponse.StatusCodes.ElementAt(0)); + } + + [Fact] + public async void TestUpdateManualReqlSegmentationAsync() + { + Object resp2; + resp2 = await client.SendAsync(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); + + Request[] requests = new Request[] { + new UpdateManualReqlSegmentation("seg1", title: "New title", description: "Updated") + }; + + BatchResponse batchResponse = await client.SendAsync(new Batch(requests)); + Assert.Equal(200, (int)batchResponse.StatusCodes.ElementAt(0)); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/UpdateManualReqlSegmentationUnitTest.cs b/Src/Recombee.ApiClient.Tests/UpdateManualReqlSegmentationUnitTest.cs new file mode 100644 index 0000000..3493cc9 --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/UpdateManualReqlSegmentationUnitTest.cs @@ -0,0 +1,40 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class UpdateManualReqlSegmentationUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestUpdateManualReqlSegmentation() + { + UpdateManualReqlSegmentation req; + RecombeeBinding resp; + Object resp2; + // it 'updates manual ReQL segmentation' + resp2 = client.Send(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); + resp = client.Send(new UpdateManualReqlSegmentation("seg1", title: "New title", description: "Updated")); + } + + [Fact] + public async void TestUpdateManualReqlSegmentationAsync() + { + UpdateManualReqlSegmentation req; + RecombeeBinding resp; + Object resp2; + // it 'updates manual ReQL segmentation' + resp2 = await client.SendAsync(new CreateManualReqlSegmentation("seg1", "items", title: "Test Segmentation", description: "For test purposes")); + resp = await client.SendAsync(new UpdateManualReqlSegmentation("seg1", title: "New title", description: "Updated")); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/UpdatePropertyBasedSegmentationBatchUnitTest.cs b/Src/Recombee.ApiClient.Tests/UpdatePropertyBasedSegmentationBatchUnitTest.cs new file mode 100644 index 0000000..b65b95e --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/UpdatePropertyBasedSegmentationBatchUnitTest.cs @@ -0,0 +1,46 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class UpdatePropertyBasedSegmentationBatchUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestUpdatePropertyBasedSegmentation() + { + Object resp2; + resp2 = client.Send(new CreatePropertyBasedSegmentation("seg1", "items", "str_property")); + + Request[] requests = new Request[] { + new UpdatePropertyBasedSegmentation("seg1", title: "New title", propertyName: "str_property", description: "Updated") + }; + + BatchResponse batchResponse = client.Send(new Batch(requests)); + Assert.Equal(200, (int)batchResponse.StatusCodes.ElementAt(0)); + } + + [Fact] + public async void TestUpdatePropertyBasedSegmentationAsync() + { + Object resp2; + resp2 = await client.SendAsync(new CreatePropertyBasedSegmentation("seg1", "items", "str_property")); + + Request[] requests = new Request[] { + new UpdatePropertyBasedSegmentation("seg1", title: "New title", propertyName: "str_property", description: "Updated") + }; + + BatchResponse batchResponse = await client.SendAsync(new Batch(requests)); + Assert.Equal(200, (int)batchResponse.StatusCodes.ElementAt(0)); + } + } +} diff --git a/Src/Recombee.ApiClient.Tests/UpdatePropertyBasedSegmentationUnitTest.cs b/Src/Recombee.ApiClient.Tests/UpdatePropertyBasedSegmentationUnitTest.cs new file mode 100644 index 0000000..8dfd1e1 --- /dev/null +++ b/Src/Recombee.ApiClient.Tests/UpdatePropertyBasedSegmentationUnitTest.cs @@ -0,0 +1,40 @@ +/* + This file is auto-generated, do not edit +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Recombee.ApiClient.ApiRequests; +using Recombee.ApiClient.Bindings; + +namespace Recombee.ApiClient.Tests +{ + public class UpdatePropertyBasedSegmentationUnitTest: RecombeeUnitTest + { + + [Fact] + public void TestUpdatePropertyBasedSegmentation() + { + UpdatePropertyBasedSegmentation req; + RecombeeBinding resp; + Object resp2; + // it 'updates property based segmentation' + resp2 = client.Send(new CreatePropertyBasedSegmentation("seg1", "items", "str_property")); + resp = client.Send(new UpdatePropertyBasedSegmentation("seg1", title: "New title", propertyName: "str_property", description: "Updated")); + } + + [Fact] + public async void TestUpdatePropertyBasedSegmentationAsync() + { + UpdatePropertyBasedSegmentation req; + RecombeeBinding resp; + Object resp2; + // it 'updates property based segmentation' + resp2 = await client.SendAsync(new CreatePropertyBasedSegmentation("seg1", "items", "str_property")); + resp = await client.SendAsync(new UpdatePropertyBasedSegmentation("seg1", title: "New title", propertyName: "str_property", description: "Updated")); + } + } +} diff --git a/Src/Recombee.ApiClient/ApiRequests/AddBookmark.cs b/Src/Recombee.ApiClient/ApiRequests/AddBookmark.cs index 8751d3b..d587d46 100644 --- a/Src/Recombee.ApiClient/ApiRequests/AddBookmark.cs +++ b/Src/Recombee.ApiClient/ApiRequests/AddBookmark.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// Add bookmark - /// Adds a bookmark of a given item made by a given user. + /// Add Bookmark + /// Adds a bookmark of the given item made by the given user. /// public class AddBookmark : Request { diff --git a/Src/Recombee.ApiClient/ApiRequests/AddCartAddition.cs b/Src/Recombee.ApiClient/ApiRequests/AddCartAddition.cs index 87127d9..cdb639b 100644 --- a/Src/Recombee.ApiClient/ApiRequests/AddCartAddition.cs +++ b/Src/Recombee.ApiClient/ApiRequests/AddCartAddition.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// Add cart addition - /// Adds a cart addition of a given item made by a given user. + /// Add Cart Addition + /// Adds a cart addition of the given item made by the given user. /// public class AddCartAddition : Request { @@ -41,13 +41,13 @@ public bool? CascadeCreate get {return cascadeCreate;} } private readonly double? amount; - /// Amount (number) added to cart. The default is 1. For example if `user-x` adds two `item-y` during a single order (session...), the `amount` should equal to 2. + /// Amount (number) added to cart. The default is 1. For example, if `user-x` adds two `item-y` during a single order (session...), the `amount` should equal 2. public double? Amount { get {return amount;} } private readonly double? price; - /// Price of the added item. If `amount` is greater than 1, sum of prices of all the items should be given. + /// Price of the added item. If `amount` is greater than 1, the sum of prices of all the items should be given. public double? Price { get {return price;} @@ -70,8 +70,8 @@ public Dictionary AdditionalData /// Item added to the cart /// UTC timestamp of the cart addition as ISO8601-1 pattern or UTC epoch time. The default value is the current time. /// Sets whether the given user/item should be created if not present in the database. - /// Amount (number) added to cart. The default is 1. For example if `user-x` adds two `item-y` during a single order (session...), the `amount` should equal to 2. - /// Price of the added item. If `amount` is greater than 1, sum of prices of all the items should be given. + /// Amount (number) added to cart. The default is 1. For example, if `user-x` adds two `item-y` during a single order (session...), the `amount` should equal 2. + /// Price of the added item. If `amount` is greater than 1, the sum of prices of all the items should be given. /// If this cart addition is based on a recommendation request, `recommId` is the id of the clicked recommendation. /// A dictionary of additional data for the interaction. public AddCartAddition (string userId, string itemId, DateTime? timestamp = null, bool? cascadeCreate = null, double? amount = null, double? price = null, string recommId = null, Dictionary additionalData = null): base(HttpMethod.Post, 1000) diff --git a/Src/Recombee.ApiClient/ApiRequests/AddDetailView.cs b/Src/Recombee.ApiClient/ApiRequests/AddDetailView.cs index 2e94168..17bc722 100644 --- a/Src/Recombee.ApiClient/ApiRequests/AddDetailView.cs +++ b/Src/Recombee.ApiClient/ApiRequests/AddDetailView.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// Add detail view - /// Adds a detail view of a given item made by a given user. + /// Add Detail View + /// Adds a detail view of the given item made by the given user. /// public class AddDetailView : Request { diff --git a/Src/Recombee.ApiClient/ApiRequests/AddGroup.cs b/Src/Recombee.ApiClient/ApiRequests/AddGroup.cs index e8eeecb..47786a9 100644 --- a/Src/Recombee.ApiClient/ApiRequests/AddGroup.cs +++ b/Src/Recombee.ApiClient/ApiRequests/AddGroup.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// Add group - /// Creates new group in the database. + /// Add Group + /// Creates a new group in the database. public class AddGroup : Request { private readonly string groupId; diff --git a/Src/Recombee.ApiClient/ApiRequests/AddItem.cs b/Src/Recombee.ApiClient/ApiRequests/AddItem.cs index fdf952a..67f3b12 100644 --- a/Src/Recombee.ApiClient/ApiRequests/AddItem.cs +++ b/Src/Recombee.ApiClient/ApiRequests/AddItem.cs @@ -11,9 +11,9 @@ namespace Recombee.ApiClient.ApiRequests { - /// Add item - /// Adds new item of given `itemId` to the items catalog. - /// All the item properties for the newly created items are set null. + /// Add Item + /// Adds new item of the given `itemId` to the items catalog. + /// All the item properties for the newly created items are set to null. /// public class AddItem : Request { diff --git a/Src/Recombee.ApiClient/ApiRequests/AddItemProperty.cs b/Src/Recombee.ApiClient/ApiRequests/AddItemProperty.cs index caca049..7206fe7 100644 --- a/Src/Recombee.ApiClient/ApiRequests/AddItemProperty.cs +++ b/Src/Recombee.ApiClient/ApiRequests/AddItemProperty.cs @@ -11,13 +11,13 @@ namespace Recombee.ApiClient.ApiRequests { - /// Add item property + /// Add Item Property /// Adding an item property is somehow equivalent to adding a column to the table of items. The items may be characterized by various properties of different types. /// public class AddItemProperty : Request { private readonly string propertyName; - /// Name of the item property to be created. Currently, the following names are reserved:`id`, `itemid`, case insensitively. Also, the length of the property name must not exceed 63 characters. + /// Name of the item property to be created. Currently, the following names are reserved: `id`, `itemid`, case-insensitively. Also, the length of the property name must not exceed 63 characters. /// public string PropertyName { @@ -40,7 +40,7 @@ public string Type } /// Construct the request - /// Name of the item property to be created. Currently, the following names are reserved:`id`, `itemid`, case insensitively. Also, the length of the property name must not exceed 63 characters. + /// Name of the item property to be created. Currently, the following names are reserved: `id`, `itemid`, case-insensitively. Also, the length of the property name must not exceed 63 characters. /// /// Value type of the item property to be created. One of: `int`, `double`, `string`, `boolean`, `timestamp`, `set`, `image` or `imageList`. /// * `int`- Signed integer number. diff --git a/Src/Recombee.ApiClient/ApiRequests/AddManualReqlSegment.cs b/Src/Recombee.ApiClient/ApiRequests/AddManualReqlSegment.cs new file mode 100644 index 0000000..2178738 --- /dev/null +++ b/Src/Recombee.ApiClient/ApiRequests/AddManualReqlSegment.cs @@ -0,0 +1,93 @@ +/* + This file is auto-generated, do not edit +*/ + +using System; +using System.Collections.Generic; +using System.Net.Http; +using Recombee.ApiClient.Bindings; +using Recombee.ApiClient.Util; + + +namespace Recombee.ApiClient.ApiRequests +{ + /// Add Manual ReQL Segment + /// Adds a new Segment into a Manual ReQL Segmentation. + /// The new Segment is defined by a [ReQL](https://docs.recombee.com/reql.html) filter that returns `true` for an item in case that this item belongs to the segment. + /// + public class AddManualReqlSegment : Request + { + private readonly string segmentationId; + /// ID of the Segmentation to which the new Segment should be added + public string SegmentationId + { + get {return segmentationId;} + } + private readonly string segmentId; + /// ID of the newly created Segment + public string SegmentId + { + get {return segmentId;} + } + private readonly string filter; + /// ReQL filter that returns `true` for items that belong to this Segment. Otherwise returns `false`. + /// + public string Filter + { + get {return filter;} + } + private readonly string title; + /// Human-readable name of the Segment that is shown in the Recombee Admin UI. + /// + public string Title + { + get {return title;} + } + + /// Construct the request + /// ID of the Segmentation to which the new Segment should be added + /// ID of the newly created Segment + /// ReQL filter that returns `true` for items that belong to this Segment. Otherwise returns `false`. + /// + /// Human-readable name of the Segment that is shown in the Recombee Admin UI. + /// + public AddManualReqlSegment (string segmentationId, string segmentId, string filter, string title = null): base(HttpMethod.Put, 10000) + { + this.segmentationId = segmentationId; + this.segmentId = segmentId; + this.filter = filter; + this.title = title; + } + + /// URI to the endpoint including path parameters + public override string Path() + { + return string.Format("/segmentations/manual-reql/{0}/segments/{1}", SegmentationId, SegmentId); + } + + /// Get query parameters + /// Dictionary containing values of query parameters (name of parameter: value of the parameter) + public override Dictionary QueryParameters() + { + var parameters = new Dictionary() + { + + }; + return parameters; + } + + /// Get body parameters + /// Dictionary containing values of body parameters (name of parameter: value of the parameter) + public override Dictionary BodyParameters() + { + var parameters = new Dictionary() + { + {"filter", this.Filter} + }; + if (this.Title != null) + parameters["title"] = this.Title; + return parameters; + } + + } +} diff --git a/Src/Recombee.ApiClient/ApiRequests/AddPurchase.cs b/Src/Recombee.ApiClient/ApiRequests/AddPurchase.cs index cfa3021..fd8a210 100644 --- a/Src/Recombee.ApiClient/ApiRequests/AddPurchase.cs +++ b/Src/Recombee.ApiClient/ApiRequests/AddPurchase.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// Add purchase - /// Adds a purchase of a given item made by a given user. + /// Add Purchase + /// Adds a purchase of the given item made by the given user. /// public class AddPurchase : Request { @@ -41,19 +41,19 @@ public bool? CascadeCreate get {return cascadeCreate;} } private readonly double? amount; - /// Amount (number) of purchased items. The default is 1. For example if `user-x` purchases two `item-y` during a single order (session...), the `amount` should equal to 2. + /// Amount (number) of purchased items. The default is 1. For example, if `user-x` purchases two `item-y` during a single order (session...), the `amount` should equal 2. public double? Amount { get {return amount;} } private readonly double? price; - /// Price paid by the user for the item. If `amount` is greater than 1, sum of prices of all the items should be given. + /// Price paid by the user for the item. If `amount` is greater than 1, the sum of prices of all the items should be given. public double? Price { get {return price;} } private readonly double? profit; - /// Your profit from the purchased item. The profit is natural in e-commerce domain (for example if `user-x` purchases `item-y` for $100 and the gross margin is 30 %, then the profit is $30), but is applicable also in other domains (for example at a news company it may be income from displayed advertisement on article page). If `amount` is greater than 1, sum of profit of all the items should be given. + /// Your profit from the purchased item. The profit is natural in the e-commerce domain (for example, if `user-x` purchases `item-y` for $100 and the gross margin is 30 %, then the profit is $30) but is also applicable in other domains (for example, at a news company it may be income from a displayed advertisement on article page). If `amount` is greater than 1, the sum of profit of all the items should be given. public double? Profit { get {return profit;} @@ -76,9 +76,9 @@ public Dictionary AdditionalData /// Purchased item /// UTC timestamp of the purchase as ISO8601-1 pattern or UTC epoch time. The default value is the current time. /// Sets whether the given user/item should be created if not present in the database. - /// Amount (number) of purchased items. The default is 1. For example if `user-x` purchases two `item-y` during a single order (session...), the `amount` should equal to 2. - /// Price paid by the user for the item. If `amount` is greater than 1, sum of prices of all the items should be given. - /// Your profit from the purchased item. The profit is natural in e-commerce domain (for example if `user-x` purchases `item-y` for $100 and the gross margin is 30 %, then the profit is $30), but is applicable also in other domains (for example at a news company it may be income from displayed advertisement on article page). If `amount` is greater than 1, sum of profit of all the items should be given. + /// Amount (number) of purchased items. The default is 1. For example, if `user-x` purchases two `item-y` during a single order (session...), the `amount` should equal 2. + /// Price paid by the user for the item. If `amount` is greater than 1, the sum of prices of all the items should be given. + /// Your profit from the purchased item. The profit is natural in the e-commerce domain (for example, if `user-x` purchases `item-y` for $100 and the gross margin is 30 %, then the profit is $30) but is also applicable in other domains (for example, at a news company it may be income from a displayed advertisement on article page). If `amount` is greater than 1, the sum of profit of all the items should be given. /// If this purchase is based on a recommendation request, `recommId` is the id of the clicked recommendation. /// A dictionary of additional data for the interaction. public AddPurchase (string userId, string itemId, DateTime? timestamp = null, bool? cascadeCreate = null, double? amount = null, double? price = null, double? profit = null, string recommId = null, Dictionary additionalData = null): base(HttpMethod.Post, 1000) diff --git a/Src/Recombee.ApiClient/ApiRequests/AddRating.cs b/Src/Recombee.ApiClient/ApiRequests/AddRating.cs index 57222d3..a808225 100644 --- a/Src/Recombee.ApiClient/ApiRequests/AddRating.cs +++ b/Src/Recombee.ApiClient/ApiRequests/AddRating.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// Add rating - /// Adds a rating of given item made by a given user. + /// Add Rating + /// Adds a rating of the given item made by the given user. /// public class AddRating : Request { diff --git a/Src/Recombee.ApiClient/ApiRequests/AddSearchSynonym.cs b/Src/Recombee.ApiClient/ApiRequests/AddSearchSynonym.cs index a9aa513..15f0e10 100644 --- a/Src/Recombee.ApiClient/ApiRequests/AddSearchSynonym.cs +++ b/Src/Recombee.ApiClient/ApiRequests/AddSearchSynonym.cs @@ -11,7 +11,7 @@ namespace Recombee.ApiClient.ApiRequests { - /// Add search synonym + /// Add Search Synonym /// Adds a new synonym for the [Search items](https://docs.recombee.com/api.html#search-items). /// When the `term` is used in the search query, the `synonym` is also used for the full-text search. /// Unless `oneWay=true`, it works also in the opposite way (`synonym` -> `term`). diff --git a/Src/Recombee.ApiClient/ApiRequests/AddSeries.cs b/Src/Recombee.ApiClient/ApiRequests/AddSeries.cs index 8d46d46..c3b3e43 100644 --- a/Src/Recombee.ApiClient/ApiRequests/AddSeries.cs +++ b/Src/Recombee.ApiClient/ApiRequests/AddSeries.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// Add series - /// Creates new series in the database. + /// Add Series + /// Creates a new series in the database. public class AddSeries : Request { private readonly string seriesId; diff --git a/Src/Recombee.ApiClient/ApiRequests/AddUser.cs b/Src/Recombee.ApiClient/ApiRequests/AddUser.cs index 9dcf7c0..be48bea 100644 --- a/Src/Recombee.ApiClient/ApiRequests/AddUser.cs +++ b/Src/Recombee.ApiClient/ApiRequests/AddUser.cs @@ -11,7 +11,7 @@ namespace Recombee.ApiClient.ApiRequests { - /// Add user + /// Add User /// Adds a new user to the database. /// public class AddUser : Request diff --git a/Src/Recombee.ApiClient/ApiRequests/AddUserProperty.cs b/Src/Recombee.ApiClient/ApiRequests/AddUserProperty.cs index 95d37ec..a1e7a56 100644 --- a/Src/Recombee.ApiClient/ApiRequests/AddUserProperty.cs +++ b/Src/Recombee.ApiClient/ApiRequests/AddUserProperty.cs @@ -11,13 +11,13 @@ namespace Recombee.ApiClient.ApiRequests { - /// Add user property - /// Adding an user property is somehow equivalent to adding a column to the table of users. The users may be characterized by various properties of different types. + /// Add User Property + /// Adding a user property is somehow equivalent to adding a column to the table of users. The users may be characterized by various properties of different types. /// public class AddUserProperty : Request { private readonly string propertyName; - /// Name of the user property to be created. Currently, the following names are reserved:`id`, `userid`, case insensitively. Also, the length of the property name must not exceed 63 characters. + /// Name of the user property to be created. Currently, the following names are reserved: `id`, `userid`, case-insensitively. Also, the length of the property name must not exceed 63 characters. /// public string PropertyName { @@ -38,7 +38,7 @@ public string Type } /// Construct the request - /// Name of the user property to be created. Currently, the following names are reserved:`id`, `userid`, case insensitively. Also, the length of the property name must not exceed 63 characters. + /// Name of the user property to be created. Currently, the following names are reserved: `id`, `userid`, case-insensitively. Also, the length of the property name must not exceed 63 characters. /// /// Value type of the user property to be created. One of: `int`, `double`, `string`, `boolean`, `timestamp`, `set`. /// * `int` - Signed integer number. diff --git a/Src/Recombee.ApiClient/ApiRequests/CreateAutoReqlSegmentation.cs b/Src/Recombee.ApiClient/ApiRequests/CreateAutoReqlSegmentation.cs new file mode 100644 index 0000000..b19b84e --- /dev/null +++ b/Src/Recombee.ApiClient/ApiRequests/CreateAutoReqlSegmentation.cs @@ -0,0 +1,108 @@ +/* + This file is auto-generated, do not edit +*/ + +using System; +using System.Collections.Generic; +using System.Net.Http; +using Recombee.ApiClient.Bindings; +using Recombee.ApiClient.Util; + + +namespace Recombee.ApiClient.ApiRequests +{ + /// Create Auto ReQL Segmentation + /// Segment the items using a [ReQL](https://docs.recombee.com/reql.html) expression. + /// For each item, the expression should return a set that contains IDs of segments to which the item belongs to. + /// + public class CreateAutoReqlSegmentation : Request + { + private readonly string segmentationId; + /// ID of the newly created Segmentation + public string SegmentationId + { + get {return segmentationId;} + } + private readonly string sourceType; + /// What type of data should be segmented. Currently only `items` are supported. + /// + public string SourceType + { + get {return sourceType;} + } + private readonly string expression; + /// ReQL expression that returns for each item a set with IDs of segments to which the item belongs + /// + public string Expression + { + get {return expression;} + } + private readonly string title; + /// Human-readable name that is shown in the Recombee Admin UI. + /// + public string Title + { + get {return title;} + } + private readonly string description; + /// Description that is shown in the Recombee Admin UI. + /// + public string Description + { + get {return description;} + } + + /// Construct the request + /// ID of the newly created Segmentation + /// What type of data should be segmented. Currently only `items` are supported. + /// + /// ReQL expression that returns for each item a set with IDs of segments to which the item belongs + /// + /// Human-readable name that is shown in the Recombee Admin UI. + /// + /// Description that is shown in the Recombee Admin UI. + /// + public CreateAutoReqlSegmentation (string segmentationId, string sourceType, string expression, string title = null, string description = null): base(HttpMethod.Put, 10000) + { + this.segmentationId = segmentationId; + this.sourceType = sourceType; + this.expression = expression; + this.title = title; + this.description = description; + } + + /// URI to the endpoint including path parameters + public override string Path() + { + return string.Format("/segmentations/auto-reql/{0}", SegmentationId); + } + + /// Get query parameters + /// Dictionary containing values of query parameters (name of parameter: value of the parameter) + public override Dictionary QueryParameters() + { + var parameters = new Dictionary() + { + + }; + return parameters; + } + + /// Get body parameters + /// Dictionary containing values of body parameters (name of parameter: value of the parameter) + public override Dictionary BodyParameters() + { + var parameters = new Dictionary() + { + {"sourceType", this.SourceType}, + {"expression", this.Expression} + }; + if (this.Title != null) + parameters["title"] = this.Title; + if (this.Description != null) + parameters["description"] = this.Description; + return parameters; + } + + } +} diff --git a/Src/Recombee.ApiClient/ApiRequests/CreateManualReqlSegmentation.cs b/Src/Recombee.ApiClient/ApiRequests/CreateManualReqlSegmentation.cs new file mode 100644 index 0000000..2b51310 --- /dev/null +++ b/Src/Recombee.ApiClient/ApiRequests/CreateManualReqlSegmentation.cs @@ -0,0 +1,97 @@ +/* + This file is auto-generated, do not edit +*/ + +using System; +using System.Collections.Generic; +using System.Net.Http; +using Recombee.ApiClient.Bindings; +using Recombee.ApiClient.Util; + + +namespace Recombee.ApiClient.ApiRequests +{ + /// Create Manual ReQL Segmentation + /// Segment the items using multiple [ReQL](https://docs.recombee.com/reql.html) filters. + /// Use the Add Manual ReQL Items Segment endpoint to create the individual segments. + /// + public class CreateManualReqlSegmentation : Request + { + private readonly string segmentationId; + /// ID of the newly created Segmentation + public string SegmentationId + { + get {return segmentationId;} + } + private readonly string sourceType; + /// What type of data should be segmented. Currently only `items` are supported. + /// + public string SourceType + { + get {return sourceType;} + } + private readonly string title; + /// Human-readable name that is shown in the Recombee Admin UI. + /// + public string Title + { + get {return title;} + } + private readonly string description; + /// Description that is shown in the Recombee Admin UI. + /// + public string Description + { + get {return description;} + } + + /// Construct the request + /// ID of the newly created Segmentation + /// What type of data should be segmented. Currently only `items` are supported. + /// + /// Human-readable name that is shown in the Recombee Admin UI. + /// + /// Description that is shown in the Recombee Admin UI. + /// + public CreateManualReqlSegmentation (string segmentationId, string sourceType, string title = null, string description = null): base(HttpMethod.Put, 10000) + { + this.segmentationId = segmentationId; + this.sourceType = sourceType; + this.title = title; + this.description = description; + } + + /// URI to the endpoint including path parameters + public override string Path() + { + return string.Format("/segmentations/manual-reql/{0}", SegmentationId); + } + + /// Get query parameters + /// Dictionary containing values of query parameters (name of parameter: value of the parameter) + public override Dictionary QueryParameters() + { + var parameters = new Dictionary() + { + + }; + return parameters; + } + + /// Get body parameters + /// Dictionary containing values of body parameters (name of parameter: value of the parameter) + public override Dictionary BodyParameters() + { + var parameters = new Dictionary() + { + {"sourceType", this.SourceType} + }; + if (this.Title != null) + parameters["title"] = this.Title; + if (this.Description != null) + parameters["description"] = this.Description; + return parameters; + } + + } +} diff --git a/Src/Recombee.ApiClient/ApiRequests/CreatePropertyBasedSegmentation.cs b/Src/Recombee.ApiClient/ApiRequests/CreatePropertyBasedSegmentation.cs new file mode 100644 index 0000000..99ca13a --- /dev/null +++ b/Src/Recombee.ApiClient/ApiRequests/CreatePropertyBasedSegmentation.cs @@ -0,0 +1,109 @@ +/* + This file is auto-generated, do not edit +*/ + +using System; +using System.Collections.Generic; +using System.Net.Http; +using Recombee.ApiClient.Bindings; +using Recombee.ApiClient.Util; + + +namespace Recombee.ApiClient.ApiRequests +{ + /// Create Property Based Segmentation + /// Creates a Segmentation that splits the items into segments based on values of a particular item property. + /// A segment is created for each unique value of the property. + /// In case of `set` properties, a segment is created for each value in the set. Item belongs to all these segments. + /// + public class CreatePropertyBasedSegmentation : Request + { + private readonly string segmentationId; + /// ID of the newly created Segmentation + public string SegmentationId + { + get {return segmentationId;} + } + private readonly string sourceType; + /// What type of data should be segmented. Currently only `items` are supported. + /// + public string SourceType + { + get {return sourceType;} + } + private readonly string propertyName; + /// Name of the property on which the Segmentation should be based + /// + public string PropertyName + { + get {return propertyName;} + } + private readonly string title; + /// Human-readable name that is shown in the Recombee Admin UI. + /// + public string Title + { + get {return title;} + } + private readonly string description; + /// Description that is shown in the Recombee Admin UI. + /// + public string Description + { + get {return description;} + } + + /// Construct the request + /// ID of the newly created Segmentation + /// What type of data should be segmented. Currently only `items` are supported. + /// + /// Name of the property on which the Segmentation should be based + /// + /// Human-readable name that is shown in the Recombee Admin UI. + /// + /// Description that is shown in the Recombee Admin UI. + /// + public CreatePropertyBasedSegmentation (string segmentationId, string sourceType, string propertyName, string title = null, string description = null): base(HttpMethod.Put, 10000) + { + this.segmentationId = segmentationId; + this.sourceType = sourceType; + this.propertyName = propertyName; + this.title = title; + this.description = description; + } + + /// URI to the endpoint including path parameters + public override string Path() + { + return string.Format("/segmentations/property-based/{0}", SegmentationId); + } + + /// Get query parameters + /// Dictionary containing values of query parameters (name of parameter: value of the parameter) + public override Dictionary QueryParameters() + { + var parameters = new Dictionary() + { + + }; + return parameters; + } + + /// Get body parameters + /// Dictionary containing values of body parameters (name of parameter: value of the parameter) + public override Dictionary BodyParameters() + { + var parameters = new Dictionary() + { + {"sourceType", this.SourceType}, + {"propertyName", this.PropertyName} + }; + if (this.Title != null) + parameters["title"] = this.Title; + if (this.Description != null) + parameters["description"] = this.Description; + return parameters; + } + + } +} diff --git a/Src/Recombee.ApiClient/ApiRequests/DeleteAllSearchSynonyms.cs b/Src/Recombee.ApiClient/ApiRequests/DeleteAllSearchSynonyms.cs index 51d43a6..e58f45b 100644 --- a/Src/Recombee.ApiClient/ApiRequests/DeleteAllSearchSynonyms.cs +++ b/Src/Recombee.ApiClient/ApiRequests/DeleteAllSearchSynonyms.cs @@ -11,7 +11,7 @@ namespace Recombee.ApiClient.ApiRequests { - /// Delete all search synonyms + /// Delete All Search Synonyms /// Deletes all synonyms defined in the database. /// public class DeleteAllSearchSynonyms : Request diff --git a/Src/Recombee.ApiClient/ApiRequests/DeleteBookmark.cs b/Src/Recombee.ApiClient/ApiRequests/DeleteBookmark.cs index 8f0da06..e0654d1 100644 --- a/Src/Recombee.ApiClient/ApiRequests/DeleteBookmark.cs +++ b/Src/Recombee.ApiClient/ApiRequests/DeleteBookmark.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// Delete bookmark - /// Deletes a bookmark uniquely specified by `userId`, `itemId`, and `timestamp` or all the bookmarks with given `userId` and `itemId` if `timestamp` is omitted. + /// Delete Bookmark + /// Deletes a bookmark uniquely specified by `userId`, `itemId`, and `timestamp` or all the bookmarks with the given `userId` and `itemId` if `timestamp` is omitted. /// public class DeleteBookmark : Request { @@ -23,13 +23,13 @@ public string UserId get {return userId;} } private readonly string itemId; - /// ID of the item of which was bookmarked. + /// ID of the item which was bookmarked. public string ItemId { get {return itemId;} } private readonly DateTime? timestamp; - /// Unix timestamp of the bookmark. If the `timestamp` is omitted, then all the bookmarks with given `userId` and `itemId` are deleted. + /// Unix timestamp of the bookmark. If the `timestamp` is omitted, then all the bookmarks with the given `userId` and `itemId` are deleted. public DateTime? Timestamp { get {return timestamp;} @@ -37,8 +37,8 @@ public DateTime? Timestamp /// Construct the request /// ID of the user who made the bookmark. - /// ID of the item of which was bookmarked. - /// Unix timestamp of the bookmark. If the `timestamp` is omitted, then all the bookmarks with given `userId` and `itemId` are deleted. + /// ID of the item which was bookmarked. + /// Unix timestamp of the bookmark. If the `timestamp` is omitted, then all the bookmarks with the given `userId` and `itemId` are deleted. public DeleteBookmark (string userId, string itemId, DateTime? timestamp = null): base(HttpMethod.Delete, 1000) { this.userId = userId; diff --git a/Src/Recombee.ApiClient/ApiRequests/DeleteCartAddition.cs b/Src/Recombee.ApiClient/ApiRequests/DeleteCartAddition.cs index 9d8a3f2..d3aa77a 100644 --- a/Src/Recombee.ApiClient/ApiRequests/DeleteCartAddition.cs +++ b/Src/Recombee.ApiClient/ApiRequests/DeleteCartAddition.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// Delete cart addition - /// Deletes an existing cart addition uniquely specified by `userId`, `itemId`, and `timestamp` or all the cart additions with given `userId` and `itemId` if `timestamp` is omitted. + /// Delete Cart Addition + /// Deletes an existing cart addition uniquely specified by `userId`, `itemId`, and `timestamp` or all the cart additions with the given `userId` and `itemId` if `timestamp` is omitted. /// public class DeleteCartAddition : Request { @@ -23,13 +23,13 @@ public string UserId get {return userId;} } private readonly string itemId; - /// ID of the item of which was added to cart. + /// ID of the item which was added to the cart. public string ItemId { get {return itemId;} } private readonly DateTime? timestamp; - /// Unix timestamp of the cart addition. If the `timestamp` is omitted, then all the cart additions with given `userId` and `itemId` are deleted. + /// Unix timestamp of the cart addition. If the `timestamp` is omitted, then all the cart additions with the given `userId` and `itemId` are deleted. public DateTime? Timestamp { get {return timestamp;} @@ -37,8 +37,8 @@ public DateTime? Timestamp /// Construct the request /// ID of the user who made the cart addition. - /// ID of the item of which was added to cart. - /// Unix timestamp of the cart addition. If the `timestamp` is omitted, then all the cart additions with given `userId` and `itemId` are deleted. + /// ID of the item which was added to the cart. + /// Unix timestamp of the cart addition. If the `timestamp` is omitted, then all the cart additions with the given `userId` and `itemId` are deleted. public DeleteCartAddition (string userId, string itemId, DateTime? timestamp = null): base(HttpMethod.Delete, 1000) { this.userId = userId; diff --git a/Src/Recombee.ApiClient/ApiRequests/DeleteDetailView.cs b/Src/Recombee.ApiClient/ApiRequests/DeleteDetailView.cs index 4458275..6a08636 100644 --- a/Src/Recombee.ApiClient/ApiRequests/DeleteDetailView.cs +++ b/Src/Recombee.ApiClient/ApiRequests/DeleteDetailView.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// Delete detail view - /// Deletes an existing detail view uniquely specified by (`userId`, `itemId`, and `timestamp`) or all the detail views with given `userId` and `itemId` if `timestamp` is omitted. + /// Delete Detail View + /// Deletes an existing detail view uniquely specified by (`userId`, `itemId`, and `timestamp`) or all the detail views with the given `userId` and `itemId` if `timestamp` is omitted. /// public class DeleteDetailView : Request { @@ -23,13 +23,13 @@ public string UserId get {return userId;} } private readonly string itemId; - /// ID of the item of which the details were viewed. + /// ID of the item whose details were viewed. public string ItemId { get {return itemId;} } private readonly DateTime? timestamp; - /// Unix timestamp of the detail view. If the `timestamp` is omitted, then all the detail views with given `userId` and `itemId` are deleted. + /// Unix timestamp of the detail view. If the `timestamp` is omitted, then all the detail views with the given `userId` and `itemId` are deleted. public DateTime? Timestamp { get {return timestamp;} @@ -37,8 +37,8 @@ public DateTime? Timestamp /// Construct the request /// ID of the user who made the detail view. - /// ID of the item of which the details were viewed. - /// Unix timestamp of the detail view. If the `timestamp` is omitted, then all the detail views with given `userId` and `itemId` are deleted. + /// ID of the item whose details were viewed. + /// Unix timestamp of the detail view. If the `timestamp` is omitted, then all the detail views with the given `userId` and `itemId` are deleted. public DeleteDetailView (string userId, string itemId, DateTime? timestamp = null): base(HttpMethod.Delete, 1000) { this.userId = userId; diff --git a/Src/Recombee.ApiClient/ApiRequests/DeleteGroup.cs b/Src/Recombee.ApiClient/ApiRequests/DeleteGroup.cs index 59bdc04..2b60aa6 100644 --- a/Src/Recombee.ApiClient/ApiRequests/DeleteGroup.cs +++ b/Src/Recombee.ApiClient/ApiRequests/DeleteGroup.cs @@ -11,9 +11,9 @@ namespace Recombee.ApiClient.ApiRequests { - /// Delete group - /// Deletes the group of given `groupId` from the database. - /// Deleting a group will only delete assignment of items to it, not the items themselves! + /// Delete Group + /// Deletes the group of the given `groupId` from the database. + /// Deleting a group will only delete the assignment of items to it, not the items themselves! /// public class DeleteGroup : Request { diff --git a/Src/Recombee.ApiClient/ApiRequests/DeleteItem.cs b/Src/Recombee.ApiClient/ApiRequests/DeleteItem.cs index c4c8ec5..f395403 100644 --- a/Src/Recombee.ApiClient/ApiRequests/DeleteItem.cs +++ b/Src/Recombee.ApiClient/ApiRequests/DeleteItem.cs @@ -11,9 +11,9 @@ namespace Recombee.ApiClient.ApiRequests { - /// Delete item - /// Deletes an item of given `itemId` from the catalog. - /// If there are any *purchases*, *ratings*, *bookmarks*, *cart additions* or *detail views* of the item present in the database, they will be deleted in cascade as well. Also, if the item is present in some *series*, it will be removed from all the *series* where present. + /// Delete Item + /// Deletes an item of the given `itemId` from the catalog. + /// If there are any *purchases*, *ratings*, *bookmarks*, *cart additions*, or *detail views* of the item present in the database, they will be deleted in cascade as well. Also, if the item is present in some *series*, it will be removed from all the *series* where present. /// If an item becomes obsolete/no longer available, it is meaningful to keep it in the catalog (along with all the interaction data, which are very useful), and **only exclude the item from recommendations**. In such a case, use [ReQL filter](https://docs.recombee.com/reql.html) instead of deleting the item completely. /// public class DeleteItem : Request diff --git a/Src/Recombee.ApiClient/ApiRequests/DeleteItemProperty.cs b/Src/Recombee.ApiClient/ApiRequests/DeleteItemProperty.cs index e2d718d..5bac3ae 100644 --- a/Src/Recombee.ApiClient/ApiRequests/DeleteItemProperty.cs +++ b/Src/Recombee.ApiClient/ApiRequests/DeleteItemProperty.cs @@ -11,7 +11,7 @@ namespace Recombee.ApiClient.ApiRequests { - /// Delete item property + /// Delete Item Property /// Deleting an item property is roughly equivalent to removing a column from the table of items. /// public class DeleteItemProperty : Request diff --git a/Src/Recombee.ApiClient/ApiRequests/DeleteManualReqlSegment.cs b/Src/Recombee.ApiClient/ApiRequests/DeleteManualReqlSegment.cs new file mode 100644 index 0000000..7d598de --- /dev/null +++ b/Src/Recombee.ApiClient/ApiRequests/DeleteManualReqlSegment.cs @@ -0,0 +1,70 @@ +/* + This file is auto-generated, do not edit +*/ + +using System; +using System.Collections.Generic; +using System.Net.Http; +using Recombee.ApiClient.Bindings; +using Recombee.ApiClient.Util; + + +namespace Recombee.ApiClient.ApiRequests +{ + /// Delete Manual ReQL Segment + /// Delete a Segment from a Manual ReQL Segmentation. + /// + public class DeleteManualReqlSegment : Request + { + private readonly string segmentationId; + /// ID of the Segmentation from which the Segment should be deleted + public string SegmentationId + { + get {return segmentationId;} + } + private readonly string segmentId; + /// ID of the Segment that should be deleted + public string SegmentId + { + get {return segmentId;} + } + + /// Construct the request + /// ID of the Segmentation from which the Segment should be deleted + /// ID of the Segment that should be deleted + public DeleteManualReqlSegment (string segmentationId, string segmentId): base(HttpMethod.Delete, 10000) + { + this.segmentationId = segmentationId; + this.segmentId = segmentId; + } + + /// URI to the endpoint including path parameters + public override string Path() + { + return string.Format("/segmentations/manual-reql/{0}/segments/{1}", SegmentationId, SegmentId); + } + + /// Get query parameters + /// Dictionary containing values of query parameters (name of parameter: value of the parameter) + public override Dictionary QueryParameters() + { + var parameters = new Dictionary() + { + + }; + return parameters; + } + + /// Get body parameters + /// Dictionary containing values of body parameters (name of parameter: value of the parameter) + public override Dictionary BodyParameters() + { + var parameters = new Dictionary() + { + + }; + return parameters; + } + + } +} diff --git a/Src/Recombee.ApiClient/ApiRequests/DeleteMoreItems.cs b/Src/Recombee.ApiClient/ApiRequests/DeleteMoreItems.cs index d924388..e2a0bc7 100644 --- a/Src/Recombee.ApiClient/ApiRequests/DeleteMoreItems.cs +++ b/Src/Recombee.ApiClient/ApiRequests/DeleteMoreItems.cs @@ -11,20 +11,20 @@ namespace Recombee.ApiClient.ApiRequests { - /// Delete more items - /// Delete all the items that pass the filter. - /// If an item becomes obsolete/no longer available, it is meaningful to **keep it in the catalog** (along with all the interaction data, which are very useful), and **only exclude the item from recommendations**. In such a case, use [ReQL filter](https://docs.recombee.com/reql.html) instead of deleting the item completely. + /// Delete More Items + /// Deletes all the items that pass the filter. + /// If an item becomes obsolete/no longer available, it is meaningful to **keep it in the catalog** (along with all the interaction data, which are very useful) and **only exclude the item from recommendations**. In such a case, use [ReQL filter](https://docs.recombee.com/reql.html) instead of deleting the item completely. public class DeleteMoreItems : Request { private readonly string filter; - /// A [ReQL](https://docs.recombee.com/reql.html) expression, which return `true` for the items that shall be updated. + /// A [ReQL](https://docs.recombee.com/reql.html) expression, which returns `true` for the items that shall be updated. public string Filter { get {return filter;} } /// Construct the request - /// A [ReQL](https://docs.recombee.com/reql.html) expression, which return `true` for the items that shall be updated. + /// A [ReQL](https://docs.recombee.com/reql.html) expression, which returns `true` for the items that shall be updated. public DeleteMoreItems (string filter): base(HttpMethod.Delete, 1000) { this.filter = filter; diff --git a/Src/Recombee.ApiClient/ApiRequests/DeletePurchase.cs b/Src/Recombee.ApiClient/ApiRequests/DeletePurchase.cs index 694092d..796b4d2 100644 --- a/Src/Recombee.ApiClient/ApiRequests/DeletePurchase.cs +++ b/Src/Recombee.ApiClient/ApiRequests/DeletePurchase.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// Delete purchase - /// Deletes an existing purchase uniquely specified by `userId`, `itemId`, and `timestamp` or all the purchases with given `userId` and `itemId` if `timestamp` is omitted. + /// Delete Purchase + /// Deletes an existing purchase uniquely specified by `userId`, `itemId`, and `timestamp` or all the purchases with the given `userId` and `itemId` if `timestamp` is omitted. /// public class DeletePurchase : Request { @@ -23,13 +23,13 @@ public string UserId get {return userId;} } private readonly string itemId; - /// ID of the item of which was purchased. + /// ID of the item which was purchased. public string ItemId { get {return itemId;} } private readonly DateTime? timestamp; - /// Unix timestamp of the purchase. If the `timestamp` is omitted, then all the purchases with given `userId` and `itemId` are deleted. + /// Unix timestamp of the purchase. If the `timestamp` is omitted, then all the purchases with the given `userId` and `itemId` are deleted. public DateTime? Timestamp { get {return timestamp;} @@ -37,8 +37,8 @@ public DateTime? Timestamp /// Construct the request /// ID of the user who made the purchase. - /// ID of the item of which was purchased. - /// Unix timestamp of the purchase. If the `timestamp` is omitted, then all the purchases with given `userId` and `itemId` are deleted. + /// ID of the item which was purchased. + /// Unix timestamp of the purchase. If the `timestamp` is omitted, then all the purchases with the given `userId` and `itemId` are deleted. public DeletePurchase (string userId, string itemId, DateTime? timestamp = null): base(HttpMethod.Delete, 1000) { this.userId = userId; diff --git a/Src/Recombee.ApiClient/ApiRequests/DeleteRating.cs b/Src/Recombee.ApiClient/ApiRequests/DeleteRating.cs index 31a7e29..32a370b 100644 --- a/Src/Recombee.ApiClient/ApiRequests/DeleteRating.cs +++ b/Src/Recombee.ApiClient/ApiRequests/DeleteRating.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// Delete rating - /// Deletes an existing rating specified by (`userId`, `itemId`, `timestamp`) from the database or all the ratings with given `userId` and `itemId` if `timestamp` is omitted. + /// Delete Rating + /// Deletes an existing rating specified by (`userId`, `itemId`, `timestamp`) from the database or all the ratings with the given `userId` and `itemId` if `timestamp` is omitted. /// public class DeleteRating : Request { @@ -29,7 +29,7 @@ public string ItemId get {return itemId;} } private readonly DateTime? timestamp; - /// Unix timestamp of the rating. If the `timestamp` is omitted, then all the ratings with given `userId` and `itemId` are deleted. + /// Unix timestamp of the rating. If the `timestamp` is omitted, then all the ratings with the given `userId` and `itemId` are deleted. public DateTime? Timestamp { get {return timestamp;} @@ -38,7 +38,7 @@ public DateTime? Timestamp /// Construct the request /// ID of the user who rated the item. /// ID of the item which was rated. - /// Unix timestamp of the rating. If the `timestamp` is omitted, then all the ratings with given `userId` and `itemId` are deleted. + /// Unix timestamp of the rating. If the `timestamp` is omitted, then all the ratings with the given `userId` and `itemId` are deleted. public DeleteRating (string userId, string itemId, DateTime? timestamp = null): base(HttpMethod.Delete, 1000) { this.userId = userId; diff --git a/Src/Recombee.ApiClient/ApiRequests/DeleteSearchSynonym.cs b/Src/Recombee.ApiClient/ApiRequests/DeleteSearchSynonym.cs index 678030a..14a1b78 100644 --- a/Src/Recombee.ApiClient/ApiRequests/DeleteSearchSynonym.cs +++ b/Src/Recombee.ApiClient/ApiRequests/DeleteSearchSynonym.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// Delete search synonym - /// Deletes synonym of given `id` and this synonym is no longer taken into account in the [Search items](https://docs.recombee.com/api.html#search-items). + /// Delete Search Synonym + /// Deletes synonym of the given `id`. This synonym is no longer taken into account in the [Search items](https://docs.recombee.com/api.html#search-items). /// public class DeleteSearchSynonym : Request { diff --git a/Src/Recombee.ApiClient/ApiRequests/DeleteSegmentation.cs b/Src/Recombee.ApiClient/ApiRequests/DeleteSegmentation.cs new file mode 100644 index 0000000..6f311f4 --- /dev/null +++ b/Src/Recombee.ApiClient/ApiRequests/DeleteSegmentation.cs @@ -0,0 +1,62 @@ +/* + This file is auto-generated, do not edit +*/ + +using System; +using System.Collections.Generic; +using System.Net.Http; +using Recombee.ApiClient.Bindings; +using Recombee.ApiClient.Util; + + +namespace Recombee.ApiClient.ApiRequests +{ + /// Delete Segmentation + /// Delete existing Segmentation. + /// + public class DeleteSegmentation : Request + { + private readonly string segmentationId; + /// ID of the Segmentation that should be deleted + public string SegmentationId + { + get {return segmentationId;} + } + + /// Construct the request + /// ID of the Segmentation that should be deleted + public DeleteSegmentation (string segmentationId): base(HttpMethod.Delete, 10000) + { + this.segmentationId = segmentationId; + } + + /// URI to the endpoint including path parameters + public override string Path() + { + return string.Format("/segmentations/{0}", SegmentationId); + } + + /// Get query parameters + /// Dictionary containing values of query parameters (name of parameter: value of the parameter) + public override Dictionary QueryParameters() + { + var parameters = new Dictionary() + { + + }; + return parameters; + } + + /// Get body parameters + /// Dictionary containing values of body parameters (name of parameter: value of the parameter) + public override Dictionary BodyParameters() + { + var parameters = new Dictionary() + { + + }; + return parameters; + } + + } +} diff --git a/Src/Recombee.ApiClient/ApiRequests/DeleteSeries.cs b/Src/Recombee.ApiClient/ApiRequests/DeleteSeries.cs index d5cba32..bef88ac 100644 --- a/Src/Recombee.ApiClient/ApiRequests/DeleteSeries.cs +++ b/Src/Recombee.ApiClient/ApiRequests/DeleteSeries.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// Delete series - /// Deletes the series of given `seriesId` from the database. + /// Delete Series + /// Deletes the series of the given `seriesId` from the database. /// Deleting a series will only delete assignment of items to it, not the items themselves! /// public class DeleteSeries : Request diff --git a/Src/Recombee.ApiClient/ApiRequests/DeleteUser.cs b/Src/Recombee.ApiClient/ApiRequests/DeleteUser.cs index 3e6b3e5..9ba9e10 100644 --- a/Src/Recombee.ApiClient/ApiRequests/DeleteUser.cs +++ b/Src/Recombee.ApiClient/ApiRequests/DeleteUser.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// Delete user - /// Deletes a user of given *userId* from the database. + /// Delete User + /// Deletes a user of the given *userId* from the database. /// If there are any purchases, ratings, bookmarks, cart additions or detail views made by the user present in the database, they will be deleted in cascade as well. /// public class DeleteUser : Request diff --git a/Src/Recombee.ApiClient/ApiRequests/DeleteUserProperty.cs b/Src/Recombee.ApiClient/ApiRequests/DeleteUserProperty.cs index 8c77872..ec0bdc2 100644 --- a/Src/Recombee.ApiClient/ApiRequests/DeleteUserProperty.cs +++ b/Src/Recombee.ApiClient/ApiRequests/DeleteUserProperty.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// Delete user property - /// Deleting an user property is roughly equivalent to removing a column from the table of users. + /// Delete User Property + /// Deleting a user property is roughly equivalent to removing a column from the table of users. /// public class DeleteUserProperty : Request { diff --git a/Src/Recombee.ApiClient/ApiRequests/DeleteViewPortion.cs b/Src/Recombee.ApiClient/ApiRequests/DeleteViewPortion.cs index 11e6e0a..dfb4c33 100644 --- a/Src/Recombee.ApiClient/ApiRequests/DeleteViewPortion.cs +++ b/Src/Recombee.ApiClient/ApiRequests/DeleteViewPortion.cs @@ -11,7 +11,7 @@ namespace Recombee.ApiClient.ApiRequests { - /// Delete view portion + /// Delete View Portion /// Deletes an existing view portion specified by (`userId`, `itemId`, `sessionId`) from the database. /// public class DeleteViewPortion : Request diff --git a/Src/Recombee.ApiClient/ApiRequests/GetItemPropertyInfo.cs b/Src/Recombee.ApiClient/ApiRequests/GetItemPropertyInfo.cs index 324e0ce..1f9f2c9 100644 --- a/Src/Recombee.ApiClient/ApiRequests/GetItemPropertyInfo.cs +++ b/Src/Recombee.ApiClient/ApiRequests/GetItemPropertyInfo.cs @@ -11,7 +11,7 @@ namespace Recombee.ApiClient.ApiRequests { - /// Get item property info + /// Get Item Property Info /// Gets information about specified item property. /// public class GetItemPropertyInfo : Request diff --git a/Src/Recombee.ApiClient/ApiRequests/GetItemValues.cs b/Src/Recombee.ApiClient/ApiRequests/GetItemValues.cs index 31aa939..b07dca1 100644 --- a/Src/Recombee.ApiClient/ApiRequests/GetItemValues.cs +++ b/Src/Recombee.ApiClient/ApiRequests/GetItemValues.cs @@ -11,13 +11,13 @@ namespace Recombee.ApiClient.ApiRequests { - /// Get item values - /// Get all the current property values of a given item. + /// Get Item Values + /// Gets all the current property values of the given item. /// public class GetItemValues : Request { private readonly string itemId; - /// ID of the item properties of which are to be obtained. + /// ID of the item whose properties are to be obtained. /// public string ItemId { @@ -25,7 +25,7 @@ public string ItemId } /// Construct the request - /// ID of the item properties of which are to be obtained. + /// ID of the item whose properties are to be obtained. /// public GetItemValues (string itemId): base(HttpMethod.Get, 1000) { diff --git a/Src/Recombee.ApiClient/ApiRequests/GetSegmentation.cs b/Src/Recombee.ApiClient/ApiRequests/GetSegmentation.cs new file mode 100644 index 0000000..6f6a915 --- /dev/null +++ b/Src/Recombee.ApiClient/ApiRequests/GetSegmentation.cs @@ -0,0 +1,62 @@ +/* + This file is auto-generated, do not edit +*/ + +using System; +using System.Collections.Generic; +using System.Net.Http; +using Recombee.ApiClient.Bindings; +using Recombee.ApiClient.Util; + + +namespace Recombee.ApiClient.ApiRequests +{ + /// Get Segmentation + /// Get existing Segmentation. + /// + public class GetSegmentation : Request + { + private readonly string segmentationId; + /// ID of the Segmentation that should be returned + public string SegmentationId + { + get {return segmentationId;} + } + + /// Construct the request + /// ID of the Segmentation that should be returned + public GetSegmentation (string segmentationId): base(HttpMethod.Get, 10000) + { + this.segmentationId = segmentationId; + } + + /// URI to the endpoint including path parameters + public override string Path() + { + return string.Format("/segmentations/list/{0}", SegmentationId); + } + + /// Get query parameters + /// Dictionary containing values of query parameters (name of parameter: value of the parameter) + public override Dictionary QueryParameters() + { + var parameters = new Dictionary() + { + + }; + return parameters; + } + + /// Get body parameters + /// Dictionary containing values of body parameters (name of parameter: value of the parameter) + public override Dictionary BodyParameters() + { + var parameters = new Dictionary() + { + + }; + return parameters; + } + + } +} diff --git a/Src/Recombee.ApiClient/ApiRequests/GetUserPropertyInfo.cs b/Src/Recombee.ApiClient/ApiRequests/GetUserPropertyInfo.cs index 8f1dcc9..ea7da5e 100644 --- a/Src/Recombee.ApiClient/ApiRequests/GetUserPropertyInfo.cs +++ b/Src/Recombee.ApiClient/ApiRequests/GetUserPropertyInfo.cs @@ -11,7 +11,7 @@ namespace Recombee.ApiClient.ApiRequests { - /// Get user property info + /// Get User Property Info /// Gets information about specified user property. /// public class GetUserPropertyInfo : Request diff --git a/Src/Recombee.ApiClient/ApiRequests/GetUserValues.cs b/Src/Recombee.ApiClient/ApiRequests/GetUserValues.cs index 550e554..54ad90c 100644 --- a/Src/Recombee.ApiClient/ApiRequests/GetUserValues.cs +++ b/Src/Recombee.ApiClient/ApiRequests/GetUserValues.cs @@ -11,13 +11,13 @@ namespace Recombee.ApiClient.ApiRequests { - /// Get user values - /// Get all the current property values of a given user. + /// Get User Values + /// Gets all the current property values of the given user. /// public class GetUserValues : Request { private readonly string userId; - /// ID of the user properties of which are to be obtained. + /// ID of the user whose properties are to be obtained. /// public string UserId { @@ -25,7 +25,7 @@ public string UserId } /// Construct the request - /// ID of the user properties of which are to be obtained. + /// ID of the user whose properties are to be obtained. /// public GetUserValues (string userId): base(HttpMethod.Get, 1000) { diff --git a/Src/Recombee.ApiClient/ApiRequests/InsertToGroup.cs b/Src/Recombee.ApiClient/ApiRequests/InsertToGroup.cs index 08ff252..8988b2d 100644 --- a/Src/Recombee.ApiClient/ApiRequests/InsertToGroup.cs +++ b/Src/Recombee.ApiClient/ApiRequests/InsertToGroup.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// Insert to group - /// Inserts an existing item/group into group of given `groupId`. + /// Insert to Group + /// Inserts an existing item/group into a group of the given `groupId`. /// public class InsertToGroup : Request { @@ -35,7 +35,7 @@ public string ItemId get {return itemId;} } private readonly bool? cascadeCreate; - /// Indicates that any non-existing entity specified within the request should be created (as is corresponding PUT requests were invoked). This concerns both the `groupId` and the `groupId`. If `cascadeCreate` is set true, the behavior also depends on the `itemType`. Either items or group may be created if not present in the database. + /// Indicates that any non-existing entity specified within the request should be created (as if corresponding PUT requests were invoked). This concerns both the `groupId` and the `groupId`. If `cascadeCreate` is set to true, the behavior also depends on the `itemType`. Either items or group may be created if not present in the database. public bool? CascadeCreate { get {return cascadeCreate;} @@ -45,7 +45,7 @@ public bool? CascadeCreate /// ID of the group to be inserted into. /// `item` iff the regular item from the catalog is to be inserted, `group` iff group is inserted as the item. /// ID of the item iff `itemType` is `item`. ID of the group iff `itemType` is `group`. - /// Indicates that any non-existing entity specified within the request should be created (as is corresponding PUT requests were invoked). This concerns both the `groupId` and the `groupId`. If `cascadeCreate` is set true, the behavior also depends on the `itemType`. Either items or group may be created if not present in the database. + /// Indicates that any non-existing entity specified within the request should be created (as if corresponding PUT requests were invoked). This concerns both the `groupId` and the `groupId`. If `cascadeCreate` is set to true, the behavior also depends on the `itemType`. Either items or group may be created if not present in the database. public InsertToGroup (string groupId, string itemType, string itemId, bool? cascadeCreate = null): base(HttpMethod.Post, 1000) { this.groupId = groupId; diff --git a/Src/Recombee.ApiClient/ApiRequests/InsertToSeries.cs b/Src/Recombee.ApiClient/ApiRequests/InsertToSeries.cs index 77b5b1f..e02d217 100644 --- a/Src/Recombee.ApiClient/ApiRequests/InsertToSeries.cs +++ b/Src/Recombee.ApiClient/ApiRequests/InsertToSeries.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// Insert to series - /// Inserts an existing item/series into series of given seriesId at position determined by time. + /// Insert to Series + /// Inserts an existing item/series into a series of the given seriesId at a position determined by time. /// public class InsertToSeries : Request { @@ -41,7 +41,7 @@ public double Time get {return time;} } private readonly bool? cascadeCreate; - /// Indicates that any non-existing entity specified within the request should be created (as is corresponding PUT requests were invoked). This concerns both the `seriesId` and the `itemId`. If `cascadeCreate` is set true, the behavior also depends on the `itemType`. Either item or series may be created if not present in the database. + /// Indicates that any non-existing entity specified within the request should be created (as if corresponding PUT requests were invoked). This concerns both the `seriesId` and the `itemId`. If `cascadeCreate` is set to true, the behavior also depends on the `itemType`. Either item or series may be created if not present in the database. public bool? CascadeCreate { get {return cascadeCreate;} @@ -52,7 +52,7 @@ public bool? CascadeCreate /// `item` iff the regular item from the catalog is to be inserted, `series` iff series is inserted as the item. /// ID of the item iff `itemType` is `item`. ID of the series iff `itemType` is `series`. /// Time index used for sorting items in the series. According to time, items are sorted within series in ascending order. In the example of TV show episodes, the episode number is a natural choice to be passed as time. - /// Indicates that any non-existing entity specified within the request should be created (as is corresponding PUT requests were invoked). This concerns both the `seriesId` and the `itemId`. If `cascadeCreate` is set true, the behavior also depends on the `itemType`. Either item or series may be created if not present in the database. + /// Indicates that any non-existing entity specified within the request should be created (as if corresponding PUT requests were invoked). This concerns both the `seriesId` and the `itemId`. If `cascadeCreate` is set to true, the behavior also depends on the `itemType`. Either item or series may be created if not present in the database. public InsertToSeries (string seriesId, string itemType, string itemId, double time, bool? cascadeCreate = null): base(HttpMethod.Post, 1000) { this.seriesId = seriesId; diff --git a/Src/Recombee.ApiClient/ApiRequests/ListGroupItems.cs b/Src/Recombee.ApiClient/ApiRequests/ListGroupItems.cs index 1a7bf1a..e354764 100644 --- a/Src/Recombee.ApiClient/ApiRequests/ListGroupItems.cs +++ b/Src/Recombee.ApiClient/ApiRequests/ListGroupItems.cs @@ -11,19 +11,19 @@ namespace Recombee.ApiClient.ApiRequests { - /// List group items + /// List Group Items /// List all the items present in the given group. public class ListGroupItems : Request { private readonly string groupId; - /// ID of the group items of which are to be listed. + /// ID of the group whose items are to be listed. public string GroupId { get {return groupId;} } /// Construct the request - /// ID of the group items of which are to be listed. + /// ID of the group whose items are to be listed. public ListGroupItems (string groupId): base(HttpMethod.Get, 100000) { this.groupId = groupId; diff --git a/Src/Recombee.ApiClient/ApiRequests/ListGroups.cs b/Src/Recombee.ApiClient/ApiRequests/ListGroups.cs index 68ca88f..0bb22f3 100644 --- a/Src/Recombee.ApiClient/ApiRequests/ListGroups.cs +++ b/Src/Recombee.ApiClient/ApiRequests/ListGroups.cs @@ -11,7 +11,7 @@ namespace Recombee.ApiClient.ApiRequests { - /// List groups + /// List Groups /// Gets the list of all the groups currently present in the database. public class ListGroups : Request { diff --git a/Src/Recombee.ApiClient/ApiRequests/ListItemBookmarks.cs b/Src/Recombee.ApiClient/ApiRequests/ListItemBookmarks.cs index 8a3de67..f8a63c1 100644 --- a/Src/Recombee.ApiClient/ApiRequests/ListItemBookmarks.cs +++ b/Src/Recombee.ApiClient/ApiRequests/ListItemBookmarks.cs @@ -11,12 +11,12 @@ namespace Recombee.ApiClient.ApiRequests { - /// List item bookmarks - /// List all the ever-made bookmarks of a given item. + /// List Item Bookmarks + /// Lists all the ever-made bookmarks of the given item. public class ListItemBookmarks : Request { private readonly string itemId; - /// ID of the item of which the bookmarks are to be listed. + /// ID of the item whose bookmarks are to be listed. /// public string ItemId { @@ -24,7 +24,7 @@ public string ItemId } /// Construct the request - /// ID of the item of which the bookmarks are to be listed. + /// ID of the item whose bookmarks are to be listed. /// public ListItemBookmarks (string itemId): base(HttpMethod.Get, 100000) { diff --git a/Src/Recombee.ApiClient/ApiRequests/ListItemCartAdditions.cs b/Src/Recombee.ApiClient/ApiRequests/ListItemCartAdditions.cs index 9f6ba9e..0204563 100644 --- a/Src/Recombee.ApiClient/ApiRequests/ListItemCartAdditions.cs +++ b/Src/Recombee.ApiClient/ApiRequests/ListItemCartAdditions.cs @@ -11,12 +11,12 @@ namespace Recombee.ApiClient.ApiRequests { - /// List item cart additions - /// List all the ever-made cart addition of a given item. + /// List Item Cart Additions + /// Lists all the ever-made cart additions of the given item. public class ListItemCartAdditions : Request { private readonly string itemId; - /// ID of the item of which the cart addition are to be listed. + /// ID of the item whose cart additions are to be listed. /// public string ItemId { @@ -24,7 +24,7 @@ public string ItemId } /// Construct the request - /// ID of the item of which the cart addition are to be listed. + /// ID of the item whose cart additions are to be listed. /// public ListItemCartAdditions (string itemId): base(HttpMethod.Get, 100000) { diff --git a/Src/Recombee.ApiClient/ApiRequests/ListItemDetailViews.cs b/Src/Recombee.ApiClient/ApiRequests/ListItemDetailViews.cs index 8baf959..3c23032 100644 --- a/Src/Recombee.ApiClient/ApiRequests/ListItemDetailViews.cs +++ b/Src/Recombee.ApiClient/ApiRequests/ListItemDetailViews.cs @@ -11,12 +11,12 @@ namespace Recombee.ApiClient.ApiRequests { - /// List item detail views - /// List all the detail views of a given item ever made by different users. + /// List Item Detail Views + /// Lists all the detail views of the given item ever made by different users. public class ListItemDetailViews : Request { private readonly string itemId; - /// ID of the item of which the detail views are to be listed. + /// ID of the item whose detail views are to be listed. /// public string ItemId { @@ -24,7 +24,7 @@ public string ItemId } /// Construct the request - /// ID of the item of which the detail views are to be listed. + /// ID of the item whose detail views are to be listed. /// public ListItemDetailViews (string itemId): base(HttpMethod.Get, 100000) { diff --git a/Src/Recombee.ApiClient/ApiRequests/ListItemProperties.cs b/Src/Recombee.ApiClient/ApiRequests/ListItemProperties.cs index a9aba9a..a6f4afb 100644 --- a/Src/Recombee.ApiClient/ApiRequests/ListItemProperties.cs +++ b/Src/Recombee.ApiClient/ApiRequests/ListItemProperties.cs @@ -11,7 +11,7 @@ namespace Recombee.ApiClient.ApiRequests { - /// List item properties + /// List Item Properties /// Gets the list of all the item properties in your database. /// public class ListItemProperties : Request diff --git a/Src/Recombee.ApiClient/ApiRequests/ListItemPurchases.cs b/Src/Recombee.ApiClient/ApiRequests/ListItemPurchases.cs index ccaf793..c43d138 100644 --- a/Src/Recombee.ApiClient/ApiRequests/ListItemPurchases.cs +++ b/Src/Recombee.ApiClient/ApiRequests/ListItemPurchases.cs @@ -11,12 +11,12 @@ namespace Recombee.ApiClient.ApiRequests { - /// List item purchases - /// List all the ever-made purchases of a given item. + /// List Item Purchases + /// Lists all the ever-made purchases of the given item. public class ListItemPurchases : Request { private readonly string itemId; - /// ID of the item of which the pucrhases are to be listed. + /// ID of the item whose purchases are to be listed. /// public string ItemId { @@ -24,7 +24,7 @@ public string ItemId } /// Construct the request - /// ID of the item of which the pucrhases are to be listed. + /// ID of the item whose purchases are to be listed. /// public ListItemPurchases (string itemId): base(HttpMethod.Get, 100000) { diff --git a/Src/Recombee.ApiClient/ApiRequests/ListItemRatings.cs b/Src/Recombee.ApiClient/ApiRequests/ListItemRatings.cs index 52646ee..f14612e 100644 --- a/Src/Recombee.ApiClient/ApiRequests/ListItemRatings.cs +++ b/Src/Recombee.ApiClient/ApiRequests/ListItemRatings.cs @@ -11,12 +11,12 @@ namespace Recombee.ApiClient.ApiRequests { - /// List item ratings - /// List all the ratings of an item ever submitted by different users. + /// List Item Ratings + /// Lists all the ratings of an item ever submitted by different users. public class ListItemRatings : Request { private readonly string itemId; - /// ID of the item of which the ratings are to be listed. + /// ID of the item whose ratings are to be listed. /// public string ItemId { @@ -24,7 +24,7 @@ public string ItemId } /// Construct the request - /// ID of the item of which the ratings are to be listed. + /// ID of the item whose ratings are to be listed. /// public ListItemRatings (string itemId): base(HttpMethod.Get, 100000) { diff --git a/Src/Recombee.ApiClient/ApiRequests/ListItemViewPortions.cs b/Src/Recombee.ApiClient/ApiRequests/ListItemViewPortions.cs index 3df671a..eb53fe0 100644 --- a/Src/Recombee.ApiClient/ApiRequests/ListItemViewPortions.cs +++ b/Src/Recombee.ApiClient/ApiRequests/ListItemViewPortions.cs @@ -11,13 +11,13 @@ namespace Recombee.ApiClient.ApiRequests { - /// List item view portions - /// List all the view portions of an item ever submitted by different users. + /// List Item View Portions + /// Lists all the view portions of an item ever submitted by different users. /// public class ListItemViewPortions : Request { private readonly string itemId; - /// ID of the item of which the view portions are to be listed. + /// ID of the item whose view portions are to be listed. /// public string ItemId { @@ -25,7 +25,7 @@ public string ItemId } /// Construct the request - /// ID of the item of which the view portions are to be listed. + /// ID of the item whose view portions are to be listed. /// public ListItemViewPortions (string itemId): base(HttpMethod.Get, 100000) { diff --git a/Src/Recombee.ApiClient/ApiRequests/ListItems.cs b/Src/Recombee.ApiClient/ApiRequests/ListItems.cs index 57c84e7..6244380 100644 --- a/Src/Recombee.ApiClient/ApiRequests/ListItems.cs +++ b/Src/Recombee.ApiClient/ApiRequests/ListItems.cs @@ -11,7 +11,7 @@ namespace Recombee.ApiClient.ApiRequests { - /// List items + /// List Items /// Gets a list of IDs of items currently present in the catalog. public class ListItems : Request { @@ -60,7 +60,7 @@ public bool? ReturnProperties get {return returnProperties;} } private readonly string[] includedProperties; - /// Allows to specify, which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. + /// Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. /// Example response for `includedProperties=description,price`: /// ``` /// [ @@ -107,7 +107,7 @@ public string[] IncludedProperties /// ] /// ``` /// - /// Allows to specify, which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. + /// Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. /// Example response for `includedProperties=description,price`: /// ``` /// [ diff --git a/Src/Recombee.ApiClient/ApiRequests/ListSearchSynonyms.cs b/Src/Recombee.ApiClient/ApiRequests/ListSearchSynonyms.cs index 28fcf23..99e76ff 100644 --- a/Src/Recombee.ApiClient/ApiRequests/ListSearchSynonyms.cs +++ b/Src/Recombee.ApiClient/ApiRequests/ListSearchSynonyms.cs @@ -11,7 +11,7 @@ namespace Recombee.ApiClient.ApiRequests { - /// List search synonyms + /// List Search Synonyms /// Gives the list of synonyms defined in the database. public class ListSearchSynonyms : Request { diff --git a/Src/Recombee.ApiClient/ApiRequests/ListSegmentations.cs b/Src/Recombee.ApiClient/ApiRequests/ListSegmentations.cs new file mode 100644 index 0000000..c05455d --- /dev/null +++ b/Src/Recombee.ApiClient/ApiRequests/ListSegmentations.cs @@ -0,0 +1,62 @@ +/* + This file is auto-generated, do not edit +*/ + +using System; +using System.Collections.Generic; +using System.Net.Http; +using Recombee.ApiClient.Bindings; +using Recombee.ApiClient.Util; + + +namespace Recombee.ApiClient.ApiRequests +{ + /// List Segmentations + /// Return all existing items Segmentations. + /// + public class ListSegmentations : Request + { + private readonly string sourceType; + /// List Segmentations based on a particular type of data. Currently only `items` are supported. + public string SourceType + { + get {return sourceType;} + } + + /// Construct the request + /// List Segmentations based on a particular type of data. Currently only `items` are supported. + public ListSegmentations (string sourceType): base(HttpMethod.Get, 10000) + { + this.sourceType = sourceType; + } + + /// URI to the endpoint including path parameters + public override string Path() + { + return "/segmentations/list/"; + } + + /// Get query parameters + /// Dictionary containing values of query parameters (name of parameter: value of the parameter) + public override Dictionary QueryParameters() + { + var parameters = new Dictionary() + { + {"sourceType", this.SourceType} + }; + return parameters; + } + + /// Get body parameters + /// Dictionary containing values of body parameters (name of parameter: value of the parameter) + public override Dictionary BodyParameters() + { + var parameters = new Dictionary() + { + + }; + return parameters; + } + + } +} diff --git a/Src/Recombee.ApiClient/ApiRequests/ListSeries.cs b/Src/Recombee.ApiClient/ApiRequests/ListSeries.cs index e860dc2..7367a9d 100644 --- a/Src/Recombee.ApiClient/ApiRequests/ListSeries.cs +++ b/Src/Recombee.ApiClient/ApiRequests/ListSeries.cs @@ -11,7 +11,7 @@ namespace Recombee.ApiClient.ApiRequests { - /// List series + /// List Series /// Gets the list of all the series currently present in the database. public class ListSeries : Request { diff --git a/Src/Recombee.ApiClient/ApiRequests/ListSeriesItems.cs b/Src/Recombee.ApiClient/ApiRequests/ListSeriesItems.cs index 91b49a2..60ec2bd 100644 --- a/Src/Recombee.ApiClient/ApiRequests/ListSeriesItems.cs +++ b/Src/Recombee.ApiClient/ApiRequests/ListSeriesItems.cs @@ -11,19 +11,19 @@ namespace Recombee.ApiClient.ApiRequests { - /// List series items - /// List all the items present in the given series, sorted according to their time index values. + /// List Series Items + /// Lists all the items present in the given series, sorted according to their time index values. public class ListSeriesItems : Request { private readonly string seriesId; - /// ID of the series items of which are to be listed. + /// ID of the series whose items are to be listed. public string SeriesId { get {return seriesId;} } /// Construct the request - /// ID of the series items of which are to be listed. + /// ID of the series whose items are to be listed. public ListSeriesItems (string seriesId): base(HttpMethod.Get, 100000) { this.seriesId = seriesId; diff --git a/Src/Recombee.ApiClient/ApiRequests/ListUserBookmarks.cs b/Src/Recombee.ApiClient/ApiRequests/ListUserBookmarks.cs index 5f77642..e73fe70 100644 --- a/Src/Recombee.ApiClient/ApiRequests/ListUserBookmarks.cs +++ b/Src/Recombee.ApiClient/ApiRequests/ListUserBookmarks.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// List user bookmarks - /// List all the bookmarks ever made by a given user. + /// List User Bookmarks + /// Lists all the bookmarks ever made by the given user. public class ListUserBookmarks : Request { private readonly string userId; diff --git a/Src/Recombee.ApiClient/ApiRequests/ListUserCartAdditions.cs b/Src/Recombee.ApiClient/ApiRequests/ListUserCartAdditions.cs index dc8b57b..3122a3b 100644 --- a/Src/Recombee.ApiClient/ApiRequests/ListUserCartAdditions.cs +++ b/Src/Recombee.ApiClient/ApiRequests/ListUserCartAdditions.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// List user cart additions - /// List all the cart additions ever made by a given user. + /// List User Cart Additions + /// Lists all the cart additions ever made by the given user. public class ListUserCartAdditions : Request { private readonly string userId; diff --git a/Src/Recombee.ApiClient/ApiRequests/ListUserDetailViews.cs b/Src/Recombee.ApiClient/ApiRequests/ListUserDetailViews.cs index 9a34a79..85992ec 100644 --- a/Src/Recombee.ApiClient/ApiRequests/ListUserDetailViews.cs +++ b/Src/Recombee.ApiClient/ApiRequests/ListUserDetailViews.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// List user detail views - /// Lists all the detail views of different items ever made by a given user. + /// List User Detail Views + /// Lists all the detail views of different items ever made by the given user. public class ListUserDetailViews : Request { private readonly string userId; diff --git a/Src/Recombee.ApiClient/ApiRequests/ListUserProperties.cs b/Src/Recombee.ApiClient/ApiRequests/ListUserProperties.cs index d88824a..f3e0cf8 100644 --- a/Src/Recombee.ApiClient/ApiRequests/ListUserProperties.cs +++ b/Src/Recombee.ApiClient/ApiRequests/ListUserProperties.cs @@ -11,7 +11,7 @@ namespace Recombee.ApiClient.ApiRequests { - /// List user properties + /// List User Properties /// Gets the list of all the user properties in your database. /// public class ListUserProperties : Request diff --git a/Src/Recombee.ApiClient/ApiRequests/ListUserPurchases.cs b/Src/Recombee.ApiClient/ApiRequests/ListUserPurchases.cs index 401ec5e..abf7e52 100644 --- a/Src/Recombee.ApiClient/ApiRequests/ListUserPurchases.cs +++ b/Src/Recombee.ApiClient/ApiRequests/ListUserPurchases.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// List user purchases - /// List all the purchases ever made by a given user. + /// List User Purchases + /// Lists all the purchases ever made by the given user. public class ListUserPurchases : Request { private readonly string userId; diff --git a/Src/Recombee.ApiClient/ApiRequests/ListUserRatings.cs b/Src/Recombee.ApiClient/ApiRequests/ListUserRatings.cs index 5e38e28..16b54b5 100644 --- a/Src/Recombee.ApiClient/ApiRequests/ListUserRatings.cs +++ b/Src/Recombee.ApiClient/ApiRequests/ListUserRatings.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// List user ratings - /// List all the ratings ever submitted by a given user. + /// List User Ratings + /// Lists all the ratings ever submitted by the given user. public class ListUserRatings : Request { private readonly string userId; diff --git a/Src/Recombee.ApiClient/ApiRequests/ListUserViewPortions.cs b/Src/Recombee.ApiClient/ApiRequests/ListUserViewPortions.cs index bf388cd..bdf730b 100644 --- a/Src/Recombee.ApiClient/ApiRequests/ListUserViewPortions.cs +++ b/Src/Recombee.ApiClient/ApiRequests/ListUserViewPortions.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// List user view portions - /// List all the view portions ever submitted by a given user. + /// List User View Portions + /// Lists all the view portions ever submitted by the given user. /// public class ListUserViewPortions : Request { diff --git a/Src/Recombee.ApiClient/ApiRequests/ListUsers.cs b/Src/Recombee.ApiClient/ApiRequests/ListUsers.cs index c5a9530..6dc6974 100644 --- a/Src/Recombee.ApiClient/ApiRequests/ListUsers.cs +++ b/Src/Recombee.ApiClient/ApiRequests/ListUsers.cs @@ -11,7 +11,7 @@ namespace Recombee.ApiClient.ApiRequests { - /// List users + /// List Users /// Gets a list of IDs of users currently present in the catalog. public class ListUsers : Request { @@ -56,7 +56,7 @@ public bool? ReturnProperties get {return returnProperties;} } private readonly string[] includedProperties; - /// Allows to specify, which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. + /// Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. /// Example response for `includedProperties=country`: /// ``` /// [ @@ -97,7 +97,7 @@ public string[] IncludedProperties /// ] /// ``` /// - /// Allows to specify, which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. + /// Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. /// Example response for `includedProperties=country`: /// ``` /// [ diff --git a/Src/Recombee.ApiClient/ApiRequests/MergeUsers.cs b/Src/Recombee.ApiClient/ApiRequests/MergeUsers.cs index 84635ae..37561fe 100644 --- a/Src/Recombee.ApiClient/ApiRequests/MergeUsers.cs +++ b/Src/Recombee.ApiClient/ApiRequests/MergeUsers.cs @@ -11,14 +11,14 @@ namespace Recombee.ApiClient.ApiRequests { - /// Merge users - /// Merges interactions (purchases, ratings, bookmarks, detail views ...) of two different users under a single user ID. This is especially useful for online e-commerce applications working with anonymous users identified by unique tokens such as the session ID. In such applications, it may often happen that a user owns a persistent account, yet accesses the system anonymously while, e.g., putting items into a shopping cart. At some point in time, such as when the user wishes to confirm the purchase, (s)he logs into the system using his/her username and password. The interactions made under anonymous session ID then become connected with the persistent account, and merging these two together becomes desirable. + /// Merge Users + /// Merges interactions (purchases, ratings, bookmarks, detail views ...) of two different users under a single user ID. This is especially useful for online e-commerce applications working with anonymous users identified by unique tokens such as the session ID. In such applications, it may often happen that a user owns a persistent account, yet accesses the system anonymously while, e.g., putting items into a shopping cart. At some point in time, such as when the user wishes to confirm the purchase, (s)he logs into the system using his/her username and password. The interactions made under anonymous session ID then become connected with the persistent account, and merging these two becomes desirable. /// Merging happens between two users referred to as the *target* and the *source*. After the merge, all the interactions of the source user are attributed to the target user, and the source user is **deleted**. /// public class MergeUsers : Request { private readonly string targetUserId; - /// ID of the targer user. + /// ID of the target user. public string TargetUserId { get {return targetUserId;} @@ -37,7 +37,7 @@ public bool? CascadeCreate } /// Construct the request - /// ID of the targer user. + /// ID of the target user. /// ID of the source user. /// Sets whether the user *targetUserId* should be created if not present in the database. public MergeUsers (string targetUserId, string sourceUserId, bool? cascadeCreate = null): base(HttpMethod.Put, 10000) diff --git a/Src/Recombee.ApiClient/ApiRequests/RecommendItemSegmentsToItem.cs b/Src/Recombee.ApiClient/ApiRequests/RecommendItemSegmentsToItem.cs new file mode 100644 index 0000000..d2f5247 --- /dev/null +++ b/Src/Recombee.ApiClient/ApiRequests/RecommendItemSegmentsToItem.cs @@ -0,0 +1,209 @@ +/* + This file is auto-generated, do not edit +*/ + +using System; +using System.Collections.Generic; +using System.Net.Http; +using Recombee.ApiClient.Bindings; +using Recombee.ApiClient.Util; + + +namespace Recombee.ApiClient.ApiRequests +{ + /// Recommend Item Segments to Item + /// Recommends Segments from a Segmentation that are the most relevant to a particular item. + /// Based on the used Segmentation, this endpoint can be used for example for: + /// - Recommending the related categories + /// - Recommending the related genres + /// - Recommending the related brands + /// - Recommending the related artists + /// You need to set the used Segmentation the Admin UI in the Scenario settings prior to using this endpoint. + /// The returned segments are sorted by relevance (first segment being the most relevant). + /// It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters. + /// + public class RecommendItemSegmentsToItem : Request + { + private readonly string itemId; + /// ID of the item for which the recommendations are to be generated. + public string ItemId + { + get {return itemId;} + } + private readonly string targetUserId; + /// ID of the user who will see the recommendations. + /// Specifying the *targetUserId* is beneficial because: + /// * It makes the recommendations personalized + /// * Allows the calculation of Actions and Conversions + /// in the graphical user interface, + /// as Recombee can pair the user who got recommendations + /// and who afterward viewed/purchased an item. + /// If you insist on not specifying the user, pass `null` + /// (`None`, `nil`, `NULL` etc., depending on the language) to *targetUserId*. + /// Do not create some special dummy user for getting recommendations, + /// as it could mislead the recommendation models, + /// and result in wrong recommendations. + /// For anonymous/unregistered users, it is possible to use, for example, their session ID. + /// + public string TargetUserId + { + get {return targetUserId;} + } + private readonly long count; + /// Number of item segments to be recommended (N for the top-N recommendation). + /// + public long Count + { + get {return count;} + } + private readonly string scenario; + /// Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing". + /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs. + /// The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios. + /// + public string Scenario + { + get {return scenario;} + } + private readonly bool? cascadeCreate; + /// If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows, for example, rotations in the following recommendations for that user, as the user will be already known to the system. + /// + public bool? CascadeCreate + { + get {return cascadeCreate;} + } + private readonly string filter; + /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended segments based on the `segmentationId`. + /// + public string Filter + { + get {return filter;} + } + private readonly string booster; + /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some segments based on the `segmentationId`. + /// + public string Booster + { + get {return booster;} + } + private readonly Logic logic; + /// Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. + /// See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details. + /// The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users. + /// Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// + public Logic Logic + { + get {return logic;} + } + private readonly Dictionary expertSettings; + /// Dictionary of custom options. + /// + public Dictionary ExpertSettings + { + get {return expertSettings;} + } + private readonly bool? returnAbGroup; + /// If there is a custom AB-testing running, return the name of the group to which the request belongs. + /// + public bool? ReturnAbGroup + { + get {return returnAbGroup;} + } + + /// Construct the request + /// ID of the item for which the recommendations are to be generated. + /// ID of the user who will see the recommendations. + /// Specifying the *targetUserId* is beneficial because: + /// * It makes the recommendations personalized + /// * Allows the calculation of Actions and Conversions + /// in the graphical user interface, + /// as Recombee can pair the user who got recommendations + /// and who afterward viewed/purchased an item. + /// If you insist on not specifying the user, pass `null` + /// (`None`, `nil`, `NULL` etc., depending on the language) to *targetUserId*. + /// Do not create some special dummy user for getting recommendations, + /// as it could mislead the recommendation models, + /// and result in wrong recommendations. + /// For anonymous/unregistered users, it is possible to use, for example, their session ID. + /// + /// Number of item segments to be recommended (N for the top-N recommendation). + /// + /// Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing". + /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs. + /// The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios. + /// + /// If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows, for example, rotations in the following recommendations for that user, as the user will be already known to the system. + /// + /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended segments based on the `segmentationId`. + /// + /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some segments based on the `segmentationId`. + /// + /// Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. + /// See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details. + /// The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users. + /// Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// + /// Dictionary of custom options. + /// + /// If there is a custom AB-testing running, return the name of the group to which the request belongs. + /// + public RecommendItemSegmentsToItem (string itemId, string targetUserId, long count, string scenario = null, bool? cascadeCreate = null, string filter = null, string booster = null, Logic logic = null, Dictionary expertSettings = null, bool? returnAbGroup = null): base(HttpMethod.Post, 3000) + { + this.itemId = itemId; + this.targetUserId = targetUserId; + this.count = count; + this.scenario = scenario; + this.cascadeCreate = cascadeCreate; + this.filter = filter; + this.booster = booster; + this.logic = logic; + this.expertSettings = expertSettings; + this.returnAbGroup = returnAbGroup; + } + + /// URI to the endpoint including path parameters + public override string Path() + { + return string.Format("/recomms/items/{0}/item-segments/", ItemId); + } + + /// Get query parameters + /// Dictionary containing values of query parameters (name of parameter: value of the parameter) + public override Dictionary QueryParameters() + { + var parameters = new Dictionary() + { + + }; + return parameters; + } + + /// Get body parameters + /// Dictionary containing values of body parameters (name of parameter: value of the parameter) + public override Dictionary BodyParameters() + { + var parameters = new Dictionary() + { + {"targetUserId", this.TargetUserId}, + {"count", this.Count} + }; + if (this.Scenario != null) + parameters["scenario"] = this.Scenario; + if (this.CascadeCreate.HasValue) + parameters["cascadeCreate"] = this.CascadeCreate.Value; + if (this.Filter != null) + parameters["filter"] = this.Filter; + if (this.Booster != null) + parameters["booster"] = this.Booster; + if (this.Logic != null) + parameters["logic"] = this.Logic; + if (this.ExpertSettings != null) + parameters["expertSettings"] = this.ExpertSettings; + if (this.ReturnAbGroup.HasValue) + parameters["returnAbGroup"] = this.ReturnAbGroup.Value; + return parameters; + } + + } +} diff --git a/Src/Recombee.ApiClient/ApiRequests/RecommendItemSegmentsToItemSegment.cs b/Src/Recombee.ApiClient/ApiRequests/RecommendItemSegmentsToItemSegment.cs new file mode 100644 index 0000000..a15b197 --- /dev/null +++ b/Src/Recombee.ApiClient/ApiRequests/RecommendItemSegmentsToItemSegment.cs @@ -0,0 +1,209 @@ +/* + This file is auto-generated, do not edit +*/ + +using System; +using System.Collections.Generic; +using System.Net.Http; +using Recombee.ApiClient.Bindings; +using Recombee.ApiClient.Util; + + +namespace Recombee.ApiClient.ApiRequests +{ + /// Recommend Item Segments to Item Segment + /// Recommends Segments from a result Segmentation that are the most relevant to a particular Segment from a context Segmentation. + /// Based on the used Segmentations, this endpoint can be used for example for: + /// - Recommending the related brands to particular brand + /// - Recommending the related brands to particular category + /// - Recommending the related artists to a particular genre (assuming songs are the Items) + /// You need to set the used context and result Segmentation the Admin UI in the Scenario settings prior to using this endpoint. + /// The returned segments are sorted by relevance (first segment being the most relevant). + /// It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters. + /// + public class RecommendItemSegmentsToItemSegment : Request + { + private readonly string contextSegmentId; + /// ID of the segment from `contextSegmentationId` for which the recommendations are to be generated. + public string ContextSegmentId + { + get {return contextSegmentId;} + } + private readonly string targetUserId; + /// ID of the user who will see the recommendations. + /// Specifying the *targetUserId* is beneficial because: + /// * It makes the recommendations personalized + /// * Allows the calculation of Actions and Conversions + /// in the graphical user interface, + /// as Recombee can pair the user who got recommendations + /// and who afterward viewed/purchased an item. + /// If you insist on not specifying the user, pass `null` + /// (`None`, `nil`, `NULL` etc., depending on the language) to *targetUserId*. + /// Do not create some special dummy user for getting recommendations, + /// as it could mislead the recommendation models, + /// and result in wrong recommendations. + /// For anonymous/unregistered users, it is possible to use, for example, their session ID. + /// + public string TargetUserId + { + get {return targetUserId;} + } + private readonly long count; + /// Number of item segments to be recommended (N for the top-N recommendation). + /// + public long Count + { + get {return count;} + } + private readonly string scenario; + /// Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing". + /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs. + /// The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios. + /// + public string Scenario + { + get {return scenario;} + } + private readonly bool? cascadeCreate; + /// If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows, for example, rotations in the following recommendations for that user, as the user will be already known to the system. + /// + public bool? CascadeCreate + { + get {return cascadeCreate;} + } + private readonly string filter; + /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended segments based on the `segmentationId`. + /// + public string Filter + { + get {return filter;} + } + private readonly string booster; + /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some segments based on the `segmentationId`. + /// + public string Booster + { + get {return booster;} + } + private readonly Logic logic; + /// Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. + /// See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details. + /// The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users. + /// Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// + public Logic Logic + { + get {return logic;} + } + private readonly Dictionary expertSettings; + /// Dictionary of custom options. + /// + public Dictionary ExpertSettings + { + get {return expertSettings;} + } + private readonly bool? returnAbGroup; + /// If there is a custom AB-testing running, return the name of the group to which the request belongs. + /// + public bool? ReturnAbGroup + { + get {return returnAbGroup;} + } + + /// Construct the request + /// ID of the segment from `contextSegmentationId` for which the recommendations are to be generated. + /// ID of the user who will see the recommendations. + /// Specifying the *targetUserId* is beneficial because: + /// * It makes the recommendations personalized + /// * Allows the calculation of Actions and Conversions + /// in the graphical user interface, + /// as Recombee can pair the user who got recommendations + /// and who afterward viewed/purchased an item. + /// If you insist on not specifying the user, pass `null` + /// (`None`, `nil`, `NULL` etc., depending on the language) to *targetUserId*. + /// Do not create some special dummy user for getting recommendations, + /// as it could mislead the recommendation models, + /// and result in wrong recommendations. + /// For anonymous/unregistered users, it is possible to use, for example, their session ID. + /// + /// Number of item segments to be recommended (N for the top-N recommendation). + /// + /// Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing". + /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs. + /// The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios. + /// + /// If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows, for example, rotations in the following recommendations for that user, as the user will be already known to the system. + /// + /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended segments based on the `segmentationId`. + /// + /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some segments based on the `segmentationId`. + /// + /// Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. + /// See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details. + /// The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users. + /// Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// + /// Dictionary of custom options. + /// + /// If there is a custom AB-testing running, return the name of the group to which the request belongs. + /// + public RecommendItemSegmentsToItemSegment (string contextSegmentId, string targetUserId, long count, string scenario = null, bool? cascadeCreate = null, string filter = null, string booster = null, Logic logic = null, Dictionary expertSettings = null, bool? returnAbGroup = null): base(HttpMethod.Post, 3000) + { + this.contextSegmentId = contextSegmentId; + this.targetUserId = targetUserId; + this.count = count; + this.scenario = scenario; + this.cascadeCreate = cascadeCreate; + this.filter = filter; + this.booster = booster; + this.logic = logic; + this.expertSettings = expertSettings; + this.returnAbGroup = returnAbGroup; + } + + /// URI to the endpoint including path parameters + public override string Path() + { + return "/recomms/item-segments/item-segments/"; + } + + /// Get query parameters + /// Dictionary containing values of query parameters (name of parameter: value of the parameter) + public override Dictionary QueryParameters() + { + var parameters = new Dictionary() + { + + }; + return parameters; + } + + /// Get body parameters + /// Dictionary containing values of body parameters (name of parameter: value of the parameter) + public override Dictionary BodyParameters() + { + var parameters = new Dictionary() + { + {"contextSegmentId", this.ContextSegmentId}, + {"targetUserId", this.TargetUserId}, + {"count", this.Count} + }; + if (this.Scenario != null) + parameters["scenario"] = this.Scenario; + if (this.CascadeCreate.HasValue) + parameters["cascadeCreate"] = this.CascadeCreate.Value; + if (this.Filter != null) + parameters["filter"] = this.Filter; + if (this.Booster != null) + parameters["booster"] = this.Booster; + if (this.Logic != null) + parameters["logic"] = this.Logic; + if (this.ExpertSettings != null) + parameters["expertSettings"] = this.ExpertSettings; + if (this.ReturnAbGroup.HasValue) + parameters["returnAbGroup"] = this.ReturnAbGroup.Value; + return parameters; + } + + } +} diff --git a/Src/Recombee.ApiClient/ApiRequests/RecommendItemSegmentsToUser.cs b/Src/Recombee.ApiClient/ApiRequests/RecommendItemSegmentsToUser.cs new file mode 100644 index 0000000..c8ed9e8 --- /dev/null +++ b/Src/Recombee.ApiClient/ApiRequests/RecommendItemSegmentsToUser.cs @@ -0,0 +1,174 @@ +/* + This file is auto-generated, do not edit +*/ + +using System; +using System.Collections.Generic; +using System.Net.Http; +using Recombee.ApiClient.Bindings; +using Recombee.ApiClient.Util; + + +namespace Recombee.ApiClient.ApiRequests +{ + /// Recommend Item Segments to User + /// Recommends the top Segments from a Segmentation for a particular user, based on the user's past interactions. + /// Based on the used Segmentation, this endpoint can be used for example for: + /// - Recommending the top categories for the user + /// - Recommending the top genres for the user + /// - Recommending the top brands for the user + /// - Recommending the top artists for the user + /// You need to set the used Segmentation the Admin UI in the Scenario settings prior to using this endpoint. + /// The returned segments are sorted by relevance (first segment being the most relevant). + /// It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters. + /// + public class RecommendItemSegmentsToUser : Request + { + private readonly string userId; + /// ID of the user for whom personalized recommendations are to be generated. + public string UserId + { + get {return userId;} + } + private readonly long count; + /// Number of item segments to be recommended (N for the top-N recommendation). + /// + public long Count + { + get {return count;} + } + private readonly string scenario; + /// Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing". + /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs. + /// The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios. + /// + public string Scenario + { + get {return scenario;} + } + private readonly bool? cascadeCreate; + /// If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows, for example, rotations in the following recommendations for that user, as the user will be already known to the system. + /// + public bool? CascadeCreate + { + get {return cascadeCreate;} + } + private readonly string filter; + /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended segments based on the `segmentationId`. + /// + public string Filter + { + get {return filter;} + } + private readonly string booster; + /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some segments based on the `segmentationId`. + /// + public string Booster + { + get {return booster;} + } + private readonly Logic logic; + /// Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. + /// See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details. + /// The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users. + /// Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// + public Logic Logic + { + get {return logic;} + } + private readonly Dictionary expertSettings; + /// Dictionary of custom options. + /// + public Dictionary ExpertSettings + { + get {return expertSettings;} + } + private readonly bool? returnAbGroup; + /// If there is a custom AB-testing running, return the name of the group to which the request belongs. + /// + public bool? ReturnAbGroup + { + get {return returnAbGroup;} + } + + /// Construct the request + /// ID of the user for whom personalized recommendations are to be generated. + /// Number of item segments to be recommended (N for the top-N recommendation). + /// + /// Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing". + /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs. + /// The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios. + /// + /// If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows, for example, rotations in the following recommendations for that user, as the user will be already known to the system. + /// + /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended segments based on the `segmentationId`. + /// + /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some segments based on the `segmentationId`. + /// + /// Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. + /// See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details. + /// The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users. + /// Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// + /// Dictionary of custom options. + /// + /// If there is a custom AB-testing running, return the name of the group to which the request belongs. + /// + public RecommendItemSegmentsToUser (string userId, long count, string scenario = null, bool? cascadeCreate = null, string filter = null, string booster = null, Logic logic = null, Dictionary expertSettings = null, bool? returnAbGroup = null): base(HttpMethod.Post, 3000) + { + this.userId = userId; + this.count = count; + this.scenario = scenario; + this.cascadeCreate = cascadeCreate; + this.filter = filter; + this.booster = booster; + this.logic = logic; + this.expertSettings = expertSettings; + this.returnAbGroup = returnAbGroup; + } + + /// URI to the endpoint including path parameters + public override string Path() + { + return string.Format("/recomms/users/{0}/item-segments/", UserId); + } + + /// Get query parameters + /// Dictionary containing values of query parameters (name of parameter: value of the parameter) + public override Dictionary QueryParameters() + { + var parameters = new Dictionary() + { + + }; + return parameters; + } + + /// Get body parameters + /// Dictionary containing values of body parameters (name of parameter: value of the parameter) + public override Dictionary BodyParameters() + { + var parameters = new Dictionary() + { + {"count", this.Count} + }; + if (this.Scenario != null) + parameters["scenario"] = this.Scenario; + if (this.CascadeCreate.HasValue) + parameters["cascadeCreate"] = this.CascadeCreate.Value; + if (this.Filter != null) + parameters["filter"] = this.Filter; + if (this.Booster != null) + parameters["booster"] = this.Booster; + if (this.Logic != null) + parameters["logic"] = this.Logic; + if (this.ExpertSettings != null) + parameters["expertSettings"] = this.ExpertSettings; + if (this.ReturnAbGroup.HasValue) + parameters["returnAbGroup"] = this.ReturnAbGroup.Value; + return parameters; + } + + } +} diff --git a/Src/Recombee.ApiClient/ApiRequests/RecommendItemsToItem.cs b/Src/Recombee.ApiClient/ApiRequests/RecommendItemsToItem.cs index a2eab0c..d28186f 100644 --- a/Src/Recombee.ApiClient/ApiRequests/RecommendItemsToItem.cs +++ b/Src/Recombee.ApiClient/ApiRequests/RecommendItemsToItem.cs @@ -11,13 +11,13 @@ namespace Recombee.ApiClient.ApiRequests { - /// Recommend items to item - /// Recommends set of items that are somehow related to one given item, *X*. Typical scenario is when user *A* is viewing *X*. Then you may display items to the user that he might be also interested in. Recommend items to item request gives you Top-N such items, optionally taking the target user *A* into account. - /// The returned items are sorted by relevance (first item being the most relevant). + /// Recommend Items to Item + /// Recommends a set of items that are somehow related to one given item, *X*. A typical scenario is when the user *A* is viewing *X*. Then you may display items to the user that he might also be interested in. Recommend items to item request gives you Top-N such items, optionally taking the target user *A* into account. + /// The returned items are sorted by relevance (the first item being the most relevant). /// Besides the recommended items, also a unique `recommId` is returned in the response. It can be used to: - /// - Let Recombee know that this recommendation was successful (e.g. user clicked one of the recommended items). See [Reported metrics](https://docs.recombee.com/admin_ui.html#reported-metrics). + /// - Let Recombee know that this recommendation was successful (e.g., user clicked one of the recommended items). See [Reported metrics](https://docs.recombee.com/admin_ui.html#reported-metrics). /// - Get subsequent recommended items when the user scrolls down (*infinite scroll*) or goes to the next page. See [Recommend Next Items](https://docs.recombee.com/api.html#recommend-next-items). - /// It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters. + /// It is also possible to use POST HTTP method (for example in the case of a very long ReQL filter) - query parameters then become body parameters. /// public class RecommendItemsToItem : Request { @@ -34,13 +34,13 @@ public string ItemId /// * Allows the calculation of Actions and Conversions /// in the graphical user interface, /// as Recombee can pair the user who got recommendations - /// and who afterwards viewed/purchased an item. + /// and who afterward viewed/purchased an item. /// If you insist on not specifying the user, pass `null` - /// (`None`, `nil`, `NULL` etc. depending on language) to *targetUserId*. + /// (`None`, `nil`, `NULL` etc., depending on the language) to *targetUserId*. /// Do not create some special dummy user for getting recommendations, /// as it could mislead the recommendation models, /// and result in wrong recommendations. - /// For anonymous/unregistered users it is possible to use for example their session ID. + /// For anonymous/unregistered users, it is possible to use, for example, their session ID. /// public string TargetUserId { @@ -53,22 +53,22 @@ public long Count get {return count;} } private readonly string scenario; - /// Scenario defines a particular application of recommendations. It can be for example "homepage", "cart" or "emailing". - /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see performance of each scenario in the Admin UI separately, so you can check how well each application performs. - /// The AI which optimizes models in order to get the best results may optimize different scenarios separately, or even use different models in each of the scenarios. + /// Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing". + /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs. + /// The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios. /// public string Scenario { get {return scenario;} } private readonly bool? cascadeCreate; - /// If item of given *itemId* or user of given *targetUserId* doesn't exist in the database, it creates the missing entity/entities and returns some (non-personalized) recommendations. This allows for example rotations in the following recommendations for the user of given *targetUserId*, as the user will be already known to the system. + /// If an item of the given *itemId* or user of the given *targetUserId* doesn't exist in the database, it creates the missing entity/entities and returns some (non-personalized) recommendations. This allows, for example, rotations in the following recommendations for the user of the given *targetUserId*, as the user will be already known to the system. public bool? CascadeCreate { get {return cascadeCreate;} } private readonly bool? returnProperties; - /// With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used for easy displaying of the recommended items to the user. + /// With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended items to the user. /// Example response: /// ``` /// { @@ -103,7 +103,7 @@ public bool? ReturnProperties get {return returnProperties;} } private readonly string[] includedProperties; - /// Allows to specify, which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. + /// Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. /// Example response for `includedProperties=description,price`: /// ``` /// { @@ -134,61 +134,61 @@ public string[] IncludedProperties get {return includedProperties;} } private readonly string filter; - /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended items based on the values of their attributes. - /// Filters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter recommended items based on the values of their attributes. + /// Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// public string Filter { get {return filter;} } private readonly string booster; - /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some items based on the values of their attributes. - /// Boosters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to boost the recommendation rate of some items based on the values of their attributes. + /// Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// public string Booster { get {return booster;} } private readonly Logic logic; - /// Logic specifies particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. - /// See [this section](https://docs.recombee.com/recommendation_logics.html) for list of available logics and other details. + /// Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. + /// See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details. /// The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users. - /// Logic can be also set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// public Logic Logic { get {return logic;} } private readonly double? userImpact; - /// **Expert option** If *targetUserId* parameter is present, the recommendations are biased towards the given user. Using *userImpact*, you may control this bias. For an extreme case of `userImpact=0.0`, the interactions made by the user are not taken into account at all (with the exception of history-based blacklisting), for `userImpact=1.0`, you'll get user-based recommendation. The default value is `0`. + /// **Expert option** If *targetUserId* parameter is present, the recommendations are biased towards the given user. Using *userImpact*, you may control this bias. For an extreme case of `userImpact=0.0`, the interactions made by the user are not taken into account at all (with the exception of history-based blacklisting), for `userImpact=1.0`, you'll get a user-based recommendation. The default value is `0`. /// public double? UserImpact { get {return userImpact;} } private readonly double? diversity; - /// **Expert option** Real number from [0.0, 1.0] which determines how much mutually dissimilar should the recommended items be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification. + /// **Expert option** Real number from [0.0, 1.0], which determines how mutually dissimilar the recommended items should be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification. /// public double? Diversity { get {return diversity;} } private readonly string minRelevance; - /// **Expert option** If the *targetUserId* is provided: Specifies the threshold of how much relevant must the recommended items be to the user. Possible values one of: "low", "medium", "high". The default value is "low", meaning that the system attempts to recommend number of items equal to *count* at any cost. If there are not enough data (such as interactions or item properties), this may even lead to bestseller-based recommendations to be appended to reach the full *count*. This behavior may be suppressed by using "medium" or "high" values. In such case, the system only recommends items of at least the requested relevance, and may return less than *count* items when there is not enough data to fulfill it. + /// **Expert option** If the *targetUserId* is provided: Specifies the threshold of how relevant must the recommended items be to the user. Possible values one of: "low", "medium", "high". The default value is "low", meaning that the system attempts to recommend a number of items equal to *count* at any cost. If there is not enough data (such as interactions or item properties), this may even lead to bestseller-based recommendations being appended to reach the full *count*. This behavior may be suppressed by using "medium" or "high" values. In such case, the system only recommends items of at least the requested relevance and may return less than *count* items when there is not enough data to fulfill it. /// public string MinRelevance { get {return minRelevance;} } private readonly double? rotationRate; - /// **Expert option** If the *targetUserId* is provided: If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per-request in backward fashion. You may penalize an item for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example `rotationRate=0.2` for only slight rotation of recommended items. + /// **Expert option** If the *targetUserId* is provided: If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per request in a backward fashion. You may penalize an item for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example, `rotationRate=0.2` for only slight rotation of recommended items. /// public double? RotationRate { get {return rotationRate;} } private readonly double? rotationTime; - /// **Expert option** If the *targetUserId* is provided: Taking *rotationRate* into account, specifies how long time it takes to an item to recover from the penalization. For example, `rotationTime=7200.0` means that items recommended less than 2 hours ago are penalized. + /// **Expert option** If the *targetUserId* is provided: Taking *rotationRate* into account, specifies how long it takes for an item to recover from the penalization. For example, `rotationTime=7200.0` means that items recommended less than 2 hours ago are penalized. /// public double? RotationTime { @@ -202,7 +202,7 @@ public Dictionary ExpertSettings get {return expertSettings;} } private readonly bool? returnAbGroup; - /// If there is a custom AB-testing running, return name of group to which the request belongs. + /// If there is a custom AB-testing running, return the name of the group to which the request belongs. /// public bool? ReturnAbGroup { @@ -217,21 +217,21 @@ public bool? ReturnAbGroup /// * Allows the calculation of Actions and Conversions /// in the graphical user interface, /// as Recombee can pair the user who got recommendations - /// and who afterwards viewed/purchased an item. + /// and who afterward viewed/purchased an item. /// If you insist on not specifying the user, pass `null` - /// (`None`, `nil`, `NULL` etc. depending on language) to *targetUserId*. + /// (`None`, `nil`, `NULL` etc., depending on the language) to *targetUserId*. /// Do not create some special dummy user for getting recommendations, /// as it could mislead the recommendation models, /// and result in wrong recommendations. - /// For anonymous/unregistered users it is possible to use for example their session ID. + /// For anonymous/unregistered users, it is possible to use, for example, their session ID. /// /// Number of items to be recommended (N for the top-N recommendation). - /// Scenario defines a particular application of recommendations. It can be for example "homepage", "cart" or "emailing". - /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see performance of each scenario in the Admin UI separately, so you can check how well each application performs. - /// The AI which optimizes models in order to get the best results may optimize different scenarios separately, or even use different models in each of the scenarios. + /// Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing". + /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs. + /// The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios. /// - /// If item of given *itemId* or user of given *targetUserId* doesn't exist in the database, it creates the missing entity/entities and returns some (non-personalized) recommendations. This allows for example rotations in the following recommendations for the user of given *targetUserId*, as the user will be already known to the system. - /// With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used for easy displaying of the recommended items to the user. + /// If an item of the given *itemId* or user of the given *targetUserId* doesn't exist in the database, it creates the missing entity/entities and returns some (non-personalized) recommendations. This allows, for example, rotations in the following recommendations for the user of the given *targetUserId*, as the user will be already known to the system. + /// With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended items to the user. /// Example response: /// ``` /// { @@ -261,7 +261,7 @@ public bool? ReturnAbGroup /// } /// ``` /// - /// Allows to specify, which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. + /// Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. /// Example response for `includedProperties=description,price`: /// ``` /// { @@ -287,30 +287,30 @@ public bool? ReturnAbGroup /// } /// ``` /// - /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended items based on the values of their attributes. - /// Filters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter recommended items based on the values of their attributes. + /// Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// - /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some items based on the values of their attributes. - /// Boosters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to boost the recommendation rate of some items based on the values of their attributes. + /// Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// - /// Logic specifies particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. - /// See [this section](https://docs.recombee.com/recommendation_logics.html) for list of available logics and other details. + /// Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. + /// See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details. /// The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users. - /// Logic can be also set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// - /// **Expert option** If *targetUserId* parameter is present, the recommendations are biased towards the given user. Using *userImpact*, you may control this bias. For an extreme case of `userImpact=0.0`, the interactions made by the user are not taken into account at all (with the exception of history-based blacklisting), for `userImpact=1.0`, you'll get user-based recommendation. The default value is `0`. + /// **Expert option** If *targetUserId* parameter is present, the recommendations are biased towards the given user. Using *userImpact*, you may control this bias. For an extreme case of `userImpact=0.0`, the interactions made by the user are not taken into account at all (with the exception of history-based blacklisting), for `userImpact=1.0`, you'll get a user-based recommendation. The default value is `0`. /// - /// **Expert option** Real number from [0.0, 1.0] which determines how much mutually dissimilar should the recommended items be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification. + /// **Expert option** Real number from [0.0, 1.0], which determines how mutually dissimilar the recommended items should be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification. /// - /// **Expert option** If the *targetUserId* is provided: Specifies the threshold of how much relevant must the recommended items be to the user. Possible values one of: "low", "medium", "high". The default value is "low", meaning that the system attempts to recommend number of items equal to *count* at any cost. If there are not enough data (such as interactions or item properties), this may even lead to bestseller-based recommendations to be appended to reach the full *count*. This behavior may be suppressed by using "medium" or "high" values. In such case, the system only recommends items of at least the requested relevance, and may return less than *count* items when there is not enough data to fulfill it. + /// **Expert option** If the *targetUserId* is provided: Specifies the threshold of how relevant must the recommended items be to the user. Possible values one of: "low", "medium", "high". The default value is "low", meaning that the system attempts to recommend a number of items equal to *count* at any cost. If there is not enough data (such as interactions or item properties), this may even lead to bestseller-based recommendations being appended to reach the full *count*. This behavior may be suppressed by using "medium" or "high" values. In such case, the system only recommends items of at least the requested relevance and may return less than *count* items when there is not enough data to fulfill it. /// - /// **Expert option** If the *targetUserId* is provided: If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per-request in backward fashion. You may penalize an item for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example `rotationRate=0.2` for only slight rotation of recommended items. + /// **Expert option** If the *targetUserId* is provided: If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per request in a backward fashion. You may penalize an item for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example, `rotationRate=0.2` for only slight rotation of recommended items. /// - /// **Expert option** If the *targetUserId* is provided: Taking *rotationRate* into account, specifies how long time it takes to an item to recover from the penalization. For example, `rotationTime=7200.0` means that items recommended less than 2 hours ago are penalized. + /// **Expert option** If the *targetUserId* is provided: Taking *rotationRate* into account, specifies how long it takes for an item to recover from the penalization. For example, `rotationTime=7200.0` means that items recommended less than 2 hours ago are penalized. /// /// Dictionary of custom options. /// - /// If there is a custom AB-testing running, return name of group to which the request belongs. + /// If there is a custom AB-testing running, return the name of the group to which the request belongs. /// public RecommendItemsToItem (string itemId, string targetUserId, long count, string scenario = null, bool? cascadeCreate = null, bool? returnProperties = null, string[] includedProperties = null, string filter = null, string booster = null, Logic logic = null, double? userImpact = null, double? diversity = null, string minRelevance = null, double? rotationRate = null, double? rotationTime = null, Dictionary expertSettings = null, bool? returnAbGroup = null): base(HttpMethod.Post, 3000) { diff --git a/Src/Recombee.ApiClient/ApiRequests/RecommendItemsToUser.cs b/Src/Recombee.ApiClient/ApiRequests/RecommendItemsToUser.cs index bed4db4..c2cb7e5 100644 --- a/Src/Recombee.ApiClient/ApiRequests/RecommendItemsToUser.cs +++ b/Src/Recombee.ApiClient/ApiRequests/RecommendItemsToUser.cs @@ -11,14 +11,14 @@ namespace Recombee.ApiClient.ApiRequests { - /// Recommend items to user - /// Based on user's past interactions (purchases, ratings, etc.) with the items, recommends top-N items that are most likely to be of high value for a given user. - /// The most typical use cases are recommendations at homepage, in some "Picked just for you" section or in email. - /// The returned items are sorted by relevance (first item being the most relevant). + /// Recommend Items to User + /// Based on the user's past interactions (purchases, ratings, etc.) with the items, recommends top-N items that are most likely to be of high value for the given user. + /// The most typical use cases are recommendations on the homepage, in some "Picked just for you" section, or in email. + /// The returned items are sorted by relevance (the first item being the most relevant). /// Besides the recommended items, also a unique `recommId` is returned in the response. It can be used to: - /// - Let Recombee know that this recommendation was successful (e.g. user clicked one of the recommended items). See [Reported metrics](https://docs.recombee.com/admin_ui.html#reported-metrics). + /// - Let Recombee know that this recommendation was successful (e.g., user clicked one of the recommended items). See [Reported metrics](https://docs.recombee.com/admin_ui.html#reported-metrics). /// - Get subsequent recommended items when the user scrolls down (*infinite scroll*) or goes to the next page. See [Recommend Next Items](https://docs.recombee.com/api.html#recommend-next-items). - /// It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters. + /// It is also possible to use POST HTTP method (for example in the case of a very long ReQL filter) - query parameters then become body parameters. /// public class RecommendItemsToUser : Request { @@ -36,23 +36,23 @@ public long Count get {return count;} } private readonly string scenario; - /// Scenario defines a particular application of recommendations. It can be for example "homepage", "cart" or "emailing". - /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see performance of each scenario in the Admin UI separately, so you can check how well each application performs. - /// The AI which optimizes models in order to get the best results may optimize different scenarios separately, or even use different models in each of the scenarios. + /// Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing". + /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs. + /// The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios. /// public string Scenario { get {return scenario;} } private readonly bool? cascadeCreate; - /// If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows for example rotations in the following recommendations for that user, as the user will be already known to the system. + /// If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows, for example, rotations in the following recommendations for that user, as the user will be already known to the system. /// public bool? CascadeCreate { get {return cascadeCreate;} } private readonly bool? returnProperties; - /// With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used for easy displaying of the recommended items to the user. + /// With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended items to the user. /// Example response: /// ``` /// { @@ -87,7 +87,7 @@ public bool? ReturnProperties get {return returnProperties;} } private readonly string[] includedProperties; - /// Allows to specify, which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. + /// Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. /// Example response for `includedProperties=description,price`: /// ``` /// { @@ -118,54 +118,54 @@ public string[] IncludedProperties get {return includedProperties;} } private readonly string filter; - /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended items based on the values of their attributes. - /// Filters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter recommended items based on the values of their attributes. + /// Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// public string Filter { get {return filter;} } private readonly string booster; - /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some items based on the values of their attributes. - /// Boosters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to boost the recommendation rate of some items based on the values of their attributes. + /// Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// public string Booster { get {return booster;} } private readonly Logic logic; - /// Logic specifies particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. - /// See [this section](https://docs.recombee.com/recommendation_logics.html) for list of available logics and other details. + /// Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. + /// See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details. /// The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users. - /// Logic can be also set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// public Logic Logic { get {return logic;} } private readonly double? diversity; - /// **Expert option** Real number from [0.0, 1.0] which determines how much mutually dissimilar should the recommended items be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification. + /// **Expert option** Real number from [0.0, 1.0], which determines how mutually dissimilar the recommended items should be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification. /// public double? Diversity { get {return diversity;} } private readonly string minRelevance; - /// **Expert option** Specifies the threshold of how much relevant must the recommended items be to the user. Possible values one of: "low", "medium", "high". The default value is "low", meaning that the system attempts to recommend number of items equal to *count* at any cost. If there are not enough data (such as interactions or item properties), this may even lead to bestseller-based recommendations to be appended to reach the full *count*. This behavior may be suppressed by using "medium" or "high" values. In such case, the system only recommends items of at least the requested relevance, and may return less than *count* items when there is not enough data to fulfill it. + /// **Expert option** Specifies the threshold of how relevant must the recommended items be to the user. Possible values one of: "low", "medium", "high". The default value is "low", meaning that the system attempts to recommend a number of items equal to *count* at any cost. If there is not enough data (such as interactions or item properties), this may even lead to bestseller-based recommendations to be appended to reach the full *count*. This behavior may be suppressed by using "medium" or "high" values. In such a case, the system only recommends items of at least the requested relevance and may return less than *count* items when there is not enough data to fulfill it. /// public string MinRelevance { get {return minRelevance;} } private readonly double? rotationRate; - /// **Expert option** If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per-request in backward fashion. You may penalize an item for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example `rotationRate=0.2` for only slight rotation of recommended items. Default: `0`. + /// **Expert option** If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per request in a backward fashion. You may penalize an item for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example, `rotationRate=0.2` for only slight rotation of recommended items. Default: `0`. /// public double? RotationRate { get {return rotationRate;} } private readonly double? rotationTime; - /// **Expert option** Taking *rotationRate* into account, specifies how long time it takes to an item to recover from the penalization. For example, `rotationTime=7200.0` means that items recommended less than 2 hours ago are penalized. Default: `7200.0`. + /// **Expert option** Taking *rotationRate* into account, specifies how long it takes for an item to recover from the penalization. For example, `rotationTime=7200.0` means that items recommended less than 2 hours ago are penalized. Default: `7200.0`. /// public double? RotationTime { @@ -179,7 +179,7 @@ public Dictionary ExpertSettings get {return expertSettings;} } private readonly bool? returnAbGroup; - /// If there is a custom AB-testing running, return name of group to which the request belongs. + /// If there is a custom AB-testing running, return the name of the group to which the request belongs. /// public bool? ReturnAbGroup { @@ -190,13 +190,13 @@ public bool? ReturnAbGroup /// ID of the user for whom personalized recommendations are to be generated. /// Number of items to be recommended (N for the top-N recommendation). /// - /// Scenario defines a particular application of recommendations. It can be for example "homepage", "cart" or "emailing". - /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see performance of each scenario in the Admin UI separately, so you can check how well each application performs. - /// The AI which optimizes models in order to get the best results may optimize different scenarios separately, or even use different models in each of the scenarios. + /// Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing". + /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs. + /// The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios. /// - /// If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows for example rotations in the following recommendations for that user, as the user will be already known to the system. + /// If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows, for example, rotations in the following recommendations for that user, as the user will be already known to the system. /// - /// With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used for easy displaying of the recommended items to the user. + /// With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended items to the user. /// Example response: /// ``` /// { @@ -226,7 +226,7 @@ public bool? ReturnAbGroup /// } /// ``` /// - /// Allows to specify, which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. + /// Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. /// Example response for `includedProperties=description,price`: /// ``` /// { @@ -252,28 +252,28 @@ public bool? ReturnAbGroup /// } /// ``` /// - /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended items based on the values of their attributes. - /// Filters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter recommended items based on the values of their attributes. + /// Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// - /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some items based on the values of their attributes. - /// Boosters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to boost the recommendation rate of some items based on the values of their attributes. + /// Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// - /// Logic specifies particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. - /// See [this section](https://docs.recombee.com/recommendation_logics.html) for list of available logics and other details. + /// Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. + /// See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details. /// The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users. - /// Logic can be also set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// - /// **Expert option** Real number from [0.0, 1.0] which determines how much mutually dissimilar should the recommended items be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification. + /// **Expert option** Real number from [0.0, 1.0], which determines how mutually dissimilar the recommended items should be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification. /// - /// **Expert option** Specifies the threshold of how much relevant must the recommended items be to the user. Possible values one of: "low", "medium", "high". The default value is "low", meaning that the system attempts to recommend number of items equal to *count* at any cost. If there are not enough data (such as interactions or item properties), this may even lead to bestseller-based recommendations to be appended to reach the full *count*. This behavior may be suppressed by using "medium" or "high" values. In such case, the system only recommends items of at least the requested relevance, and may return less than *count* items when there is not enough data to fulfill it. + /// **Expert option** Specifies the threshold of how relevant must the recommended items be to the user. Possible values one of: "low", "medium", "high". The default value is "low", meaning that the system attempts to recommend a number of items equal to *count* at any cost. If there is not enough data (such as interactions or item properties), this may even lead to bestseller-based recommendations to be appended to reach the full *count*. This behavior may be suppressed by using "medium" or "high" values. In such a case, the system only recommends items of at least the requested relevance and may return less than *count* items when there is not enough data to fulfill it. /// - /// **Expert option** If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per-request in backward fashion. You may penalize an item for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example `rotationRate=0.2` for only slight rotation of recommended items. Default: `0`. + /// **Expert option** If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per request in a backward fashion. You may penalize an item for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example, `rotationRate=0.2` for only slight rotation of recommended items. Default: `0`. /// - /// **Expert option** Taking *rotationRate* into account, specifies how long time it takes to an item to recover from the penalization. For example, `rotationTime=7200.0` means that items recommended less than 2 hours ago are penalized. Default: `7200.0`. + /// **Expert option** Taking *rotationRate* into account, specifies how long it takes for an item to recover from the penalization. For example, `rotationTime=7200.0` means that items recommended less than 2 hours ago are penalized. Default: `7200.0`. /// /// Dictionary of custom options. /// - /// If there is a custom AB-testing running, return name of group to which the request belongs. + /// If there is a custom AB-testing running, return the name of the group to which the request belongs. /// public RecommendItemsToUser (string userId, long count, string scenario = null, bool? cascadeCreate = null, bool? returnProperties = null, string[] includedProperties = null, string filter = null, string booster = null, Logic logic = null, double? diversity = null, string minRelevance = null, double? rotationRate = null, double? rotationTime = null, Dictionary expertSettings = null, bool? returnAbGroup = null): base(HttpMethod.Post, 3000) { diff --git a/Src/Recombee.ApiClient/ApiRequests/RecommendNextItems.cs b/Src/Recombee.ApiClient/ApiRequests/RecommendNextItems.cs index f917a17..b29d213 100644 --- a/Src/Recombee.ApiClient/ApiRequests/RecommendNextItems.cs +++ b/Src/Recombee.ApiClient/ApiRequests/RecommendNextItems.cs @@ -11,9 +11,9 @@ namespace Recombee.ApiClient.ApiRequests { - /// Recommend next items - /// Returns items that shall be shown to a user as next recommendations when the user e.g. scrolls the page down (*infinite scroll*) or goes to a next page. - /// It accepts `recommId` of a base recommendation request (e.g. request from the first page) and number of items that shall be returned (`count`). + /// Recommend Next Items + /// Returns items that shall be shown to a user as next recommendations when the user e.g. scrolls the page down (*infinite scroll*) or goes to the next page. + /// It accepts `recommId` of a base recommendation request (e.g., request from the first page) and the number of items that shall be returned (`count`). /// The base request can be one of: /// - [Recommend items to item](https://docs.recombee.com/api.html#recommend-items-to-item) /// - [Recommend items to user](https://docs.recombee.com/api.html#recommend-items-to-user) diff --git a/Src/Recombee.ApiClient/ApiRequests/RecommendUsersToItem.cs b/Src/Recombee.ApiClient/ApiRequests/RecommendUsersToItem.cs index 1a1f226..d17a456 100644 --- a/Src/Recombee.ApiClient/ApiRequests/RecommendUsersToItem.cs +++ b/Src/Recombee.ApiClient/ApiRequests/RecommendUsersToItem.cs @@ -11,10 +11,10 @@ namespace Recombee.ApiClient.ApiRequests { - /// Recommend users to item - /// Recommend users that are likely to be interested in a given item. - /// It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters. - /// The returned users are sorted by predicted interest in the item (first user being the most interested). + /// Recommend Users to Item + /// Recommends users that are likely to be interested in the given item. + /// It is also possible to use POST HTTP method (for example in the case of a very long ReQL filter) - query parameters then become body parameters. + /// The returned users are sorted by predicted interest in the item (the first user being the most interested). /// public class RecommendUsersToItem : Request { @@ -31,22 +31,22 @@ public long Count get {return count;} } private readonly string scenario; - /// Scenario defines a particular application of recommendations. It can be for example "homepage", "cart" or "emailing". - /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see performance of each scenario in the Admin UI separately, so you can check how well each application performs. - /// The AI which optimizes models in order to get the best results may optimize different scenarios separately, or even use different models in each of the scenarios. + /// Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing". + /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs. + /// The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios. /// public string Scenario { get {return scenario;} } private readonly bool? cascadeCreate; - /// If item of given *itemId* doesn't exist in the database, it creates the missing item. + /// If an item of the given *itemId* doesn't exist in the database, it creates the missing item. public bool? CascadeCreate { get {return cascadeCreate;} } private readonly bool? returnProperties; - /// With `returnProperties=true`, property values of the recommended users are returned along with their IDs in a JSON dictionary. The acquired property values can be used for easy displaying the recommended users. + /// With `returnProperties=true`, property values of the recommended users are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended users. /// Example response: /// ``` /// { @@ -77,7 +77,7 @@ public bool? ReturnProperties get {return returnProperties;} } private readonly string[] includedProperties; - /// Allows to specify, which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. + /// Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. /// Example response for `includedProperties=country`: /// ``` /// { @@ -106,33 +106,33 @@ public string[] IncludedProperties get {return includedProperties;} } private readonly string filter; - /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended items based on the values of their attributes. - /// Filters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter recommended items based on the values of their attributes. + /// Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// public string Filter { get {return filter;} } private readonly string booster; - /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some items based on the values of their attributes. - /// Boosters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to boost the recommendation rate of some items based on the values of their attributes. + /// Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// public string Booster { get {return booster;} } private readonly Logic logic; - /// Logic specifies particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. - /// See [this section](https://docs.recombee.com/recommendation_logics.html) for list of available logics and other details. + /// Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. + /// See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details. /// The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users. - /// Logic can be also set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// public Logic Logic { get {return logic;} } private readonly double? diversity; - /// **Expert option** Real number from [0.0, 1.0] which determines how much mutually dissimilar should the recommended items be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification. + /// **Expert option** Real number from [0.0, 1.0], which determines how mutually dissimilar the recommended items should be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification. /// public double? Diversity { @@ -146,7 +146,7 @@ public Dictionary ExpertSettings get {return expertSettings;} } private readonly bool? returnAbGroup; - /// If there is a custom AB-testing running, return name of group to which the request belongs. + /// If there is a custom AB-testing running, return the name of the group to which the request belongs. /// public bool? ReturnAbGroup { @@ -156,12 +156,12 @@ public bool? ReturnAbGroup /// Construct the request /// ID of the item for which the recommendations are to be generated. /// Number of items to be recommended (N for the top-N recommendation). - /// Scenario defines a particular application of recommendations. It can be for example "homepage", "cart" or "emailing". - /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see performance of each scenario in the Admin UI separately, so you can check how well each application performs. - /// The AI which optimizes models in order to get the best results may optimize different scenarios separately, or even use different models in each of the scenarios. + /// Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing". + /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs. + /// The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios. /// - /// If item of given *itemId* doesn't exist in the database, it creates the missing item. - /// With `returnProperties=true`, property values of the recommended users are returned along with their IDs in a JSON dictionary. The acquired property values can be used for easy displaying the recommended users. + /// If an item of the given *itemId* doesn't exist in the database, it creates the missing item. + /// With `returnProperties=true`, property values of the recommended users are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended users. /// Example response: /// ``` /// { @@ -187,7 +187,7 @@ public bool? ReturnAbGroup /// } /// ``` /// - /// Allows to specify, which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. + /// Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. /// Example response for `includedProperties=country`: /// ``` /// { @@ -211,22 +211,22 @@ public bool? ReturnAbGroup /// } /// ``` /// - /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended items based on the values of their attributes. - /// Filters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter recommended items based on the values of their attributes. + /// Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// - /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some items based on the values of their attributes. - /// Boosters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to boost the recommendation rate of some items based on the values of their attributes. + /// Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// - /// Logic specifies particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. - /// See [this section](https://docs.recombee.com/recommendation_logics.html) for list of available logics and other details. + /// Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. + /// See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details. /// The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users. - /// Logic can be also set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// - /// **Expert option** Real number from [0.0, 1.0] which determines how much mutually dissimilar should the recommended items be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification. + /// **Expert option** Real number from [0.0, 1.0], which determines how mutually dissimilar the recommended items should be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification. /// /// Dictionary of custom options. /// - /// If there is a custom AB-testing running, return name of group to which the request belongs. + /// If there is a custom AB-testing running, return the name of the group to which the request belongs. /// public RecommendUsersToItem (string itemId, long count, string scenario = null, bool? cascadeCreate = null, bool? returnProperties = null, string[] includedProperties = null, string filter = null, string booster = null, Logic logic = null, double? diversity = null, Dictionary expertSettings = null, bool? returnAbGroup = null): base(HttpMethod.Post, 50000) { diff --git a/Src/Recombee.ApiClient/ApiRequests/RecommendUsersToUser.cs b/Src/Recombee.ApiClient/ApiRequests/RecommendUsersToUser.cs index df5d339..a4d87ff 100644 --- a/Src/Recombee.ApiClient/ApiRequests/RecommendUsersToUser.cs +++ b/Src/Recombee.ApiClient/ApiRequests/RecommendUsersToUser.cs @@ -11,10 +11,10 @@ namespace Recombee.ApiClient.ApiRequests { - /// Recommend users to user - /// Get similar users as some given user, based on the user's past interactions (purchases, ratings, etc.) and values of properties. - /// It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters. - /// The returned users are sorted by similarity (first user being the most similar). + /// Recommend Users to User + /// Gets users similar to the given user, based on the user's past interactions (purchases, ratings, etc.) and values of properties. + /// It is also possible to use POST HTTP method (for example in the case of a very long ReQL filter) - query parameters then become body parameters. + /// The returned users are sorted by similarity (the first user being the most similar). /// public class RecommendUsersToUser : Request { @@ -31,22 +31,22 @@ public long Count get {return count;} } private readonly string scenario; - /// Scenario defines a particular application of recommendations. It can be for example "homepage", "cart" or "emailing". - /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see performance of each scenario in the Admin UI separately, so you can check how well each application performs. - /// The AI which optimizes models in order to get the best results may optimize different scenarios separately, or even use different models in each of the scenarios. + /// Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing". + /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs. + /// The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios. /// public string Scenario { get {return scenario;} } private readonly bool? cascadeCreate; - /// If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows for example rotations in the following recommendations for that user, as the user will be already known to the system. + /// If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows, for example, rotations in the following recommendations for that user, as the user will be already known to the system. public bool? CascadeCreate { get {return cascadeCreate;} } private readonly bool? returnProperties; - /// With `returnProperties=true`, property values of the recommended users are returned along with their IDs in a JSON dictionary. The acquired property values can be used for easy displaying the recommended users. + /// With `returnProperties=true`, property values of the recommended users are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended users. /// Example response: /// ``` /// { @@ -77,7 +77,7 @@ public bool? ReturnProperties get {return returnProperties;} } private readonly string[] includedProperties; - /// Allows to specify, which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. + /// Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. /// Example response for `includedProperties=country`: /// ``` /// { @@ -106,54 +106,54 @@ public string[] IncludedProperties get {return includedProperties;} } private readonly string filter; - /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended items based on the values of their attributes. - /// Filters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter recommended items based on the values of their attributes. + /// Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// public string Filter { get {return filter;} } private readonly string booster; - /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some items based on the values of their attributes. - /// Boosters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to boost the recommendation rate of some items based on the values of their attributes. + /// Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// public string Booster { get {return booster;} } private readonly Logic logic; - /// Logic specifies particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. - /// See [this section](https://docs.recombee.com/recommendation_logics.html) for list of available logics and other details. + /// Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. + /// See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details. /// The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users. - /// Logic can be also set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// public Logic Logic { get {return logic;} } private readonly double? diversity; - /// **Expert option** Real number from [0.0, 1.0] which determines how much mutually dissimilar should the recommended users be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification. + /// **Expert option** Real number from [0.0, 1.0], which determines how mutually dissimilar the recommended users should be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification. /// public double? Diversity { get {return diversity;} } private readonly string minRelevance; - /// **Expert option** Specifies the threshold of how much relevant must the recommended users be. Possible values one of: "low", "medium", "high". + /// **Expert option** Specifies the threshold of how relevant must the recommended users be. Possible values one of: "low", "medium", "high". /// public string MinRelevance { get {return minRelevance;} } private readonly double? rotationRate; - /// **Expert option** If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per-request in backward fashion. You may penalize an user for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example `rotationRate=0.2` for only slight rotation of recommended users. + /// **Expert option** If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per request in a backward fashion. You may penalize a user for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example, `rotationRate=0.2` for only slight rotation of recommended users. /// public double? RotationRate { get {return rotationRate;} } private readonly double? rotationTime; - /// **Expert option** Taking *rotationRate* into account, specifies how long time it takes to an user to recover from the penalization. For example, `rotationTime=7200.0` means that users recommended less than 2 hours ago are penalized. + /// **Expert option** Taking *rotationRate* into account, specifies how long it takes for a user to recover from the penalization. For example, `rotationTime=7200.0` means that users recommended less than 2 hours ago are penalized. /// public double? RotationTime { @@ -167,7 +167,7 @@ public Dictionary ExpertSettings get {return expertSettings;} } private readonly bool? returnAbGroup; - /// If there is a custom AB-testing running, return name of group to which the request belongs. + /// If there is a custom AB-testing running, return the name of the group to which the request belongs. /// public bool? ReturnAbGroup { @@ -177,12 +177,12 @@ public bool? ReturnAbGroup /// Construct the request /// User to whom we find similar users /// Number of users to be recommended (N for the top-N recommendation). - /// Scenario defines a particular application of recommendations. It can be for example "homepage", "cart" or "emailing". - /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see performance of each scenario in the Admin UI separately, so you can check how well each application performs. - /// The AI which optimizes models in order to get the best results may optimize different scenarios separately, or even use different models in each of the scenarios. + /// Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing". + /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs. + /// The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios. /// - /// If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows for example rotations in the following recommendations for that user, as the user will be already known to the system. - /// With `returnProperties=true`, property values of the recommended users are returned along with their IDs in a JSON dictionary. The acquired property values can be used for easy displaying the recommended users. + /// If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows, for example, rotations in the following recommendations for that user, as the user will be already known to the system. + /// With `returnProperties=true`, property values of the recommended users are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended users. /// Example response: /// ``` /// { @@ -208,7 +208,7 @@ public bool? ReturnAbGroup /// } /// ``` /// - /// Allows to specify, which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. + /// Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. /// Example response for `includedProperties=country`: /// ``` /// { @@ -232,28 +232,28 @@ public bool? ReturnAbGroup /// } /// ``` /// - /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended items based on the values of their attributes. - /// Filters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter recommended items based on the values of their attributes. + /// Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// - /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some items based on the values of their attributes. - /// Boosters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to boost the recommendation rate of some items based on the values of their attributes. + /// Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// - /// Logic specifies particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. - /// See [this section](https://docs.recombee.com/recommendation_logics.html) for list of available logics and other details. + /// Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. + /// See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details. /// The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users. - /// Logic can be also set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// - /// **Expert option** Real number from [0.0, 1.0] which determines how much mutually dissimilar should the recommended users be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification. + /// **Expert option** Real number from [0.0, 1.0], which determines how mutually dissimilar the recommended users should be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification. /// - /// **Expert option** Specifies the threshold of how much relevant must the recommended users be. Possible values one of: "low", "medium", "high". + /// **Expert option** Specifies the threshold of how relevant must the recommended users be. Possible values one of: "low", "medium", "high". /// - /// **Expert option** If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per-request in backward fashion. You may penalize an user for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example `rotationRate=0.2` for only slight rotation of recommended users. + /// **Expert option** If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per request in a backward fashion. You may penalize a user for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example, `rotationRate=0.2` for only slight rotation of recommended users. /// - /// **Expert option** Taking *rotationRate* into account, specifies how long time it takes to an user to recover from the penalization. For example, `rotationTime=7200.0` means that users recommended less than 2 hours ago are penalized. + /// **Expert option** Taking *rotationRate* into account, specifies how long it takes for a user to recover from the penalization. For example, `rotationTime=7200.0` means that users recommended less than 2 hours ago are penalized. /// /// Dictionary of custom options. /// - /// If there is a custom AB-testing running, return name of group to which the request belongs. + /// If there is a custom AB-testing running, return the name of the group to which the request belongs. /// public RecommendUsersToUser (string userId, long count, string scenario = null, bool? cascadeCreate = null, bool? returnProperties = null, string[] includedProperties = null, string filter = null, string booster = null, Logic logic = null, double? diversity = null, string minRelevance = null, double? rotationRate = null, double? rotationTime = null, Dictionary expertSettings = null, bool? returnAbGroup = null): base(HttpMethod.Post, 50000) { diff --git a/Src/Recombee.ApiClient/ApiRequests/RemoveFromGroup.cs b/Src/Recombee.ApiClient/ApiRequests/RemoveFromGroup.cs index 8870120..35558b3 100644 --- a/Src/Recombee.ApiClient/ApiRequests/RemoveFromGroup.cs +++ b/Src/Recombee.ApiClient/ApiRequests/RemoveFromGroup.cs @@ -11,7 +11,7 @@ namespace Recombee.ApiClient.ApiRequests { - /// Remove from group + /// Remove from Group /// Removes an existing group item from the group. public class RemoveFromGroup : Request { diff --git a/Src/Recombee.ApiClient/ApiRequests/RemoveFromSeries.cs b/Src/Recombee.ApiClient/ApiRequests/RemoveFromSeries.cs index 2cb1c39..8ef17a9 100644 --- a/Src/Recombee.ApiClient/ApiRequests/RemoveFromSeries.cs +++ b/Src/Recombee.ApiClient/ApiRequests/RemoveFromSeries.cs @@ -11,7 +11,7 @@ namespace Recombee.ApiClient.ApiRequests { - /// Remove from series + /// Remove from Series /// Removes an existing series item from the series. public class RemoveFromSeries : Request { diff --git a/Src/Recombee.ApiClient/ApiRequests/ResetDatabase.cs b/Src/Recombee.ApiClient/ApiRequests/ResetDatabase.cs index 9f8c2ca..8c27f42 100644 --- a/Src/Recombee.ApiClient/ApiRequests/ResetDatabase.cs +++ b/Src/Recombee.ApiClient/ApiRequests/ResetDatabase.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// Reset database - /// Completely erases all your data, including items, item properties, series, user database, purchases, ratings, detail views, and bookmarks. Make sure the request to be never executed in production environment! Resetting your database is irreversible. + /// Reset Database + /// Completely erases all your data, including items, item properties, series, user database, purchases, ratings, detail views, and bookmarks. Make sure the request is never executed in the production environment! Resetting your database is irreversible. /// public class ResetDatabase : Request { diff --git a/Src/Recombee.ApiClient/ApiRequests/SearchItemSegments.cs b/Src/Recombee.ApiClient/ApiRequests/SearchItemSegments.cs new file mode 100644 index 0000000..638c0fd --- /dev/null +++ b/Src/Recombee.ApiClient/ApiRequests/SearchItemSegments.cs @@ -0,0 +1,181 @@ +/* + This file is auto-generated, do not edit +*/ + +using System; +using System.Collections.Generic; +using System.Net.Http; +using Recombee.ApiClient.Bindings; +using Recombee.ApiClient.Util; + + +namespace Recombee.ApiClient.ApiRequests +{ + /// Search Item Segments + /// + /// Full-text personalized search that returns Segments from a Segmentation. The results are based on the provided `searchQuery` and also on the user's past interactions (purchases, ratings, etc.). + /// Based on the used Segmentation, this endpoint can be used for example for: + /// - Searching within categories or brands + /// - Searching within genres or artists + /// For example if the user is searching for "iPhone" this endpoint can return "cell phones" category. + /// You need to set the used Segmentation the Admin UI in the Scenario settings prior to using this endpoint. + /// The returned segments are sorted by relevance (first segment being the most relevant). + /// It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters. + /// + public class SearchItemSegments : Request + { + private readonly string userId; + /// ID of the user for whom personalized search will be performed. + public string UserId + { + get {return userId;} + } + private readonly string searchQuery; + /// Search query provided by the user. It is used for the full-text search. + public string SearchQuery + { + get {return searchQuery;} + } + private readonly long count; + /// Number of segments to be returned (N for the top-N results). + public long Count + { + get {return count;} + } + private readonly string scenario; + /// Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing". + /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs. + /// The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios. + /// + public string Scenario + { + get {return scenario;} + } + private readonly bool? cascadeCreate; + /// If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows, for example, rotations in the following recommendations for that user, as the user will be already known to the system. + /// + public bool? CascadeCreate + { + get {return cascadeCreate;} + } + private readonly string filter; + /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended segments based on the `segmentationId`. + /// + public string Filter + { + get {return filter;} + } + private readonly string booster; + /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some segments based on the `segmentationId`. + /// + public string Booster + { + get {return booster;} + } + private readonly Logic logic; + /// Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. + /// See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details. + /// The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users. + /// Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// + public Logic Logic + { + get {return logic;} + } + private readonly Dictionary expertSettings; + /// Dictionary of custom options. + /// + public Dictionary ExpertSettings + { + get {return expertSettings;} + } + private readonly bool? returnAbGroup; + /// If there is a custom AB-testing running, return the name of the group to which the request belongs. + /// + public bool? ReturnAbGroup + { + get {return returnAbGroup;} + } + + /// Construct the request + /// ID of the user for whom personalized search will be performed. + /// Search query provided by the user. It is used for the full-text search. + /// Number of segments to be returned (N for the top-N results). + /// Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing". + /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs. + /// The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios. + /// + /// If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows, for example, rotations in the following recommendations for that user, as the user will be already known to the system. + /// + /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended segments based on the `segmentationId`. + /// + /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some segments based on the `segmentationId`. + /// + /// Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. + /// See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details. + /// The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users. + /// Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// + /// Dictionary of custom options. + /// + /// If there is a custom AB-testing running, return the name of the group to which the request belongs. + /// + public SearchItemSegments (string userId, string searchQuery, long count, string scenario = null, bool? cascadeCreate = null, string filter = null, string booster = null, Logic logic = null, Dictionary expertSettings = null, bool? returnAbGroup = null): base(HttpMethod.Post, 3000) + { + this.userId = userId; + this.searchQuery = searchQuery; + this.count = count; + this.scenario = scenario; + this.cascadeCreate = cascadeCreate; + this.filter = filter; + this.booster = booster; + this.logic = logic; + this.expertSettings = expertSettings; + this.returnAbGroup = returnAbGroup; + } + + /// URI to the endpoint including path parameters + public override string Path() + { + return string.Format("/search/users/{0}/item-segments/", UserId); + } + + /// Get query parameters + /// Dictionary containing values of query parameters (name of parameter: value of the parameter) + public override Dictionary QueryParameters() + { + var parameters = new Dictionary() + { + + }; + return parameters; + } + + /// Get body parameters + /// Dictionary containing values of body parameters (name of parameter: value of the parameter) + public override Dictionary BodyParameters() + { + var parameters = new Dictionary() + { + {"searchQuery", this.SearchQuery}, + {"count", this.Count} + }; + if (this.Scenario != null) + parameters["scenario"] = this.Scenario; + if (this.CascadeCreate.HasValue) + parameters["cascadeCreate"] = this.CascadeCreate.Value; + if (this.Filter != null) + parameters["filter"] = this.Filter; + if (this.Booster != null) + parameters["booster"] = this.Booster; + if (this.Logic != null) + parameters["logic"] = this.Logic; + if (this.ExpertSettings != null) + parameters["expertSettings"] = this.ExpertSettings; + if (this.ReturnAbGroup.HasValue) + parameters["returnAbGroup"] = this.ReturnAbGroup.Value; + return parameters; + } + + } +} diff --git a/Src/Recombee.ApiClient/ApiRequests/SearchItems.cs b/Src/Recombee.ApiClient/ApiRequests/SearchItems.cs index 05f3d92..e00f042 100644 --- a/Src/Recombee.ApiClient/ApiRequests/SearchItems.cs +++ b/Src/Recombee.ApiClient/ApiRequests/SearchItems.cs @@ -11,15 +11,15 @@ namespace Recombee.ApiClient.ApiRequests { - /// Search items + /// Search Items /// Full-text personalized search. The results are based on the provided `searchQuery` and also on the user's past interactions (purchases, ratings, etc.) with the items (items more suitable for the user are preferred in the results). /// All the string and set item properties are indexed by the search engine. - /// This endpoint should be used in a search box at your website/app. It can be called multiple times as the user is typing the query in order to get the most viable suggestions based on current state of the query, or once after submitting the whole query. - /// The returned items are sorted by relevance (first item being the most relevant). + /// This endpoint should be used in a search box on your website/app. It can be called multiple times as the user is typing the query in order to get the most viable suggestions based on the current state of the query, or once after submitting the whole query. + /// The returned items are sorted by relevance (the first item being the most relevant). /// Besides the recommended items, also a unique `recommId` is returned in the response. It can be used to: - /// - Let Recombee know that this search was successful (e.g. user clicked one of the recommended items). See [Reported metrics](https://docs.recombee.com/admin_ui.html#reported-metrics). + /// - Let Recombee know that this search was successful (e.g., user clicked one of the recommended items). See [Reported metrics](https://docs.recombee.com/admin_ui.html#reported-metrics). /// - Get subsequent search results when the user scrolls down or goes to the next page. See [Recommend Next Items](https://docs.recombee.com/api.html#recommend-next-items). - /// It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters. + /// It is also possible to use POST HTTP method (for example in the case of a very long ReQL filter) - query parameters then become body parameters. /// public class SearchItems : Request { @@ -43,21 +43,21 @@ public long Count } private readonly string scenario; /// Scenario defines a particular search field in your user interface. - /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see performance of each scenario in the Admin UI separately, so you can check how well each field performs. - /// The AI which optimizes models in order to get the best results may optimize different scenarios separately, or even use different models in each of the scenarios. + /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each field performs. + /// The AI that optimizes models to get the best results may optimize different scenarios separately, or even use different models in each of the scenarios. /// public string Scenario { get {return scenario;} } private readonly bool? cascadeCreate; - /// If the user does not exist in the database, returns a list of non-personalized search results and creates the user in the database. This allows for example rotations in the following recommendations for that user, as the user will be already known to the system. + /// If the user does not exist in the database, returns a list of non-personalized search results and creates the user in the database. This allows, for example, rotations in the following recommendations for that user, as the user will be already known to the system. public bool? CascadeCreate { get {return cascadeCreate;} } private readonly bool? returnProperties; - /// With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used for easy displaying of the recommended items to the user. + /// With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended items to the user. /// Example response: /// ``` /// { @@ -92,7 +92,7 @@ public bool? ReturnProperties get {return returnProperties;} } private readonly string[] includedProperties; - /// Allows to specify, which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. + /// Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. /// Example response for `includedProperties=description,price`: /// ``` /// { @@ -123,26 +123,26 @@ public string[] IncludedProperties get {return includedProperties;} } private readonly string filter; - /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended items based on the values of their attributes. - /// Filters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter recommended items based on the values of their attributes. + /// Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// public string Filter { get {return filter;} } private readonly string booster; - /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some items based on the values of their attributes. - /// Boosters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to boost the recommendation rate of some items based on the values of their attributes. + /// Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// public string Booster { get {return booster;} } private readonly Logic logic; - /// Logic specifies particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. - /// See [this section](https://docs.recombee.com/recommendation_logics.html) for list of available logics and other details. + /// Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. + /// See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details. /// The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users. - /// Logic can be also set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// public Logic Logic { @@ -156,7 +156,7 @@ public Dictionary ExpertSettings get {return expertSettings;} } private readonly bool? returnAbGroup; - /// If there is a custom AB-testing running, return name of group to which the request belongs. + /// If there is a custom AB-testing running, return the name of the group to which the request belongs. /// public bool? ReturnAbGroup { @@ -168,11 +168,11 @@ public bool? ReturnAbGroup /// Search query provided by the user. It is used for the full-text search. /// Number of items to be returned (N for the top-N results). /// Scenario defines a particular search field in your user interface. - /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see performance of each scenario in the Admin UI separately, so you can check how well each field performs. - /// The AI which optimizes models in order to get the best results may optimize different scenarios separately, or even use different models in each of the scenarios. + /// You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each field performs. + /// The AI that optimizes models to get the best results may optimize different scenarios separately, or even use different models in each of the scenarios. /// - /// If the user does not exist in the database, returns a list of non-personalized search results and creates the user in the database. This allows for example rotations in the following recommendations for that user, as the user will be already known to the system. - /// With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used for easy displaying of the recommended items to the user. + /// If the user does not exist in the database, returns a list of non-personalized search results and creates the user in the database. This allows, for example, rotations in the following recommendations for that user, as the user will be already known to the system. + /// With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended items to the user. /// Example response: /// ``` /// { @@ -202,7 +202,7 @@ public bool? ReturnAbGroup /// } /// ``` /// - /// Allows to specify, which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. + /// Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. /// Example response for `includedProperties=description,price`: /// ``` /// { @@ -228,20 +228,20 @@ public bool? ReturnAbGroup /// } /// ``` /// - /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended items based on the values of their attributes. - /// Filters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter recommended items based on the values of their attributes. + /// Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// - /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some items based on the values of their attributes. - /// Boosters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Number-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to boost the recommendation rate of some items based on the values of their attributes. + /// Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// - /// Logic specifies particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. - /// See [this section](https://docs.recombee.com/recommendation_logics.html) for list of available logics and other details. + /// Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. + /// See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details. /// The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users. - /// Logic can be also set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). + /// Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). /// /// Dictionary of custom options. /// - /// If there is a custom AB-testing running, return name of group to which the request belongs. + /// If there is a custom AB-testing running, return the name of the group to which the request belongs. /// public SearchItems (string userId, string searchQuery, long count, string scenario = null, bool? cascadeCreate = null, bool? returnProperties = null, string[] includedProperties = null, string filter = null, string booster = null, Logic logic = null, Dictionary expertSettings = null, bool? returnAbGroup = null): base(HttpMethod.Post, 3000) { diff --git a/Src/Recombee.ApiClient/ApiRequests/SetViewPortion.cs b/Src/Recombee.ApiClient/ApiRequests/SetViewPortion.cs index f7653ba..458df1c 100644 --- a/Src/Recombee.ApiClient/ApiRequests/SetViewPortion.cs +++ b/Src/Recombee.ApiClient/ApiRequests/SetViewPortion.cs @@ -11,9 +11,9 @@ namespace Recombee.ApiClient.ApiRequests { - /// Set view portion + /// Set View Portion /// Sets viewed portion of an item (for example a video or article) by a user (at a session). - /// If you send new request with the same (`userId`, `itemId`, `sessionId`), the portion gets updated. + /// If you send a new request with the same (`userId`, `itemId`, `sessionId`), the portion gets updated. /// public class SetViewPortion : Request { @@ -30,13 +30,13 @@ public string ItemId get {return itemId;} } private readonly double portion; - /// Viewed portion of the item (number between 0.0 (viewed nothing) and 1.0 (viewed full item) ). It should be the really viewed part of the item, no matter seeking, so for example if the user seeked immediately to half of the item and then viewed 10% of the item, the `portion` should still be `0.1`. + /// Viewed portion of the item (number between 0.0 (viewed nothing) and 1.0 (viewed full item) ). It should be the actual viewed part of the item, no matter the seeking. For example, if the user seeked immediately to half of the item and then viewed 10% of the item, the `portion` should still be `0.1`. public double Portion { get {return portion;} } private readonly string sessionId; - /// ID of session in which the user viewed the item. Default is `null` (`None`, `nil`, `NULL` etc. depending on language). + /// ID of the session in which the user viewed the item. Default is `null` (`None`, `nil`, `NULL` etc., depending on the language). public string SessionId { get {return sessionId;} @@ -69,8 +69,8 @@ public Dictionary AdditionalData /// Construct the request /// User who viewed a portion of the item /// Viewed item - /// Viewed portion of the item (number between 0.0 (viewed nothing) and 1.0 (viewed full item) ). It should be the really viewed part of the item, no matter seeking, so for example if the user seeked immediately to half of the item and then viewed 10% of the item, the `portion` should still be `0.1`. - /// ID of session in which the user viewed the item. Default is `null` (`None`, `nil`, `NULL` etc. depending on language). + /// Viewed portion of the item (number between 0.0 (viewed nothing) and 1.0 (viewed full item) ). It should be the actual viewed part of the item, no matter the seeking. For example, if the user seeked immediately to half of the item and then viewed 10% of the item, the `portion` should still be `0.1`. + /// ID of the session in which the user viewed the item. Default is `null` (`None`, `nil`, `NULL` etc., depending on the language). /// UTC timestamp of the rating as ISO8601-1 pattern or UTC epoch time. The default value is the current time. /// Sets whether the given user/item should be created if not present in the database. /// If this view portion is based on a recommendation request, `recommId` is the id of the clicked recommendation. diff --git a/Src/Recombee.ApiClient/ApiRequests/UpdateAutoReqlSegmentation.cs b/Src/Recombee.ApiClient/ApiRequests/UpdateAutoReqlSegmentation.cs new file mode 100644 index 0000000..e1f6130 --- /dev/null +++ b/Src/Recombee.ApiClient/ApiRequests/UpdateAutoReqlSegmentation.cs @@ -0,0 +1,98 @@ +/* + This file is auto-generated, do not edit +*/ + +using System; +using System.Collections.Generic; +using System.Net.Http; +using Recombee.ApiClient.Bindings; +using Recombee.ApiClient.Util; + + +namespace Recombee.ApiClient.ApiRequests +{ + /// Update Auto ReQL Segmentation + /// Update an existing Segmentation. + /// + public class UpdateAutoReqlSegmentation : Request + { + private readonly string segmentationId; + /// ID of the updated Segmentation + public string SegmentationId + { + get {return segmentationId;} + } + private readonly string expression; + /// ReQL expression that returns for each item a set with IDs of segments to which the item belongs + /// + public string Expression + { + get {return expression;} + } + private readonly string title; + /// Human-readable name that is shown in the Recombee Admin UI. + /// + public string Title + { + get {return title;} + } + private readonly string description; + /// Description that is shown in the Recombee Admin UI. + /// + public string Description + { + get {return description;} + } + + /// Construct the request + /// ID of the updated Segmentation + /// ReQL expression that returns for each item a set with IDs of segments to which the item belongs + /// + /// Human-readable name that is shown in the Recombee Admin UI. + /// + /// Description that is shown in the Recombee Admin UI. + /// + public UpdateAutoReqlSegmentation (string segmentationId, string expression = null, string title = null, string description = null): base(HttpMethod.Post, 10000) + { + this.segmentationId = segmentationId; + this.expression = expression; + this.title = title; + this.description = description; + } + + /// URI to the endpoint including path parameters + public override string Path() + { + return string.Format("/segmentations/auto-reql/{0}", SegmentationId); + } + + /// Get query parameters + /// Dictionary containing values of query parameters (name of parameter: value of the parameter) + public override Dictionary QueryParameters() + { + var parameters = new Dictionary() + { + + }; + return parameters; + } + + /// Get body parameters + /// Dictionary containing values of body parameters (name of parameter: value of the parameter) + public override Dictionary BodyParameters() + { + var parameters = new Dictionary() + { + + }; + if (this.Expression != null) + parameters["expression"] = this.Expression; + if (this.Title != null) + parameters["title"] = this.Title; + if (this.Description != null) + parameters["description"] = this.Description; + return parameters; + } + + } +} diff --git a/Src/Recombee.ApiClient/ApiRequests/UpdateManualReqlSegment.cs b/Src/Recombee.ApiClient/ApiRequests/UpdateManualReqlSegment.cs new file mode 100644 index 0000000..beea7b0 --- /dev/null +++ b/Src/Recombee.ApiClient/ApiRequests/UpdateManualReqlSegment.cs @@ -0,0 +1,92 @@ +/* + This file is auto-generated, do not edit +*/ + +using System; +using System.Collections.Generic; +using System.Net.Http; +using Recombee.ApiClient.Bindings; +using Recombee.ApiClient.Util; + + +namespace Recombee.ApiClient.ApiRequests +{ + /// Update Manual ReQL Segment + /// Update definition of the Segment. + /// + public class UpdateManualReqlSegment : Request + { + private readonly string segmentationId; + /// ID of the Segmentation to which the updated Segment belongs + public string SegmentationId + { + get {return segmentationId;} + } + private readonly string segmentId; + /// ID of the Segment that will be updated + public string SegmentId + { + get {return segmentId;} + } + private readonly string filter; + /// ReQL filter that returns `true` for items that belong to this Segment. Otherwise returns `false`. + /// + public string Filter + { + get {return filter;} + } + private readonly string title; + /// Human-readable name of the Segment that is shown in the Recombee Admin UI. + /// + public string Title + { + get {return title;} + } + + /// Construct the request + /// ID of the Segmentation to which the updated Segment belongs + /// ID of the Segment that will be updated + /// ReQL filter that returns `true` for items that belong to this Segment. Otherwise returns `false`. + /// + /// Human-readable name of the Segment that is shown in the Recombee Admin UI. + /// + public UpdateManualReqlSegment (string segmentationId, string segmentId, string filter, string title = null): base(HttpMethod.Post, 10000) + { + this.segmentationId = segmentationId; + this.segmentId = segmentId; + this.filter = filter; + this.title = title; + } + + /// URI to the endpoint including path parameters + public override string Path() + { + return string.Format("/segmentations/manual-reql/{0}/segments/{1}", SegmentationId, SegmentId); + } + + /// Get query parameters + /// Dictionary containing values of query parameters (name of parameter: value of the parameter) + public override Dictionary QueryParameters() + { + var parameters = new Dictionary() + { + + }; + return parameters; + } + + /// Get body parameters + /// Dictionary containing values of body parameters (name of parameter: value of the parameter) + public override Dictionary BodyParameters() + { + var parameters = new Dictionary() + { + {"filter", this.Filter} + }; + if (this.Title != null) + parameters["title"] = this.Title; + return parameters; + } + + } +} diff --git a/Src/Recombee.ApiClient/ApiRequests/UpdateManualReqlSegmentation.cs b/Src/Recombee.ApiClient/ApiRequests/UpdateManualReqlSegmentation.cs new file mode 100644 index 0000000..0bfc9df --- /dev/null +++ b/Src/Recombee.ApiClient/ApiRequests/UpdateManualReqlSegmentation.cs @@ -0,0 +1,86 @@ +/* + This file is auto-generated, do not edit +*/ + +using System; +using System.Collections.Generic; +using System.Net.Http; +using Recombee.ApiClient.Bindings; +using Recombee.ApiClient.Util; + + +namespace Recombee.ApiClient.ApiRequests +{ + /// Update Manual ReQL Segmentation + /// Update an existing Segmentation. + /// + public class UpdateManualReqlSegmentation : Request + { + private readonly string segmentationId; + /// ID of the updated Segmentation + public string SegmentationId + { + get {return segmentationId;} + } + private readonly string title; + /// Human-readable name that is shown in the Recombee Admin UI. + /// + public string Title + { + get {return title;} + } + private readonly string description; + /// Description that is shown in the Recombee Admin UI. + /// + public string Description + { + get {return description;} + } + + /// Construct the request + /// ID of the updated Segmentation + /// Human-readable name that is shown in the Recombee Admin UI. + /// + /// Description that is shown in the Recombee Admin UI. + /// + public UpdateManualReqlSegmentation (string segmentationId, string title = null, string description = null): base(HttpMethod.Post, 10000) + { + this.segmentationId = segmentationId; + this.title = title; + this.description = description; + } + + /// URI to the endpoint including path parameters + public override string Path() + { + return string.Format("/segmentations/manual-reql/{0}", SegmentationId); + } + + /// Get query parameters + /// Dictionary containing values of query parameters (name of parameter: value of the parameter) + public override Dictionary QueryParameters() + { + var parameters = new Dictionary() + { + + }; + return parameters; + } + + /// Get body parameters + /// Dictionary containing values of body parameters (name of parameter: value of the parameter) + public override Dictionary BodyParameters() + { + var parameters = new Dictionary() + { + + }; + if (this.Title != null) + parameters["title"] = this.Title; + if (this.Description != null) + parameters["description"] = this.Description; + return parameters; + } + + } +} diff --git a/Src/Recombee.ApiClient/ApiRequests/UpdateMoreItems.cs b/Src/Recombee.ApiClient/ApiRequests/UpdateMoreItems.cs index 6c0ac1c..7e29140 100644 --- a/Src/Recombee.ApiClient/ApiRequests/UpdateMoreItems.cs +++ b/Src/Recombee.ApiClient/ApiRequests/UpdateMoreItems.cs @@ -11,8 +11,8 @@ namespace Recombee.ApiClient.ApiRequests { - /// Update more items - /// Update (some) property values of all the items that pass the filter. + /// Update More Items + /// Updates (some) property values of all the items that pass the filter. /// Example: *Setting all the items that are older than a week as unavailable* /// ``` /// { @@ -24,21 +24,21 @@ namespace Recombee.ApiClient.ApiRequests public class UpdateMoreItems : Request { private readonly string filter; - /// A [ReQL](https://docs.recombee.com/reql.html) expression, which return `true` for the items that shall be updated. + /// A [ReQL](https://docs.recombee.com/reql.html) expression, which returns `true` for the items that shall be updated. public string Filter { get {return filter;} } private readonly Dictionary changes; - /// A dictionary where the keys are properties which shall be updated. + /// A dictionary where the keys are properties that shall be updated. public Dictionary Changes { get {return changes;} } /// Construct the request - /// A [ReQL](https://docs.recombee.com/reql.html) expression, which return `true` for the items that shall be updated. - /// A dictionary where the keys are properties which shall be updated. + /// A [ReQL](https://docs.recombee.com/reql.html) expression, which returns `true` for the items that shall be updated. + /// A dictionary where the keys are properties that shall be updated. public UpdateMoreItems (string filter, Dictionary changes): base(HttpMethod.Post, 1000) { this.filter = filter; diff --git a/Src/Recombee.ApiClient/ApiRequests/UpdatePropertyBasedSegmentation.cs b/Src/Recombee.ApiClient/ApiRequests/UpdatePropertyBasedSegmentation.cs new file mode 100644 index 0000000..8fc0436 --- /dev/null +++ b/Src/Recombee.ApiClient/ApiRequests/UpdatePropertyBasedSegmentation.cs @@ -0,0 +1,98 @@ +/* + This file is auto-generated, do not edit +*/ + +using System; +using System.Collections.Generic; +using System.Net.Http; +using Recombee.ApiClient.Bindings; +using Recombee.ApiClient.Util; + + +namespace Recombee.ApiClient.ApiRequests +{ + /// Update Property Based Segmentation + /// Updates a Property Based Segmentation + /// + public class UpdatePropertyBasedSegmentation : Request + { + private readonly string segmentationId; + /// ID of the updated Segmentation + public string SegmentationId + { + get {return segmentationId;} + } + private readonly string propertyName; + /// Name of the property on which the Segmentation should be based + /// + public string PropertyName + { + get {return propertyName;} + } + private readonly string title; + /// Human-readable name that is shown in the Recombee Admin UI. + /// + public string Title + { + get {return title;} + } + private readonly string description; + /// Description that is shown in the Recombee Admin UI. + /// + public string Description + { + get {return description;} + } + + /// Construct the request + /// ID of the updated Segmentation + /// Name of the property on which the Segmentation should be based + /// + /// Human-readable name that is shown in the Recombee Admin UI. + /// + /// Description that is shown in the Recombee Admin UI. + /// + public UpdatePropertyBasedSegmentation (string segmentationId, string propertyName = null, string title = null, string description = null): base(HttpMethod.Post, 10000) + { + this.segmentationId = segmentationId; + this.propertyName = propertyName; + this.title = title; + this.description = description; + } + + /// URI to the endpoint including path parameters + public override string Path() + { + return string.Format("/segmentations/property-based/{0}", SegmentationId); + } + + /// Get query parameters + /// Dictionary containing values of query parameters (name of parameter: value of the parameter) + public override Dictionary QueryParameters() + { + var parameters = new Dictionary() + { + + }; + return parameters; + } + + /// Get body parameters + /// Dictionary containing values of body parameters (name of parameter: value of the parameter) + public override Dictionary BodyParameters() + { + var parameters = new Dictionary() + { + + }; + if (this.PropertyName != null) + parameters["propertyName"] = this.PropertyName; + if (this.Title != null) + parameters["title"] = this.Title; + if (this.Description != null) + parameters["description"] = this.Description; + return parameters; + } + + } +} diff --git a/Src/Recombee.ApiClient/Bindings/CartAddition.cs b/Src/Recombee.ApiClient/Bindings/CartAddition.cs index b881fdc..fad9c2b 100644 --- a/Src/Recombee.ApiClient/Bindings/CartAddition.cs +++ b/Src/Recombee.ApiClient/Bindings/CartAddition.cs @@ -35,13 +35,13 @@ public DateTime? Timestamp get {return timestamp;} } private readonly double? amount; - /// Amount (number) added to cart. The default is 1. For example if `user-x` adds two `item-y` during a single order (session...), the `amount` should equal to 2. + /// Amount (number) added to cart. The default is 1. For example, if `user-x` adds two `item-y` during a single order (session...), the `amount` should equal 2. public double? Amount { get {return amount;} } private readonly double? price; - /// Price of the added item. If `amount` is greater than 1, sum of prices of all the items should be given. + /// Price of the added item. If `amount` is greater than 1, the sum of prices of all the items should be given. public double? Price { get {return price;} diff --git a/Src/Recombee.ApiClient/Bindings/ListSegmentationsResponse.cs b/Src/Recombee.ApiClient/Bindings/ListSegmentationsResponse.cs new file mode 100644 index 0000000..ac9f9a5 --- /dev/null +++ b/Src/Recombee.ApiClient/Bindings/ListSegmentationsResponse.cs @@ -0,0 +1,54 @@ +/* + This file is auto-generated, do not edit +*/ + +using System; +using System.Collections.Generic; +using Newtonsoft.Json; +using Newtonsoft.Json.Serialization; + +using Recombee.ApiClient.Util; + +namespace Recombee.ApiClient.Bindings +{ + /// ListSegmentationsResponse Binding + [JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))] + public class ListSegmentationsResponse: RecombeeBinding { + private readonly Segmentation[] segmentations; + /// Array of existing Segmentations + public Segmentation[] Segmentations + { + get {return segmentations;} + } + + public ListSegmentationsResponse (Segmentation[] segmentations) + { + this.segmentations = segmentations; + } + + /// Determines whether the specified object is equal to the current object + /// The object to compare with the current object + /// true if the specified object is equal to the current object; otherwise, false + public override bool Equals(Object obj) + { + if (!(obj is ListSegmentationsResponse)) + return false; + if (obj == this) + return true; + + ListSegmentationsResponse that = (ListSegmentationsResponse) obj; + return new EqualsBuilder(this, that) + .With(m => m.Segmentations) + .Equals(); + } + /// Hash function + /// A hash code for the current object + public override int GetHashCode() + { + return new HashCodeBuilder(this) + .With(m => m.Segmentations) + .HashCode; + } + } + +} diff --git a/Src/Recombee.ApiClient/Bindings/Purchase.cs b/Src/Recombee.ApiClient/Bindings/Purchase.cs index 833ad07..3920100 100644 --- a/Src/Recombee.ApiClient/Bindings/Purchase.cs +++ b/Src/Recombee.ApiClient/Bindings/Purchase.cs @@ -35,19 +35,19 @@ public DateTime? Timestamp get {return timestamp;} } private readonly double? amount; - /// Amount (number) of purchased items. The default is 1. For example if `user-x` purchases two `item-y` during a single order (session...), the `amount` should equal to 2. + /// Amount (number) of purchased items. The default is 1. For example, if `user-x` purchases two `item-y` during a single order (session...), the `amount` should equal 2. public double? Amount { get {return amount;} } private readonly double? price; - /// Price paid by the user for the item. If `amount` is greater than 1, sum of prices of all the items should be given. + /// Price paid by the user for the item. If `amount` is greater than 1, the sum of prices of all the items should be given. public double? Price { get {return price;} } private readonly double? profit; - /// Your profit from the purchased item. The profit is natural in e-commerce domain (for example if `user-x` purchases `item-y` for $100 and the gross margin is 30 %, then the profit is $30), but is applicable also in other domains (for example at a news company it may be income from displayed advertisement on article page). If `amount` is greater than 1, sum of profit of all the items should be given. + /// Your profit from the purchased item. The profit is natural in the e-commerce domain (for example, if `user-x` purchases `item-y` for $100 and the gross margin is 30 %, then the profit is $30) but is also applicable in other domains (for example, at a news company it may be income from a displayed advertisement on article page). If `amount` is greater than 1, the sum of profit of all the items should be given. public double? Profit { get {return profit;} diff --git a/Src/Recombee.ApiClient/Bindings/SearchSynonym.cs b/Src/Recombee.ApiClient/Bindings/SearchSynonym.cs index 53c1cd4..0f3a8de 100644 --- a/Src/Recombee.ApiClient/Bindings/SearchSynonym.cs +++ b/Src/Recombee.ApiClient/Bindings/SearchSynonym.cs @@ -27,7 +27,7 @@ public string Term get {return term;} } private readonly string synonym; - /// A word that should considered equal to `term` by the full-text search engine. + /// A word that should be considered equal to `term` by the full-text search engine. public string Synonym { get {return synonym;} diff --git a/Src/Recombee.ApiClient/Bindings/Segmentation.cs b/Src/Recombee.ApiClient/Bindings/Segmentation.cs new file mode 100644 index 0000000..0221a00 --- /dev/null +++ b/Src/Recombee.ApiClient/Bindings/Segmentation.cs @@ -0,0 +1,90 @@ +/* + This file is auto-generated, do not edit +*/ + +using System; +using System.Collections.Generic; +using Newtonsoft.Json; +using Newtonsoft.Json.Serialization; + +using Recombee.ApiClient.Util; + +namespace Recombee.ApiClient.Bindings +{ + /// Segmentation Binding + [JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))] + public class Segmentation: RecombeeBinding { + private readonly string segmentationId; + /// Id of the Segmentation + public string SegmentationId + { + get {return segmentationId;} + } + private readonly string sourceType; + /// Determines on which type of data (e.g. `items`) the Segmentation is based + public string SourceType + { + get {return sourceType;} + } + private readonly string segmentationType; + /// Determines the type of the segmentation (Property-based, Manual ReQL, Auto ReQL) + public string SegmentationType + { + get {return segmentationType;} + } + private readonly string title; + /// Title of the Segmentation + public string Title + { + get {return title;} + } + private readonly string description; + /// Description of the Segmentation + public string Description + { + get {return description;} + } + + public Segmentation (string segmentationId, string sourceType, string segmentationType, string title = null, string description = null) + { + this.segmentationId = segmentationId; + this.sourceType = sourceType; + this.segmentationType = segmentationType; + this.title = title; + this.description = description; + } + + /// Determines whether the specified object is equal to the current object + /// The object to compare with the current object + /// true if the specified object is equal to the current object; otherwise, false + public override bool Equals(Object obj) + { + if (!(obj is Segmentation)) + return false; + if (obj == this) + return true; + + Segmentation that = (Segmentation) obj; + return new EqualsBuilder(this, that) + .With(m => m.SegmentationId) + .With(m => m.SourceType) + .With(m => m.SegmentationType) + .With(m => m.Title) + .With(m => m.Description) + .Equals(); + } + /// Hash function + /// A hash code for the current object + public override int GetHashCode() + { + return new HashCodeBuilder(this) + .With(m => m.SegmentationId) + .With(m => m.SourceType) + .With(m => m.SegmentationType) + .With(m => m.Title) + .With(m => m.Description) + .HashCode; + } + } + +} diff --git a/Src/Recombee.ApiClient/Bindings/ViewPortion.cs b/Src/Recombee.ApiClient/Bindings/ViewPortion.cs index f3624ba..0b2ada4 100644 --- a/Src/Recombee.ApiClient/Bindings/ViewPortion.cs +++ b/Src/Recombee.ApiClient/Bindings/ViewPortion.cs @@ -27,13 +27,13 @@ public string ItemId get {return itemId;} } private readonly double portion; - /// Viewed portion of the item (number between 0.0 (viewed nothing) and 1.0 (viewed full item) ). It should be the really viewed part of the item, no matter seeking, so for example if the user seeked immediately to half of the item and then viewed 10% of the item, the `portion` should still be `0.1`. + /// Viewed portion of the item (number between 0.0 (viewed nothing) and 1.0 (viewed full item) ). It should be the actual viewed part of the item, no matter the seeking. For example, if the user seeked immediately to half of the item and then viewed 10% of the item, the `portion` should still be `0.1`. public double Portion { get {return portion;} } private readonly string sessionId; - /// ID of session in which the user viewed the item. Default is `null` (`None`, `nil`, `NULL` etc. depending on language). + /// ID of the session in which the user viewed the item. Default is `null` (`None`, `nil`, `NULL` etc., depending on the language). public string SessionId { get {return sessionId;} diff --git a/Src/Recombee.ApiClient/Recombee.ApiClient.csproj b/Src/Recombee.ApiClient/Recombee.ApiClient.csproj index ee7c097..7d4aeb9 100644 --- a/Src/Recombee.ApiClient/Recombee.ApiClient.csproj +++ b/Src/Recombee.ApiClient/Recombee.ApiClient.csproj @@ -9,7 +9,7 @@ - 4.0.0 + 4.1.0 diff --git a/Src/Recombee.ApiClient/RecombeeClient.Generated.cs b/Src/Recombee.ApiClient/RecombeeClient.Generated.cs index f586107..43f8966 100644 --- a/Src/Recombee.ApiClient/RecombeeClient.Generated.cs +++ b/Src/Recombee.ApiClient/RecombeeClient.Generated.cs @@ -797,6 +797,93 @@ public RecommendationResponse Send(RecommendUsersToItem request) } + /// Parse JSON response + /// JSON string from the API + /// Request sent to the API + /// Parsed response + protected RecommendationResponse ParseResponse(string json, RecommendItemSegmentsToUser request) + { + return JsonConvert.DeserializeObject(json); + } + + /// Asynchronously send the RecommendItemSegmentsToUser request + /// Request to be sent + /// Task representing the asynchronous operation + public async Task SendAsync(RecommendItemSegmentsToUser request) + { + var json = await SendRequestAsync(request); + return ParseResponse(json, request); + } + + /// Synchronously send the RecommendItemSegmentsToUser request + /// Request to be sent + /// Response from the API + public RecommendationResponse Send(RecommendItemSegmentsToUser request) + { + var task = Task.Run(async () => await SendAsync(request)); + var result = task.WaitAndUnwrapException(); + return result; + } + + + /// Parse JSON response + /// JSON string from the API + /// Request sent to the API + /// Parsed response + protected RecommendationResponse ParseResponse(string json, RecommendItemSegmentsToItem request) + { + return JsonConvert.DeserializeObject(json); + } + + /// Asynchronously send the RecommendItemSegmentsToItem request + /// Request to be sent + /// Task representing the asynchronous operation + public async Task SendAsync(RecommendItemSegmentsToItem request) + { + var json = await SendRequestAsync(request); + return ParseResponse(json, request); + } + + /// Synchronously send the RecommendItemSegmentsToItem request + /// Request to be sent + /// Response from the API + public RecommendationResponse Send(RecommendItemSegmentsToItem request) + { + var task = Task.Run(async () => await SendAsync(request)); + var result = task.WaitAndUnwrapException(); + return result; + } + + + /// Parse JSON response + /// JSON string from the API + /// Request sent to the API + /// Parsed response + protected RecommendationResponse ParseResponse(string json, RecommendItemSegmentsToItemSegment request) + { + return JsonConvert.DeserializeObject(json); + } + + /// Asynchronously send the RecommendItemSegmentsToItemSegment request + /// Request to be sent + /// Task representing the asynchronous operation + public async Task SendAsync(RecommendItemSegmentsToItemSegment request) + { + var json = await SendRequestAsync(request); + return ParseResponse(json, request); + } + + /// Synchronously send the RecommendItemSegmentsToItemSegment request + /// Request to be sent + /// Response from the API + public RecommendationResponse Send(RecommendItemSegmentsToItemSegment request) + { + var task = Task.Run(async () => await SendAsync(request)); + var result = task.WaitAndUnwrapException(); + return result; + } + + /// Parse JSON response /// JSON string from the API /// Request sent to the API @@ -826,6 +913,35 @@ public SearchResponse Send(SearchItems request) } + /// Parse JSON response + /// JSON string from the API + /// Request sent to the API + /// Parsed response + protected SearchResponse ParseResponse(string json, SearchItemSegments request) + { + return JsonConvert.DeserializeObject(json); + } + + /// Asynchronously send the SearchItemSegments request + /// Request to be sent + /// Task representing the asynchronous operation + public async Task SendAsync(SearchItemSegments request) + { + var json = await SendRequestAsync(request); + return ParseResponse(json, request); + } + + /// Synchronously send the SearchItemSegments request + /// Request to be sent + /// Response from the API + public SearchResponse Send(SearchItemSegments request) + { + var task = Task.Run(async () => await SendAsync(request)); + var result = task.WaitAndUnwrapException(); + return result; + } + + /// Parse JSON response /// JSON string from the API /// Request sent to the API @@ -883,6 +999,64 @@ public ListSearchSynonymsResponse Send(ListSearchSynonyms request) return result; } + + /// Parse JSON response + /// JSON string from the API + /// Request sent to the API + /// Parsed response + protected ListSegmentationsResponse ParseResponse(string json, ListSegmentations request) + { + return JsonConvert.DeserializeObject(json); + } + + /// Asynchronously send the ListSegmentations request + /// Request to be sent + /// Task representing the asynchronous operation + public async Task SendAsync(ListSegmentations request) + { + var json = await SendRequestAsync(request); + return ParseResponse(json, request); + } + + /// Synchronously send the ListSegmentations request + /// Request to be sent + /// Response from the API + public ListSegmentationsResponse Send(ListSegmentations request) + { + var task = Task.Run(async () => await SendAsync(request)); + var result = task.WaitAndUnwrapException(); + return result; + } + + + /// Parse JSON response + /// JSON string from the API + /// Request sent to the API + /// Parsed response + protected Segmentation ParseResponse(string json, GetSegmentation request) + { + return JsonConvert.DeserializeObject(json); + } + + /// Asynchronously send the GetSegmentation request + /// Request to be sent + /// Task representing the asynchronous operation + public async Task SendAsync(GetSegmentation request) + { + var json = await SendRequestAsync(request); + return ParseResponse(json, request); + } + + /// Synchronously send the GetSegmentation request + /// Request to be sent + /// Response from the API + public Segmentation Send(GetSegmentation request) + { + var task = Task.Run(async () => await SendAsync(request)); + var result = task.WaitAndUnwrapException(); + return result; + } + private object ParseOneBatchResponse(string json, int statusCode, Request request) { if(statusCode<200 || statusCode > 299) return new ResponseException(request, (HttpStatusCode)statusCode, json); @@ -949,11 +1123,23 @@ private object ParseOneBatchResponse(string json, int statusCode, Request reques if (request is RecommendUsersToItem) return ParseResponse(json, (RecommendUsersToItem) request); + if (request is RecommendItemSegmentsToUser) return ParseResponse(json, (RecommendItemSegmentsToUser) request); + + if (request is RecommendItemSegmentsToItem) return ParseResponse(json, (RecommendItemSegmentsToItem) request); + + if (request is RecommendItemSegmentsToItemSegment) return ParseResponse(json, (RecommendItemSegmentsToItemSegment) request); + if (request is SearchItems) return ParseResponse(json, (SearchItems) request); + if (request is SearchItemSegments) return ParseResponse(json, (SearchItemSegments) request); + if (request is AddSearchSynonym) return ParseResponse(json, (AddSearchSynonym) request); if (request is ListSearchSynonyms) return ParseResponse(json, (ListSearchSynonyms) request); + + if (request is ListSegmentations) return ParseResponse(json, (ListSegmentations) request); + + if (request is GetSegmentation) return ParseResponse(json, (GetSegmentation) request); return ParseResponse(json, request); } } diff --git a/Src/Recombee.ApiClient/RecombeeClient.cs b/Src/Recombee.ApiClient/RecombeeClient.cs index 6b4afb6..fba1579 100644 --- a/Src/Recombee.ApiClient/RecombeeClient.cs +++ b/Src/Recombee.ApiClient/RecombeeClient.cs @@ -92,7 +92,7 @@ private string getHostUri(string baseUri, Region? region) { private HttpClient createHttpClient() { var httpClient = new HttpClient(); - httpClient.DefaultRequestHeaders.Add("User-Agent", "recombee-.net-api-client/4.0.0"); + httpClient.DefaultRequestHeaders.Add("User-Agent", "recombee-.net-api-client/4.1.0"); return httpClient; }