recombee_api_client 5.1.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/lib/recombee_api_client/api/add_bookmark.rb +26 -26
  3. data/lib/recombee_api_client/api/add_cart_addition.rb +28 -28
  4. data/lib/recombee_api_client/api/add_detail_view.rb +32 -28
  5. data/lib/recombee_api_client/api/add_item.rb +15 -18
  6. data/lib/recombee_api_client/api/add_item_property.rb +34 -35
  7. data/lib/recombee_api_client/api/add_manual_reql_segment.rb +26 -27
  8. data/lib/recombee_api_client/api/add_purchase.rb +29 -29
  9. data/lib/recombee_api_client/api/add_rating.rb +27 -27
  10. data/lib/recombee_api_client/api/add_search_synonym.rb +29 -30
  11. data/lib/recombee_api_client/api/add_series.rb +20 -21
  12. data/lib/recombee_api_client/api/add_user.rb +14 -17
  13. data/lib/recombee_api_client/api/add_user_property.rb +30 -31
  14. data/lib/recombee_api_client/api/batch.rb +12 -16
  15. data/lib/recombee_api_client/api/composite_recommendation.rb +132 -0
  16. data/lib/recombee_api_client/api/create_auto_reql_segmentation.rb +29 -30
  17. data/lib/recombee_api_client/api/create_manual_reql_segmentation.rb +27 -28
  18. data/lib/recombee_api_client/api/create_property_based_segmentation.rb +30 -31
  19. data/lib/recombee_api_client/api/delete_all_search_synonyms.rb +15 -19
  20. data/lib/recombee_api_client/api/delete_bookmark.rb +21 -22
  21. data/lib/recombee_api_client/api/delete_cart_addition.rb +21 -22
  22. data/lib/recombee_api_client/api/delete_detail_view.rb +21 -22
  23. data/lib/recombee_api_client/api/delete_item.rb +16 -19
  24. data/lib/recombee_api_client/api/delete_item_property.rb +15 -18
  25. data/lib/recombee_api_client/api/delete_manual_reql_segment.rb +16 -19
  26. data/lib/recombee_api_client/api/delete_more_items.rb +18 -19
  27. data/lib/recombee_api_client/api/delete_purchase.rb +21 -22
  28. data/lib/recombee_api_client/api/delete_rating.rb +21 -22
  29. data/lib/recombee_api_client/api/delete_search_synonym.rb +15 -18
  30. data/lib/recombee_api_client/api/delete_segmentation.rb +15 -18
  31. data/lib/recombee_api_client/api/delete_series.rb +21 -22
  32. data/lib/recombee_api_client/api/delete_user.rb +15 -18
  33. data/lib/recombee_api_client/api/delete_user_property.rb +15 -18
  34. data/lib/recombee_api_client/api/delete_view_portion.rb +21 -22
  35. data/lib/recombee_api_client/api/get_item_property_info.rb +14 -17
  36. data/lib/recombee_api_client/api/get_item_values.rb +15 -18
  37. data/lib/recombee_api_client/api/get_segmentation.rb +15 -18
  38. data/lib/recombee_api_client/api/get_user_property_info.rb +15 -18
  39. data/lib/recombee_api_client/api/get_user_values.rb +15 -18
  40. data/lib/recombee_api_client/api/insert_to_series.rb +23 -24
  41. data/lib/recombee_api_client/api/list_item_bookmarks.rb +16 -19
  42. data/lib/recombee_api_client/api/list_item_cart_additions.rb +16 -19
  43. data/lib/recombee_api_client/api/list_item_detail_views.rb +16 -19
  44. data/lib/recombee_api_client/api/list_item_properties.rb +15 -19
  45. data/lib/recombee_api_client/api/list_item_purchases.rb +16 -19
  46. data/lib/recombee_api_client/api/list_item_ratings.rb +16 -19
  47. data/lib/recombee_api_client/api/list_item_view_portions.rb +16 -19
  48. data/lib/recombee_api_client/api/list_items.rb +62 -62
  49. data/lib/recombee_api_client/api/list_scenarios.rb +15 -19
  50. data/lib/recombee_api_client/api/list_search_synonyms.rb +20 -21
  51. data/lib/recombee_api_client/api/list_segmentations.rb +16 -17
  52. data/lib/recombee_api_client/api/list_series.rb +15 -19
  53. data/lib/recombee_api_client/api/list_series_items.rb +15 -18
  54. data/lib/recombee_api_client/api/list_user_bookmarks.rb +15 -18
  55. data/lib/recombee_api_client/api/list_user_cart_additions.rb +15 -18
  56. data/lib/recombee_api_client/api/list_user_detail_views.rb +15 -18
  57. data/lib/recombee_api_client/api/list_user_properties.rb +15 -19
  58. data/lib/recombee_api_client/api/list_user_purchases.rb +15 -18
  59. data/lib/recombee_api_client/api/list_user_ratings.rb +15 -18
  60. data/lib/recombee_api_client/api/list_user_view_portions.rb +15 -18
  61. data/lib/recombee_api_client/api/list_users.rb +56 -56
  62. data/lib/recombee_api_client/api/merge_users.rb +24 -25
  63. data/lib/recombee_api_client/api/recommend_item_segments_to_item.rb +69 -68
  64. data/lib/recombee_api_client/api/recommend_item_segments_to_item_segment.rb +70 -69
  65. data/lib/recombee_api_client/api/recommend_item_segments_to_user.rb +51 -50
  66. data/lib/recombee_api_client/api/recommend_items_to_item.rb +185 -139
  67. data/lib/recombee_api_client/api/recommend_items_to_item_segment.rb +181 -138
  68. data/lib/recombee_api_client/api/recommend_items_to_user.rb +165 -122
  69. data/lib/recombee_api_client/api/recommend_next_items.rb +24 -25
  70. data/lib/recombee_api_client/api/recommend_users_to_item.rb +151 -105
  71. data/lib/recombee_api_client/api/recommend_users_to_user.rb +154 -111
  72. data/lib/recombee_api_client/api/remove_from_series.rb +17 -18
  73. data/lib/recombee_api_client/api/request.rb +1 -1
  74. data/lib/recombee_api_client/api/reset_database.rb +15 -19
  75. data/lib/recombee_api_client/api/search_item_segments.rb +52 -51
  76. data/lib/recombee_api_client/api/search_items.rb +157 -114
  77. data/lib/recombee_api_client/api/set_item_values.rb +28 -29
  78. data/lib/recombee_api_client/api/set_user_values.rb +21 -22
  79. data/lib/recombee_api_client/api/set_values.rb +28 -28
  80. data/lib/recombee_api_client/api/set_view_portion.rb +37 -30
  81. data/lib/recombee_api_client/api/update_auto_reql_segmentation.rb +26 -27
  82. data/lib/recombee_api_client/api/update_manual_reql_segment.rb +25 -26
  83. data/lib/recombee_api_client/api/update_manual_reql_segmentation.rb +24 -25
  84. data/lib/recombee_api_client/api/update_more_items.rb +19 -20
  85. data/lib/recombee_api_client/api/update_property_based_segmentation.rb +26 -27
  86. data/lib/recombee_api_client/errors.rb +2 -5
  87. data/lib/recombee_api_client/inputs/composite_recommendation_stage_parameters.rb +240 -0
  88. data/lib/recombee_api_client/inputs/input.rb +9 -0
  89. data/lib/recombee_api_client/inputs/logic.rb +45 -0
  90. data/lib/recombee_api_client/utils/hash_normalizer.rb +21 -0
  91. data/lib/recombee_api_client/version.rb +1 -1
  92. data/lib/recombee_api_client.rb +40 -35
  93. data/recombee_api_client.gemspec +2 -3
  94. metadata +14 -10
  95. data/lib/recombee_api_client/api/hash_normalizer.rb +0 -21
