-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support setting the region of your DB. Added Update / Delete More Ite…
…ms endpoints. Removed deprecated endpoints Item Based Recommendation and User Based Recommendation.
- Loading branch information
1 parent
a794ac0
commit 4ee8200
Showing
23 changed files
with
582 additions
and
901 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
Src/Recombee.ApiClient.Tests/DeleteMoreItemsBatchUnitTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 DeleteMoreItemsBatchUnitTest: RecombeeUnitTest | ||
{ | ||
|
||
[Fact] | ||
public void TestDeleteMoreItems() | ||
{ | ||
Object resp2; | ||
Request[] requests = new Request[] { | ||
new DeleteMoreItems("'int_property' == 42") | ||
}; | ||
|
||
BatchResponse batchResponse = client.Send(new Batch(requests)); | ||
Assert.Equal(200, (int)batchResponse.StatusCodes.ElementAt(0)); | ||
Assert.Equal(1, ((DeleteMoreItemsResponse) batchResponse[0]).ItemIds.Count()); | ||
Assert.Equal (1,((DeleteMoreItemsResponse) batchResponse[0]).Count); | ||
} | ||
|
||
[Fact] | ||
public async void TestDeleteMoreItemsAsync() | ||
{ | ||
Object resp2; | ||
Request[] requests = new Request[] { | ||
new DeleteMoreItems("'int_property' == 42") | ||
}; | ||
|
||
BatchResponse batchResponse = await client.SendAsync(new Batch(requests)); | ||
Assert.Equal(200, (int)batchResponse.StatusCodes.ElementAt(0)); | ||
Assert.Equal(1, ((DeleteMoreItemsResponse) batchResponse[0]).ItemIds.Count()); | ||
Assert.Equal (1,((DeleteMoreItemsResponse) batchResponse[0]).Count); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 DeleteMoreItemsUnitTest: RecombeeUnitTest | ||
{ | ||
|
||
[Fact] | ||
public void TestDeleteMoreItems() | ||
{ | ||
DeleteMoreItems req; | ||
DeleteMoreItemsResponse resp; | ||
Object resp2; | ||
// it 'deletes more items' | ||
resp = client.Send(new DeleteMoreItems("'int_property' == 42")); | ||
Assert.Equal(1, resp.ItemIds.Count()); | ||
Assert.Equal (1,resp.Count); | ||
} | ||
|
||
[Fact] | ||
public async void TestDeleteMoreItemsAsync() | ||
{ | ||
DeleteMoreItems req; | ||
DeleteMoreItemsResponse resp; | ||
Object resp2; | ||
// it 'deletes more items' | ||
resp = await client.SendAsync(new DeleteMoreItems("'int_property' == 42")); | ||
Assert.Equal(1, resp.ItemIds.Count()); | ||
Assert.Equal (1,resp.Count); | ||
} | ||
} | ||
} |
56 changes: 0 additions & 56 deletions
56
Src/Recombee.ApiClient.Tests/ItemBasedRecommendationBatchUnitTest.cs
This file was deleted.
Oops, something went wrong.
72 changes: 0 additions & 72 deletions
72
Src/Recombee.ApiClient.Tests/ItemBasedRecommendationUnitTest.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
Src/Recombee.ApiClient.Tests/UpdateMoreItemsBatchUnitTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 UpdateMoreItemsBatchUnitTest: RecombeeUnitTest | ||
{ | ||
|
||
[Fact] | ||
public void TestUpdateMoreItems() | ||
{ | ||
Object resp2; | ||
Request[] requests = new Request[] { | ||
new UpdateMoreItems("'int_property' == 42", new Dictionary<string, object>(){{"int_property",77}}) | ||
}; | ||
|
||
BatchResponse batchResponse = client.Send(new Batch(requests)); | ||
Assert.Equal(200, (int)batchResponse.StatusCodes.ElementAt(0)); | ||
Assert.Equal(1, ((UpdateMoreItemsResponse) batchResponse[0]).ItemIds.Count()); | ||
Assert.Equal (1,((UpdateMoreItemsResponse) batchResponse[0]).Count); | ||
} | ||
|
||
[Fact] | ||
public async void TestUpdateMoreItemsAsync() | ||
{ | ||
Object resp2; | ||
Request[] requests = new Request[] { | ||
new UpdateMoreItems("'int_property' == 42", new Dictionary<string, object>(){{"int_property",77}}) | ||
}; | ||
|
||
BatchResponse batchResponse = await client.SendAsync(new Batch(requests)); | ||
Assert.Equal(200, (int)batchResponse.StatusCodes.ElementAt(0)); | ||
Assert.Equal(1, ((UpdateMoreItemsResponse) batchResponse[0]).ItemIds.Count()); | ||
Assert.Equal (1,((UpdateMoreItemsResponse) batchResponse[0]).Count); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 UpdateMoreItemsUnitTest: RecombeeUnitTest | ||
{ | ||
|
||
[Fact] | ||
public void TestUpdateMoreItems() | ||
{ | ||
UpdateMoreItems req; | ||
UpdateMoreItemsResponse resp; | ||
Object resp2; | ||
// it 'updates more items' | ||
resp = client.Send(new UpdateMoreItems("'int_property' == 42", new Dictionary<string, object>(){{"int_property",77}})); | ||
Assert.Equal(1, resp.ItemIds.Count()); | ||
Assert.Equal (1,resp.Count); | ||
} | ||
|
||
[Fact] | ||
public async void TestUpdateMoreItemsAsync() | ||
{ | ||
UpdateMoreItems req; | ||
UpdateMoreItemsResponse resp; | ||
Object resp2; | ||
// it 'updates more items' | ||
resp = await client.SendAsync(new UpdateMoreItems("'int_property' == 42", new Dictionary<string, object>(){{"int_property",77}})); | ||
Assert.Equal(1, resp.ItemIds.Count()); | ||
Assert.Equal (1,resp.Count); | ||
} | ||
} | ||
} |
Oops, something went wrong.