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,50 @@
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
+ #Gets the list of all the groups currently present in the database.
11
+ class ListGroups < ApiRequest
12
+
13
+ attr_accessor :timeout
14
+
15
+ ##
16
+ #
17
+ def initialize()
18
+ @timeout = 1000
19
+ end
20
+
21
+ # HTTP method
22
+ def method
23
+ :get
24
+ end
25
+
26
+ # Values of body parameters as a Hash
27
+ def body_parameters
28
+ p = Hash.new
29
+ p
30
+ end
31
+
32
+ # Values of query path parameters as a Hash.
33
+ # name of parameter => value of the parameter
34
+ def query_parameters
35
+ params = {}
36
+ params
37
+ end
38
+
39
+ # Relative path to the endpoint
40
+ def basic_path
41
+ "/{databaseId}/groups/list/"
42
+ end
43
+
44
+ # Relative path to the endpoint including query parameters
45
+ def path
46
+ p = "/{databaseId}/groups/list/"
47
+ p
48
+ end
49
+ end
50
+ 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
+ #List all the ever-made bookmarks of a given item.
11
+ class ListItemBookmarks < ApiRequest
12
+ attr_reader :item_id
13
+ attr_accessor :timeout
14
+
15
+ ##
16
+ # * *Required arguments*
17
+ # - +item_id+ -> ID of the item of which the bookmarks are to be listed.
18
+ #
19
+ #
20
+ def initialize(item_id)
21
+ @item_id = item_id
22
+ @timeout = 1000
23
+ end
24
+
25
+ # HTTP method
26
+ def method
27
+ :get
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/#{@item_id}/bookmarks/"
46
+ end
47
+
48
+ # Relative path to the endpoint including query parameters
49
+ def path
50
+ p = "/{databaseId}/items/#{@item_id}/bookmarks/"
51
+ p
52
+ end
53
+ end
54
+ 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
+ #List all the ever-made cart addition of a given item.
11
+ class ListItemCartAdditions < ApiRequest
12
+ attr_reader :item_id
13
+ attr_accessor :timeout
14
+
15
+ ##
16
+ # * *Required arguments*
17
+ # - +item_id+ -> ID of the item of which the cart addition are to be listed.
18
+ #
19
+ #
20
+ def initialize(item_id)
21
+ @item_id = item_id
22
+ @timeout = 1000
23
+ end
24
+
25
+ # HTTP method
26
+ def method
27
+ :get
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/#{@item_id}/cartadditions/"
46
+ end
47
+
48
+ # Relative path to the endpoint including query parameters
49
+ def path
50
+ p = "/{databaseId}/items/#{@item_id}/cartadditions/"
51
+ p
52
+ end
53
+ end
54
+ 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
+ #List all the detail views of a given item ever made by different users.
11
+ class ListItemDetailViews < ApiRequest
12
+ attr_reader :item_id
13
+ attr_accessor :timeout
14
+
15
+ ##
16
+ # * *Required arguments*
17
+ # - +item_id+ -> ID of the item of which the detail views are to be listed.
18
+ #
19
+ #
20
+ def initialize(item_id)
21
+ @item_id = item_id
22
+ @timeout = 1000
23
+ end
24
+
25
+ # HTTP method
26
+ def method
27
+ :get
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/#{@item_id}/detailviews/"
46
+ end
47
+
48
+ # Relative path to the endpoint including query parameters
49
+ def path
50
+ p = "/{databaseId}/items/#{@item_id}/detailviews/"
51
+ p
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,51 @@
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
+ #Gets the list of all the item properties in your database.
11
+ #
12
+ class ListItemProperties < ApiRequest
13
+
14
+ attr_accessor :timeout
15
+
16
+ ##
17
+ #
18
+ def initialize()
19
+ @timeout = 1000
20
+ end
21
+
22
+ # HTTP method
23
+ def method
24
+ :get
25
+ end
26
+
27
+ # Values of body parameters as a Hash
28
+ def body_parameters
29
+ p = Hash.new
30
+ p
31
+ end
32
+
33
+ # Values of query path parameters as a Hash.
34
+ # name of parameter => value of the parameter
35
+ def query_parameters
36
+ params = {}
37
+ params
38
+ end
39
+
40
+ # Relative path to the endpoint
41
+ def basic_path
42
+ "/{databaseId}/items/properties/list/"
43
+ end
44
+
45
+ # Relative path to the endpoint including query parameters
46
+ def path
47
+ p = "/{databaseId}/items/properties/list/"
48
+ p
49
+ end
50
+ end
51
+ 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
+ #List all the ever-made purchases of a given item.
11
+ class ListItemPurchases < ApiRequest
12
+ attr_reader :item_id
13
+ attr_accessor :timeout
14
+
15
+ ##
16
+ # * *Required arguments*
17
+ # - +item_id+ -> ID of the item of which the pucrhases are to be listed.
18
+ #
19
+ #
20
+ def initialize(item_id)
21
+ @item_id = item_id
22
+ @timeout = 1000
23
+ end
24
+
25
+ # HTTP method
26
+ def method
27
+ :get
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/#{@item_id}/purchases/"
46
+ end
47
+
48
+ # Relative path to the endpoint including query parameters
49
+ def path
50
+ p = "/{databaseId}/items/#{@item_id}/purchases/"
51
+ p
52
+ end
53
+ end
54
+ 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
+ #List all the ratings of an item ever submitted by different users.
11
+ class ListItemRatings < ApiRequest
12
+ attr_reader :item_id
13
+ attr_accessor :timeout
14
+
15
+ ##
16
+ # * *Required arguments*
17
+ # - +item_id+ -> ID of the item of which the ratings are to be listed.
18
+ #
19
+ #
20
+ def initialize(item_id)
21
+ @item_id = item_id
22
+ @timeout = 1000
23
+ end
24
+
25
+ # HTTP method
26
+ def method
27
+ :get
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/#{@item_id}/ratings/"
46
+ end
47
+
48
+ # Relative path to the endpoint including query parameters
49
+ def path
50
+ p = "/{databaseId}/items/#{@item_id}/ratings/"
51
+ p
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,63 @@
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
+ #Gets a list of IDs of items currently present in the catalog.
11
+ class ListItems < ApiRequest
12
+ attr_reader :filter
13
+ attr_accessor :timeout
14
+
15
+ ##
16
+ #
17
+ # * *Optional arguments (given as hash optional)*
18
+ # - +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.
19
+ #
20
+ def initialize(optional = {})
21
+ @filter = optional['filter']
22
+ @optional = optional
23
+ @timeout = 1000
24
+ @optional.each do |par, _|
25
+ fail UnknownOptionalParameter.new(par) unless ["filter"].include? par
26
+ end
27
+ end
28
+
29
+ # HTTP method
30
+ def method
31
+ :get
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['filter'] = @optional['filter'] if @optional['filter']
45
+ params
46
+ end
47
+
48
+ # Relative path to the endpoint
49
+ def basic_path
50
+ "/{databaseId}/items/list/"
51
+ end
52
+
53
+ # Relative path to the endpoint including query parameters
54
+ def path
55
+ p = "/{databaseId}/items/list/"
56
+ if @optional.include? 'filter'
57
+ p += (p.include? '?') ? '&' : '?'
58
+ p += "filter=#{@optional['filter']}"
59
+ end
60
+ p
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,50 @@
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
+ #Gets the list of all the series currently present in the database.
11
+ class ListSeries < ApiRequest
12
+
13
+ attr_accessor :timeout
14
+
15
+ ##
16
+ #
17
+ def initialize()
18
+ @timeout = 1000
19
+ end
20
+
21
+ # HTTP method
22
+ def method
23
+ :get
24
+ end
25
+
26
+ # Values of body parameters as a Hash
27
+ def body_parameters
28
+ p = Hash.new
29
+ p
30
+ end
31
+
32
+ # Values of query path parameters as a Hash.
33
+ # name of parameter => value of the parameter
34
+ def query_parameters
35
+ params = {}
36
+ params
37
+ end
38
+
39
+ # Relative path to the endpoint
40
+ def basic_path
41
+ "/{databaseId}/series/list/"
42
+ end
43
+
44
+ # Relative path to the endpoint including query parameters
45
+ def path
46
+ p = "/{databaseId}/series/list/"
47
+ p
48
+ end
49
+ end
50
+ end