@@ -5,43 +5,40 @@
5
5
  module RecombeeApiClient
6
6
  require_relative 'request'
7
7
  require_relative '../errors'
8
-
8
+
9
9
  ##
10
- #Lists all the ever-made bookmarks of the given item.
10
+ # Lists all the ever-made bookmarks of the given item.#
11
11
  class ListItemBookmarks < ApiRequest
12
12
  attr_reader :item_id
13
- attr_accessor :timeout
14
- attr_accessor :ensure_https
15
-
16
- ##
17
- # * *Required arguments*
18
- # - +item_id+ -> ID of the item whose bookmarks are to be listed.
19
- #
20
- #
13
+ attr_accessor :timeout, :ensure_https
14
+
15
+ ##
16
+ # * *Required arguments*
17
+ # - +item_id+ -> ID of the item whose bookmarks are to be listed.
18
+ #
19
+ #
21
20
  def initialize(item_id)
22
21
  @item_id = item_id
23
- @timeout = 100000
22
+ @timeout = 100_000
24
23
  @ensure_https = false
25
24
  end
26
-
25
+
27
26
  # HTTP method
28
27
  def method
29
28
  :get
30
29
  end
31
-
30
+
32
31
  # Values of body parameters as a Hash
33
32
  def body_parameters
34
- p = Hash.new
35
- p
33
+ {}
36
34
  end
