recombee_api_client 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +3 -0
  3. data/LICENSE.txt +21 -0
  4. data/README.md +157 -0
  5. data/Rakefile +6 -0
  6. data/lib/recombee_api_client/api/add_bookmark.rb +70 -0
  7. data/lib/recombee_api_client/api/add_cart_addition.rb +70 -0
  8. data/lib/recombee_api_client/api/add_detail_view.rb +73 -0
  9. data/lib/recombee_api_client/api/add_group.rb +53 -0
  10. data/lib/recombee_api_client/api/add_item.rb +56 -0
  11. data/lib/recombee_api_client/api/add_item_property.rb +59 -0
  12. data/lib/recombee_api_client/api/add_purchase.rb +70 -0
  13. data/lib/recombee_api_client/api/add_rating.rb +73 -0
  14. data/lib/recombee_api_client/api/add_series.rb +53 -0
  15. data/lib/recombee_api_client/api/add_user.rb +54 -0
  16. data/lib/recombee_api_client/api/batch.rb +64 -0
  17. data/lib/recombee_api_client/api/delete_bookmark.rb +61 -0
  18. data/lib/recombee_api_client/api/delete_cart_addition.rb +61 -0
  19. data/lib/recombee_api_client/api/delete_detail_view.rb +61 -0
  20. data/lib/recombee_api_client/api/delete_group.rb +56 -0
  21. data/lib/recombee_api_client/api/delete_item.rb +58 -0
  22. data/lib/recombee_api_client/api/delete_item_property.rb +54 -0
  23. data/lib/recombee_api_client/api/delete_purchase.rb +61 -0
  24. data/lib/recombee_api_client/api/delete_rating.rb +61 -0
  25. data/lib/recombee_api_client/api/delete_series.rb +56 -0
  26. data/lib/recombee_api_client/api/delete_user.rb +56 -0
  27. data/lib/recombee_api_client/api/get_item_property_info.rb +54 -0
  28. data/lib/recombee_api_client/api/get_item_values.rb +55 -0
  29. data/lib/recombee_api_client/api/insert_to_group.rb +69 -0
  30. data/lib/recombee_api_client/api/insert_to_series.rb +72 -0
  31. data/lib/recombee_api_client/api/item_based_recommendation.rb +131 -0
  32. data/lib/recombee_api_client/api/list_group_items.rb +53 -0
  33. data/lib/recombee_api_client/api/list_groups.rb +50 -0
  34. data/lib/recombee_api_client/api/list_item_bookmarks.rb +54 -0
  35. data/lib/recombee_api_client/api/list_item_cart_additions.rb +54 -0
  36. data/lib/recombee_api_client/api/list_item_detail_views.rb +54 -0
  37. data/lib/recombee_api_client/api/list_item_properties.rb +51 -0
  38. data/lib/recombee_api_client/api/list_item_purchases.rb +54 -0
  39. data/lib/recombee_api_client/api/list_item_ratings.rb +54 -0
  40. data/lib/recombee_api_client/api/list_items.rb +63 -0
  41. data/lib/recombee_api_client/api/list_series.rb +50 -0
  42. data/lib/recombee_api_client/api/list_series_items.rb +53 -0
  43. data/lib/recombee_api_client/api/list_user_bookmarks.rb +53 -0
  44. data/lib/recombee_api_client/api/list_user_cart_additions.rb +53 -0
  45. data/lib/recombee_api_client/api/list_user_detail_views.rb +53 -0
  46. data/lib/recombee_api_client/api/list_user_purchases.rb +53 -0
  47. data/lib/recombee_api_client/api/list_user_ratings.rb +53 -0
  48. data/lib/recombee_api_client/api/list_users.rb +50 -0
  49. data/lib/recombee_api_client/api/merge_users.rb +72 -0
  50. data/lib/recombee_api_client/api/remove_from_group.rb +59 -0
  51. data/lib/recombee_api_client/api/remove_from_series.rb +62 -0
  52. data/lib/recombee_api_client/api/request.rb +7 -0
  53. data/lib/recombee_api_client/api/reset_database.rb +51 -0
  54. data/lib/recombee_api_client/api/set_item_values.rb +70 -0
  55. data/lib/recombee_api_client/api/user_based_recommendation.rb +116 -0
  56. data/lib/recombee_api_client/errors.rb +44 -0
  57. data/lib/recombee_api_client/version.rb +3 -0
  58. data/lib/recombee_api_client.rb +105 -0
  59. data/recombee_api_client.gemspec +26 -0
  60. metadata +173 -0
