Skip to content

Commit 740d166

Browse files
committed
Support ListScenarios endpoint
1 parent f6a94d3 commit 740d166

34 files changed

+493
-261
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
This file is auto-generated, do not edit
3+
*/
4+
5+
6+
using System;
7+
using System.Collections.Generic;
8+
using System.Linq;
9+
using Xunit;
10+
using Recombee.ApiClient.ApiRequests;
11+
using Recombee.ApiClient.Bindings;
12+
13+
namespace Recombee.ApiClient.Tests
14+
{
15+
public class ListScenariosBatchUnitTest: RecombeeUnitTest
16+
{
17+
18+
[Fact]
19+
public void TestListScenarios()
20+
{
21+
Object resp2;
22+
Request[] requests = new Request[] {
23+
new ListScenarios()
24+
};
25+
26+
BatchResponse batchResponse = client.Send(new Batch(requests));
27+
Assert.Equal(200, (int)batchResponse.StatusCodes.ElementAt(0));
28+
}
29+
30+
[Fact]
31+
public async void TestListScenariosAsync()
32+
{
33+
Object resp2;
34+
Request[] requests = new Request[] {
35+
new ListScenarios()
36+
};
37+
38+
BatchResponse batchResponse = await client.SendAsync(new Batch(requests));
39+
Assert.Equal(200, (int)batchResponse.StatusCodes.ElementAt(0));
40+
}
41+
}
42+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
This file is auto-generated, do not edit
3+
*/
4+
5+
6+
using System;
7+
using System.Collections.Generic;
8+
using System.Linq;
9+
using Xunit;
10+
using Recombee.ApiClient.ApiRequests;
11+
using Recombee.ApiClient.Bindings;
12+
13+
namespace Recombee.ApiClient.Tests
14+
{
15+
public class ListScenariosUnitTest: RecombeeUnitTest
16+
{
17+
18+
[Fact]
19+
public void TestListScenarios()
20+
{
21+
ListScenarios req;
22+
IEnumerable<Scenario> resp;
23+
Object resp2;
24+
// it 'lists scenarios'
25+
System.Threading.Thread.Sleep(10000);
26+
resp = client.Send(new ListScenarios());
27+
}
28+
29+
[Fact]
30+
public async void TestListScenariosAsync()
31+
{
32+
ListScenarios req;
33+
IEnumerable<Scenario> resp;
34+
Object resp2;
35+
// it 'lists scenarios'
36+
System.Threading.Thread.Sleep(10000);
37+
resp = await client.SendAsync(new ListScenarios());
38+
}
39+
}
40+
}

Src/Recombee.ApiClient/ApiRequests/AddManualReqlSegment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace Recombee.ApiClient.ApiRequests
1313
{
1414
/// <summary>Add Manual ReQL Segment</summary>
1515
/// <remarks>Adds a new Segment into a Manual ReQL Segmentation.
16-
/// 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.
16+
/// The new Segment is defined by a [ReQL](https://docs.recombee.com/reql) filter that returns `true` for an item in case that this item belongs to the segment.
1717
/// </remarks>
1818
public class AddManualReqlSegment : Request
1919
{

Src/Recombee.ApiClient/ApiRequests/AddSearchSynonym.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Recombee.ApiClient.ApiRequests
1313
{
1414
/// <summary>Add Search Synonym</summary>
15-
/// <remarks>Adds a new synonym for the [Search items](https://docs.recombee.com/api.html#search-items).
15+
/// <remarks>Adds a new synonym for the [Search items](https://docs.recombee.com/api#search-items).
1616
/// When the `term` is used in the search query, the `synonym` is also used for the full-text search.
1717
/// Unless `oneWay=true`, it works also in the opposite way (`synonym` -> `term`).
1818
/// An example of a synonym can be `science fiction` for the term `sci-fi`.

Src/Recombee.ApiClient/ApiRequests/CreateAutoReqlSegmentation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Recombee.ApiClient.ApiRequests
1313
{
1414
/// <summary>Create Auto ReQL Segmentation</summary>
15-
/// <remarks>Segment the items using a [ReQL](https://docs.recombee.com/reql.html) expression.
15+
/// <remarks>Segment the items using a [ReQL](https://docs.recombee.com/reql) expression.
1616
/// For each item, the expression should return a set that contains IDs of segments to which the item belongs to.
1717
/// </remarks>
1818
public class CreateAutoReqlSegmentation : Request

Src/Recombee.ApiClient/ApiRequests/CreateManualReqlSegmentation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Recombee.ApiClient.ApiRequests
1313
{
1414
/// <summary>Create Manual ReQL Segmentation</summary>
15-
/// <remarks>Segment the items using multiple [ReQL](https://docs.recombee.com/reql.html) filters.
15+
/// <remarks>Segment the items using multiple [ReQL](https://docs.recombee.com/reql) filters.
1616
/// Use the Add Manual ReQL Items Segment endpoint to create the individual segments.
1717
/// </remarks>
1818
public class CreateManualReqlSegmentation : Request

Src/Recombee.ApiClient/ApiRequests/DeleteItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace Recombee.ApiClient.ApiRequests
1414
/// <summary>Delete Item</summary>
1515
/// <remarks>Deletes an item of the given `itemId` from the catalog.
1616
/// 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.
17-
/// 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.
17+
/// 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) instead of deleting the item completely.
1818
/// </remarks>
1919
public class DeleteItem : Request
2020
{

Src/Recombee.ApiClient/ApiRequests/DeleteMoreItems.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ namespace Recombee.ApiClient.ApiRequests
1313
{
1414
/// <summary>Delete More Items</summary>
1515
/// <remarks>Deletes all the items that pass the filter.
16-
/// 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.</remarks>
16+
/// 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) instead of deleting the item completely.</remarks>
1717
public class DeleteMoreItems : Request
1818
{
1919
private readonly string filter;
20-
/// <summary>A [ReQL](https://docs.recombee.com/reql.html) expression, which returns `true` for the items that shall be updated.</summary>
20+
/// <summary>A [ReQL](https://docs.recombee.com/reql) expression, which returns `true` for the items that shall be updated.</summary>
2121
public string Filter
2222
{
2323
get {return filter;}
2424
}
2525

2626
/// <summary>Construct the request</summary>
27-
/// <param name="filter">A [ReQL](https://docs.recombee.com/reql.html) expression, which returns `true` for the items that shall be updated.</param>
27+
/// <param name="filter">A [ReQL](https://docs.recombee.com/reql) expression, which returns `true` for the items that shall be updated.</param>
2828
public DeleteMoreItems (string filter): base(HttpMethod.Delete, 100000)
2929
{
3030
this.filter = filter;

Src/Recombee.ApiClient/ApiRequests/DeleteSearchSynonym.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Recombee.ApiClient.ApiRequests
1313
{
1414
/// <summary>Delete Search Synonym</summary>
15-
/// <remarks>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).
15+
/// <remarks>Deletes synonym of the given `id`. This synonym is no longer taken into account in the [Search items](https://docs.recombee.com/api#search-items).
1616
/// </remarks>
1717
public class DeleteSearchSynonym : Request
1818
{

Src/Recombee.ApiClient/ApiRequests/ListItems.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace Recombee.ApiClient.ApiRequests
1616
public class ListItems : Request
1717
{
1818
private readonly string filter;
19-
/// <summary>Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter items to be listed. Only the items for which the expression is *true* will be returned.</summary>
19+
/// <summary>Boolean-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to filter items to be listed. Only the items for which the expression is *true* will be returned.</summary>
2020
public string Filter
2121
{
2222
get {return filter;}
@@ -36,7 +36,7 @@ public long? Offset
3636
private readonly bool? returnProperties;
3737
/// <summary>With `returnProperties=true`, property values of the listed items are returned along with their IDs in a JSON dictionary.
3838
/// Example response:
39-
/// ```
39+
/// ```json
4040
/// [
4141
/// {
4242
/// "itemId": "tv-178",
@@ -62,7 +62,7 @@ public bool? ReturnProperties
6262
private readonly string[] includedProperties;
6363
/// <summary>Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
6464
/// Example response for `includedProperties=description,price`:
65-
/// ```
65+
/// ```json
6666
/// [
6767
/// {
6868
/// "itemId": "tv-178",
@@ -83,12 +83,12 @@ public string[] IncludedProperties
8383
}
8484

8585
/// <summary>Construct the request</summary>
86-
/// <param name="filter">Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter items to be listed. Only the items for which the expression is *true* will be returned.</param>
86+
/// <param name="filter">Boolean-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to filter items to be listed. Only the items for which the expression is *true* will be returned.</param>
8787
/// <param name="count">The number of items to be listed.</param>
8888
/// <param name="offset">Specifies the number of items to skip (ordered by `itemId`).</param>
8989
/// <param name="returnProperties">With `returnProperties=true`, property values of the listed items are returned along with their IDs in a JSON dictionary.
9090
/// Example response:
91-
/// ```
91+
/// ```json
9292
/// [
9393
/// {
9494
/// "itemId": "tv-178",
@@ -109,7 +109,7 @@ public string[] IncludedProperties
109109
/// </param>
110110
/// <param name="includedProperties">Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
111111
/// Example response for `includedProperties=description,price`:
112-
/// ```
112+
/// ```json
113113
/// [
114114
/// {
115115
/// "itemId": "tv-178",

0 commit comments

Comments
 (0)