37
-
35
+
38
36
  # Values of query parameters as a Hash.
39
37
  # name of parameter => value of the parameter
40
38
  def query_parameters
41
- params = {}
42
- params
39
+ {}
43
40
  end
44
-
41
+
45
42
  # Relative path to the endpoint
46
43
  def path
47
44
  "/{databaseId}/items/#{@item_id}/bookmarks/"
@@ -5,43 +5,40 @@
5
5
  module RecombeeApiClient
6
6
  require_relative 'request'
7
7
  require_relative '../errors'
8
-
8
+
9
9
  ##
10
- #Lists all the ever-made cart additions of the given item.
10
+ # Lists all the ever-made cart additions of the given item.#
11
11
  class ListItemCartAdditions < ApiRequest
12
12
  attr_reader :item_id
13
- attr_accessor :timeout
14
- attr_accessor :ensure_https
15
-
16
- ##
17
- # * *Required arguments*
18
- # - +item_id+ -> ID of the item whose cart additions are to be listed.
19
- #
20
- #
13
+ attr_accessor :timeout, :ensure_https
14
+
15
+ ##
16
+ # * *Required arguments*
17
+ # - +item_id+ -> ID of the item whose cart additions are to be listed.
18
+ #
19
+ #
21
20
  def initialize(item_id)
22
21
  @item_id = item_id
23
- @timeout = 100000
22
+ @timeout = 100_000
24
23
  @ensure_https = false
25
24
  end
26
-
25
+
27
26
  # HTTP method
28
27
  def method
29
28
  :get
30
29
  end
31
-
30
+
32
31
  # Values of body parameters as a Hash
33
32
  def body_parameters
34
- p = Hash.new
35
- p
33
+ {}
36
34
  end
37
-
35
+
38
36
  # Values of query parameters as a Hash.
39
37
  # name of parameter => value of the parameter
40
38
  def query_parameters
41
- params = {}
42
- params
39
+ {}
43
40
  end
44
-
41
+
45
42
  # Relative path to the endpoint
46
43
  def path
47
44
  "/{databaseId}/items/#{@item_id}/cartadditions/"
@@ -5,43 +5,40 @@
5
5
  module RecombeeApiClient
6
6
  require_relative 'request'
7
7
  require_relative '../errors'
8
-
8
+
9
9
  ##
10
- #Lists all the detail views of the given item ever made by different users.
10
+ # Lists all the detail views of the given item ever made by different users.#
11
11
  class ListItemDetailViews < ApiRequest
12
12
  attr_reader :item_id
13
- attr_accessor :timeout
14
- attr_accessor :ensure_https
15
-
16
- ##
17
- # * *Required arguments*
18
- # - +item_id+ -> ID of the item whose detail views are to be listed.
19
- #
20
- #
13
+ attr_accessor :timeout, :ensure_https
14
+
15
+ ##
16
+ # * *Required arguments*
17
+ # - +item_id+ -> ID of the item whose detail views are to be listed.
18
+ #
19
+ #
21
20
  def initialize(item_id)
22
21
  @item_id = item_id
23
- @timeout = 100000
22
+ @timeout = 100_000
24
23
  @ensure_https = false
25
24
  end
26
-
25
+
27
26
  # HTTP method
28
27
  def method
29
28
  :get
30
29
  end
31
-
30
+
32
31
  # Values of body parameters as a Hash
33
32
  def body_parameters
34
- p = Hash.new
35
- p
33
+ {}
36
34
  end
37
-
35
+
38
36
  # Values of query parameters as a Hash.
39
37
  # name of parameter => value of the parameter
40
38
  def query_parameters
41
- params = {}
42
- params
39
+ {}
43
40
  end
44
-
41
+
45
42
  # Relative path to the endpoint
46
43
  def path
47
44
  "/{databaseId}/items/#{@item_id}/detailviews/"
@@ -5,43 +5,39 @@
5
5
  module RecombeeApiClient
6
6
  require_relative 'request'
7
7
  require_relative '../errors'
8
-
8
+
9
9
  ##
10
- #Gets the list of all the item properties in your database.
10
+ # Gets the list of all the item properties in your database.
11
11
  #
12
12
  class ListItemProperties < ApiRequest