@@ -0,0 +1,61 @@
1
+ #
2
+ # This file is auto-generated, do not edit
3
+ #
4
+
5
+ module RecombeeApiClient
6
+ require_relative 'request'
7
+ require_relative '../errors'
8
+
9
+ ##
10
+ #Deletes an existing cart addition uniquely specified by `userId`, `itemId`, and `timestamp`.
11
+ #
12
+ class DeleteCartAddition < ApiRequest
13
+ attr_reader :user_id, :item_id, :timestamp
14
+ attr_accessor :timeout
15
+
16
+ ##
17
+ # * *Required arguments*
18
+ # - +user_id+ -> ID of the user who made the cart addition.
19
+ # - +item_id+ -> ID of the item of which was added to cart.
20
+ # - +timestamp+ -> Unix timestamp of the cart addition.
21
+ #
22
+ def initialize(user_id, item_id, timestamp)
23
+ @user_id = user_id
24
+ @item_id = item_id
25
+ @timestamp = timestamp
26
+ @timeout = 1000
27
+ end
28
+
29
+ # HTTP method
30
+ def method
31
+ :delete
32
+ end
33
+
34
+ # Values of body parameters as a Hash
35
+ def body_parameters
36
+ p = Hash.new
37
+ p
38
+ end
39
+
40
+ # Values of query path parameters as a Hash.
41
+ # name of parameter => value of the parameter
42
+ def query_parameters
43
+ params = {}
44
+ params['userId'] = @user_id
45
+ params['itemId'] = @item_id
46
+ params['timestamp'] = @timestamp
47
+ params
48
+ end
49
+
50
+ # Relative path to the endpoint
51
+ def basic_path
52
+ "/{databaseId}/cartadditions/"
53
+ end
54
+
55
+ # Relative path to the endpoint including query parameters
56
+ def path
57
+ p = "/{databaseId}/cartadditions/?userId=#{@user_id}&itemId=#{@item_id}&timestamp=#{@timestamp}"
58
+ p
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,61 @@
1
+ #
2
+ # This file is auto-generated, do not edit
3
+ #
4
+
5
+ module RecombeeApiClient
6
+ require_relative 'request'
7
+ require_relative '../errors'
8
+
9
+ ##
10
+ #Deletes an existing detail view uniquely specified by (`userId`, `itemId`, and `timestamp`).
11
+ #
12
+ class DeleteDetailView < ApiRequest
13
+ attr_reader :user_id, :item_id, :timestamp
14
+ attr_accessor :timeout
15
+
16
+ ##
17
+ # * *Required arguments*
18
+ # - +user_id+ -> ID of the user who made the detail view.
19
+ # - +item_id+ -> ID of the item of which the details were viewed.
20
+ # - +timestamp+ -> Unix timestamp of the detail view.
21
+ #
22
+ def initialize(user_id, item_id, timestamp)
23
+ @user_id = user_id
24
+ @item_id = item_id
25
+ @timestamp = timestamp
26
+ @timeout = 1000
27
+ end
28
+
29
+ # HTTP method
30
+ def method
31
+ :delete
32
+ end
33
+
34
+ # Values of body parameters as a Hash
35
+ def body_parameters
36
+ p = Hash.new
37
+ p
38
+ end
39
+
40
+ # Values of query path parameters as a Hash.
41
+ # name of parameter => value of the parameter
42
+ def query_parameters
43
+ params = {}
44
+ params['userId'] = @user_id
45
+ params['itemId'] = @item_id
46
+ params['timestamp'] = @timestamp
47
+ params
48
+ end
49
+
50
+ # Relative path to the endpoint
51
+ def basic_path
52
+ "/{databaseId}/detailviews/"
53
+ end
54
+
55
+ # Relative path to the endpoint including query parameters
56
+ def path
57
+ p = "/{databaseId}/detailviews/?userId=#{@user_id}&itemId=#{@item_id}&timestamp=#{@timestamp}"
58
+ p
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,56 @@
1
+ #
2
+ # This file is auto-generated, do not edit
3
+ #
4
+
5
+ module RecombeeApiClient
6
+ require_relative 'request'
7
+ require_relative '../errors'
8
+
9
+ ##
10
+ #Deletes the group of given `groupId` from the database.
11
+ #
12
+ #Deleting a group will only delete assignment of items to it, not the items themselves!
13
+ #
14
+ class DeleteGroup < ApiRequest
15
+ attr_reader :group_id
16
+ attr_accessor :timeout
17
+
18
+ ##
19
+ # * *Required arguments*
20
+ # - +group_id+ -> ID of the group to be deleted.
21
+ #
22
+ def initialize(group_id)
23
+ @group_id = group_id
24
+ @timeout = 1000
25
+ end
26
+
27
+ # HTTP method
28
+ def method
29
+ :delete
30
+ end
31
+
32
+ # Values of body parameters as a Hash
33
+ def body_parameters
34
+ p = Hash.new
35
+ p
36
+ end
37
+
38
+ # Values of query path parameters as a Hash.
39
+ # name of parameter => value of the parameter
40
+ def query_parameters
41
+ params = {}
42
+ params
43
+ end
44
+
45
+ # Relative path to the endpoint
46
+ def basic_path
47
+ "/{databaseId}/groups/#{@group_id}"
48
+ end
49
+
50
+ # Relative path to the endpoint including query parameters
51
+ def path
52
+ p = "/{databaseId}/groups/#{@group_id}"
53
+ p
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,58 @@
1
+ #
2
+ # This file is auto-generated, do not edit
3
+ #
4
+
5
+ module RecombeeApiClient
6
+ require_relative 'request'
7
+ require_relative '../errors'
8
+
9
+ ##
10
+ #Deletes an item of given `itemId` from the catalog.
11
+ #
12
+ #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.
13
+ #
14
+ #If an item becomes obsolete/no longer available, it is often 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.
15
+ #
16
+ class DeleteItem < ApiRequest
17
+ attr_reader :item_id
18
+ attr_accessor :timeout
19
+
20
+ ##
21
+ # * *Required arguments*
22
+ # - +item_id+ -> ID of the item to be deleted.
23
+ #
24
+ def initialize(item_id)
25
+ @item_id = item_id
26
+ @timeout = 1000
27
+ end
28
+
29
+ # HTTP method
30
+ def method
31
+ :delete
32
+ end
33
+
34
+ # Values of body parameters as a Hash
35
+ def body_parameters
36
+ p = Hash.new
37
+ p
38
+ end
39
+
40
+ # Values of query path parameters as a Hash.
41
+ # name of parameter => value of the parameter
42
+ def query_parameters
43
+ params = {}
44
+ params
45
+ end
46
+
47
+ # Relative path to the endpoint
48
+ def basic_path
49
+ "/{databaseId}/items/#{@item_id}"
50
+ end
51
+
52
+ # Relative path to the endpoint including query parameters
53
+ def path
54
+ p = "/{databaseId}/items/#{@item_id}"
55
+ p
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,54 @@
1
+ #
2
+ # This file is auto-generated, do not edit
3
+ #
4
+
5
+ module RecombeeApiClient
6
+ require_relative 'request'
7
+ require_relative '../errors'
8
+
9
+ ##
10
+ #Deleting an item property is roughly equivalent to removing a column from the table of items.
11
+ #
12
+ class DeleteItemProperty < ApiRequest
13
+ attr_reader :property_name
14
+ attr_accessor :timeout
15
+
16
+ ##
17
+ # * *Required arguments*
18
+ # - +property_name+ -> Name of the property to be deleted.
19
+ #
20
+ def initialize(property_name)
21
+ @property_name = property_name
22
+ @timeout = 1000
23
+ end
24
+
25
+ # HTTP method
26
+ def method
27
+ :delete
28
+ end
29
+
30
+ # Values of body parameters as a Hash
31
+ def body_parameters
32
+ p = Hash.new
33
+ p
34
+ end
35
+
36
+ # Values of query path parameters as a Hash.
37
+ # name of parameter => value of the parameter
38
+ def query_parameters
39
+ params = {}
40
+ params
41
+ end
42
+
43
+ # Relative path to the endpoint
44
+ def basic_path
45
+ "/{databaseId}/items/properties/#{@property_name}"
46
+ end
47
+
48
+ # Relative path to the endpoint including query parameters
49
+ def path
50
+ p = "/{databaseId}/items/properties/#{@property_name}"
51
+ p
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,61 @@
1
+ #
2
+ # This file is auto-generated, do not edit
3
+ #
4
+
5
+ module RecombeeApiClient
6
+ require_relative 'request'
7
+ require_relative '../errors'
8
+
9
+ ##
10
+ #Deletes an existing purchase uniquely specified by `userId`, `itemId`, and `timestamp`.
11
+ #
12
+ class DeletePurchase < ApiRequest
13
+ attr_reader :user_id, :item_id, :timestamp
14
+ attr_accessor :timeout
15
+
16
+ ##
17
+ # * *Required arguments*
18
+ # - +user_id+ -> ID of the user who made the purchase.
19
+ # - +item_id+ -> ID of the item of which was purchased.
20
+ # - +timestamp+ -> Unix timestamp of the purchase.
21
+ #
22
+ def initialize(user_id, item_id, timestamp)
23
+ @user_id = user_id
24
+ @item_id = item_id
25
+ @timestamp = timestamp
26
+ @timeout = 1000
27
+ end
28
+
29
+ # HTTP method
30
+ def method
31
+ :delete
32
+ end
33
+
34
+ # Values of body parameters as a Hash
35
+ def body_parameters
36
+ p = Hash.new
37
+ p
38
+ end
39
+
40
+ # Values of query path parameters as a Hash.
41
+ # name of parameter => value of the parameter
42
+ def query_parameters
43
+ params = {}
44
+ params['userId'] = @user_id
45
+ params['itemId'] = @item_id
46
+ params['timestamp'] = @timestamp
47
+ params
48
+ end
49
+
50
+ # Relative path to the endpoint
51
+ def basic_path
52
+ "/{databaseId}/purchases/"
53
+ end
54
+
55
+ # Relative path to the endpoint including query parameters
56
+ def path
57
+ p = "/{databaseId}/purchases/?userId=#{@user_id}&itemId=#{@item_id}&timestamp=#{@timestamp}"
58
+ p
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,61 @@
1
+ #
2
+ # This file is auto-generated, do not edit
3
+ #
4
+
5
+ module RecombeeApiClient
6
+ require_relative 'request'
7
+ require_relative '../errors'
8
+
9
+ ##
10
+ #Deletes an existing rating specified by (`userId`, `itemId`, `timestamp`) from the database.
11
+ #
12
+ class DeleteRating < ApiRequest
13
+ attr_reader :user_id, :item_id, :timestamp
14
+ attr_accessor :timeout
15
+
16
+ ##
17
+ # * *Required arguments*
18
+ # - +user_id+ -> ID of the user who rated the item.
19
+ # - +item_id+ -> ID of the item which was rated.
20
+ # - +timestamp+ -> Unix timestamp of the rating.
21
+ #
22
+ def initialize(user_id, item_id, timestamp)
23
+ @user_id = user_id
24
+ @item_id = item_id
25
+ @timestamp = timestamp
26
+ @timeout = 1000
27
+ end
28
+
29
+ # HTTP method
30
+ def method
31
+ :delete
32
+ end
33
+
34
+ # Values of body parameters as a Hash
35
+ def body_parameters
36
+ p = Hash.new
37
+ p
38
+ end
39
+
40
+ # Values of query path parameters as a Hash.
41
+ # name of parameter => value of the parameter
42
+ def query_parameters
43
+ params = {}
44
+ params['userId'] = @user_id
45
+ params['itemId'] = @item_id
46
+ params['timestamp'] = @timestamp
47
+ params
48
+ end
49
+
50
+ # Relative path to the endpoint
51
+ def basic_path
52
+ "/{databaseId}/ratings/"
53
+ end
54
+
55
+ # Relative path to the endpoint including query parameters
56
+ def path
57
+ p = "/{databaseId}/ratings/?userId=#{@user_id}&itemId=#{@item_id}&timestamp=#{@timestamp}"
58
+ p
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,56 @@
1
+ #
2
+ # This file is auto-generated, do not edit
3
+ #
4
+
5
+ module RecombeeApiClient
6
+ require_relative 'request'
7
+ require_relative '../errors'
8
+
9
+ ##
10
+ #Deletes the series of given `seriesId` from the database.
11
+ #
12
+ #Deleting a series will only delete assignment of items to it, not the items themselves!
13
+ #
14
+ class DeleteSeries < ApiRequest
15
+ attr_reader :series_id
16
+ attr_accessor :timeout
17
+
18
+ ##
19
+ # * *Required arguments*
20
+ # - +series_id+ -> ID of the series to be deleted.
21
+ #
22
+ def initialize(series_id)
23
+ @series_id = series_id
24
+ @timeout = 1000
25
+ end
26
+
27
+ # HTTP method
28
+ def method
29
+ :delete
30
+ end
31
+
32
+ # Values of body parameters as a Hash
33
+ def body_parameters
34
+ p = Hash.new
35
+ p
36
+ end
37
+
38
+ # Values of query path parameters as a Hash.
39
+ # name of parameter => value of the parameter
40
+ def query_parameters
41
+ params = {}
42
+ params
43
+ end
44
+
45
+ # Relative path to the endpoint
46
+ def basic_path
47
+ "/{databaseId}/series/#{@series_id}"
48
+ end
49
+
50
+ # Relative path to the endpoint including query parameters
51
+ def path
52
+ p = "/{databaseId}/series/#{@series_id}"
53
+ p
54
+ end
55
+ end
56
+ end