13
-
14
- attr_accessor :timeout
15
- attr_accessor :ensure_https
16
-
17
- ##
18
- #
19
- def initialize()
20
- @timeout = 100000
13
+ attr_accessor :timeout, :ensure_https
14
+
15
+ ##
16
+ #
17
+ def initialize
18
+ @timeout = 100_000
21
19
  @ensure_https = false
22
20
  end
23
-
21
+
24
22
  # HTTP method
25
23
  def method
26
24
  :get
27
25
  end
28
-
26
+
29
27
  # Values of body parameters as a Hash
30
28
  def body_parameters
31
- p = Hash.new
32
- p
29
+ {}
33
30
  end
34
-
31
+
35
32
  # Values of query parameters as a Hash.
36
33
  # name of parameter => value of the parameter
37
34
  def query_parameters
38
- params = {}
39
- params
35
+ {}
40
36
  end
41
-
37
+
42
38
  # Relative path to the endpoint
43
39
  def path
44
- "/{databaseId}/items/properties/list/"
40
+ '/{databaseId}/items/properties/list/'
45
41
  end
46
42
  end
47
43
  end
@@ -5,43 +5,40 @@
5
5
  module RecombeeApiClient
6
6
  require_relative 'request'
7
7
  require_relative '../errors'
8
-
8
+
9
9
  ##
10
- #Lists all the ever-made purchases of the given item.
10
+ # Lists all the ever-made purchases of the given item.#
11
11
  class ListItemPurchases < ApiRequest
12
12
  attr_reader :item_id
13
- attr_accessor :timeout
14
- attr_accessor :ensure_https
15
-
16
- ##
17
- # * *Required arguments*
18
- # - +item_id+ -> ID of the item whose purchases are to be listed.
19
- #
20
- #
13
+ attr_accessor :timeout, :ensure_https
14
+
15
+ ##
16
+ # * *Required arguments*
17
+ # - +item_id+ -> ID of the item whose purchases are to be listed.
18
+ #
19
+ #
21
20
  def initialize(item_id)
22
21
  @item_id = item_id
23
- @timeout = 100000
22
+ @timeout = 100_000
24
23
  @ensure_https = false
25
24
  end
26
-
25
+
27
26
  # HTTP method
28
27
  def method
29
28
  :get
30
29
  end
31
-
30
+
32
31
  # Values of body parameters as a Hash
33
32
  def body_parameters
34
- p = Hash.new
35
- p
33
+ {}
36
34
  end
37
-
35
+
38
36
  # Values of query parameters as a Hash.
39
37
  # name of parameter => value of the parameter
40
38
  def query_parameters
41
- params = {}
42
- params
39
+ {}
43
40
  end
44
-
41
+
45
42
  # Relative path to the endpoint
46
43
  def path
47
44
  "/{databaseId}/items/#{@item_id}/purchases/"
@@ -5,43 +5,40 @@
5
5
  module RecombeeApiClient
6
6
  require_relative 'request'
7
7
  require_relative '../errors'
8
-
8
+
9
9
  ##
10
- #Lists all the ratings of an item ever submitted by different users.
10
+ # Lists all the ratings of an item ever submitted by different users.#
11
11
  class ListItemRatings < ApiRequest
12
12
  attr_reader :item_id
13
- attr_accessor :timeout
14
- attr_accessor :ensure_https
15
-
16
- ##
17
- # * *Required arguments*
18
- # - +item_id+ -> ID of the item whose ratings are to be listed.
19
- #
20
- #
13
+ attr_accessor :timeout, :ensure_https
14
+
15
+ ##
16
+ # * *Required arguments*
17
+ # - +item_id+ -> ID of the item whose ratings are to be listed.
18
+ #
19
+ #
21
20
  def initialize(item_id)
22
21
  @item_id = item_id
23
- @timeout = 100000
22
+ @timeout = 100_000
24
23
  @ensure_https = false
25
24
  end
26
-
25
+
27
26
  # HTTP method
28
27
  def method
29
28
  :get
30
29
  end
31
-
30
+
32
31
  # Values of body parameters as a Hash
33
32
  def body_parameters
34
- p = Hash.new
35
- p
33
+ {}
36
34
  end
37
-
35
+
38
36
  # Values of query parameters as a Hash.
39
37
  # name of parameter => value of the parameter
40
38
  def query_parameters
41
- params = {}
42
- params
39
+ {}
43
40
  end
44
-
41
+
45
42
  # Relative path to the endpoint
46
43
  def path
47
44
  "/{databaseId}/items/#{@item_id}/ratings/"
@@ -5,44 +5,41 @@
5
5
  module RecombeeApiClient
6
6
  require_relative 'request'
7
7
  require_relative '../errors'
8
-
8
+
9
9
  ##
10
- #Lists all the view portions of an item ever submitted by different users.
10
+ # Lists all the view portions of an item ever submitted by different users.
11
11
  #
12
12
  class ListItemViewPortions < ApiRequest
13
13
  attr_reader :item_id
14
- attr_accessor :timeout
15
- attr_accessor :ensure_https
16
-
17
- ##
18
- # * *Required arguments*
19
- # - +item_id+ -> ID of the item whose view portions are to be listed.
20
- #
21
- #
14
+ attr_accessor :timeout, :ensure_https
15
+
16
+ ##
17
+ # * *Required arguments*
18
+ # - +item_id+ -> ID of the item whose view portions are to be listed.
19
+ #
20
+ #
22
21
  def initialize(item_id)
23
22
  @item_id = item_id
24
- @timeout = 100000
23
+ @timeout = 100_000
25
24
  @ensure_https = false
26
25
  end
27
-
26
+
28
27
  # HTTP method
29
28
  def method
30
29
  :get
31
30
  end
32
-
31
+
33
32
  # Values of body parameters as a Hash
34
33
  def body_parameters
35
- p = Hash.new
36
- p
34
+ {}
37
35
  end
38
-
36
+
39
37
  # Values of query parameters as a Hash.
40
38
  # name of parameter => value of the parameter
41
39
  def query_parameters
42
- params = {}
43
- params
40
+ {}
44
41
  end
45
-
42
+
46
43
  # Relative path to the endpoint
47
44
  def path
48
45
  "/{databaseId}/items/#{@item_id}/viewportions/"
@@ -5,87 +5,86 @@
5
5
  module RecombeeApiClient
6
6
  require_relative 'request'
7
7
  require_relative '../errors'
8
-
8
+
9
9
  ##
10
- #Gets a list of IDs of items currently present in the catalog.
10
+ # Gets a list of IDs of items currently present in the catalog.#
11
11
  class ListItems < ApiRequest
12
12
  attr_reader :filter, :count, :offset, :return_properties, :included_properties
13
- attr_accessor :timeout
14
- attr_accessor :ensure_https
15
-
16
- ##
17
- #
18
- # * *Optional arguments (given as hash optional)*
19
- # - +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.
20
- # - +count+ -> The number of items to be listed.
21
- # - +offset+ -> Specifies the number of items to skip (ordered by `itemId`).
22
- # - +returnProperties+ -> With `returnProperties=true`, property values of the listed items are returned along with their IDs in a JSON dictionary.
23
- #
24
- #Example response:
25
- #```json
26
- # [
27
- # {
28
- # "itemId": "tv-178",
29
- # "description": "4K TV with 3D feature",
30
- # "categories": ["Electronics", "Televisions"],
31
- # "price": 342,
32
- # "url": "myshop.com/tv-178"
33
- # },
34
- # {
35
- # "itemId": "mixer-42",
36
- # "description": "Stainless Steel Mixer",
37
- # "categories": ["Home & Kitchen"],
38
- # "price": 39,
39
- # "url": "myshop.com/mixer-42"
40
- # }
41
- # ]
42
- #```
43
- #
44
- # - +includedProperties+ -> Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
45
- #
46
- #Example response for `includedProperties=description,price`:
47
- #```json
48
- # [
49
- # {
50
- # "itemId": "tv-178",
51
- # "description": "4K TV with 3D feature",
52
- # "price": 342
53
- # },
54
- # {
55
- # "itemId": "mixer-42",
56
- # "description": "Stainless Steel Mixer",
57
- # "price": 39
58
- # }
59
- # ]
60
- #```
61
- #
62
- #
13
+ attr_accessor :timeout, :ensure_https
14
+
15
+ ##
16
+ #
17
+ # * *Optional arguments (given as hash optional)*
18
+ # - +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.
19
+ # - +count+ -> The number of items to be listed.
20
+ # - +offset+ -> Specifies the number of items to skip (ordered by `itemId`).
21
+ # - +returnProperties+ -> With `returnProperties=true`, property values of the listed items are returned along with their IDs in a JSON dictionary.
22
+ #
23
+ # Example response:
24
+ # ```json
25
+ # [
26
+ # {
27
+ # "itemId": "tv-178",
28
+ # "description": "4K TV with 3D feature",
29
+ # "categories": ["Electronics", "Televisions"],
30
+ # "price": 342,
31
+ # "url": "myshop.com/tv-178"
32
+ # },
33
+ # {
34
+ # "itemId": "mixer-42",
35
+ # "description": "Stainless Steel Mixer",
36
+ # "categories": ["Home & Kitchen"],
37
+ # "price": 39,
38
+ # "url": "myshop.com/mixer-42"
39
+ # }
40
+ # ]
41
+ # ```
42
+ #
43
+ # - +includedProperties+ -> Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
44
+ #
45
+ # Example response for `includedProperties=description,price`:
46
+ # ```json
47
+ # [
48
+ # {
49
+ # "itemId": "tv-178",
50
+ # "description": "4K TV with 3D feature",
51
+ # "price": 342
52
+ # },
53
+ # {
54
+ # "itemId": "mixer-42",
55
+ # "description": "Stainless Steel Mixer",
56
+ # "price": 39
57
+ # }
58
+ # ]
59
+ # ```
60
+ #
61
+ #
63
62
  def initialize(optional = {})
64
- optional = normalize_optional(optional)
63
+ optional = normalize_hash_to_camel_case(optional)
65
64
  @filter = optional['filter']
66
65
  @count = optional['count']
67
66
  @offset = optional['offset']
68
67
  @return_properties = optional['returnProperties']
69
68
  @included_properties = optional['includedProperties']
70
69
  @optional = optional
71
- @timeout = 100000
70
+ @timeout = 100_000
72
71
  @ensure_https = false
73
72
  @optional.each do |par, _|
74
- fail UnknownOptionalParameter.new(par) unless ["filter","count","offset","returnProperties","includedProperties"].include? par
73
+ raise UnknownOptionalParameter.new(par) unless %w[filter count offset returnProperties
74
+ includedProperties].include? par
75
75
  end
76
76
  end
77
-
77
+
78
78
  # HTTP method
79
79
  def method
80
80
  :get
81
81
  end
82
-
82
+
83
83
  # Values of body parameters as a Hash
84
84
  def body_parameters
85
- p = Hash.new
86
- p
85
+ {}
87
86
  end
88
-
87
+
89
88
  # Values of query parameters as a Hash.
90
89
  # name of parameter => value of the parameter
91
90
  def query_parameters
@@ -95,12 +94,13 @@ module RecombeeApiClient
95
94
  params['offset'] = @optional['offset'] if @optional['offset']
96
95
  params['returnProperties'] = @optional['returnProperties'] if @optional['returnProperties']
97
96
  params['includedProperties'] = @optional['includedProperties'] if @optional['includedProperties']
97
+
98
98
  params
99
99
  end
100
-
100
+
101
101
  # Relative path to the endpoint
102
102
  def path
103
- "/{databaseId}/items/list/"
103
+ '/{databaseId}/items/list/'
104
104
  end
105
105
  end
106
106
  end
@@ -5,43 +5,39 @@
5
5
  module RecombeeApiClient
6
6
  require_relative 'request'
7
7
  require_relative '../errors'
8
-
8
+
9
9
  ##
10
- #Get all [Scenarios](https://docs.recombee.com/scenarios) of the given database.
10
+ # Get all [Scenarios](https://docs.recombee.com/scenarios) of the given database.
11
11
  #
12
12
  class ListScenarios < ApiRequest
13
-
14
- attr_accessor :timeout
15
- attr_accessor :ensure_https
16
-
17
- ##
18
- #
19
- def initialize()
20
- @timeout = 10000
13
+ attr_accessor :timeout, :ensure_https
14
+
15
+ ##
16
+ #
17
+ def initialize
18
+ @timeout = 10_000
21
19
  @ensure_https = false
22
20
  end
23
-
21
+
24
22
  # HTTP method
25
23
  def method
26
24
  :get
27
25
  end
28
-
26
+
29
27
  # Values of body parameters as a Hash
30
28
  def body_parameters
31
- p = Hash.new
32
- p
29
+ {}
33
30
  end
34
-
31
+
35
32
  # Values of query parameters as a Hash.
36
33
  # name of parameter => value of the parameter
37
34
  def query_parameters
38
- params = {}
39
- params
35
+ {}
40
36
  end
41
-
37
+
42
38
  # Relative path to the endpoint
43
39
  def path
44
- "/{databaseId}/scenarios/"
40
+ '/{databaseId}/scenarios/'
45
41
  end
46
42
  end
47
43
  end