algolia 3.5.1 → 3.5.2

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 (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/Gemfile.lock +1 -1
  4. data/lib/algolia/api/abtesting_client.rb +17 -9
  5. data/lib/algolia/api/analytics_client.rb +173 -165
  6. data/lib/algolia/api/ingestion_client.rb +38 -30
  7. data/lib/algolia/api/insights_client.rb +18 -10
  8. data/lib/algolia/api/monitoring_client.rb +22 -14
  9. data/lib/algolia/api/personalization_client.rb +16 -8
  10. data/lib/algolia/api/query_suggestions_client.rb +17 -9
  11. data/lib/algolia/api/recommend_client.rb +17 -9
  12. data/lib/algolia/api/search_client.rb +60 -52
  13. data/lib/algolia/configuration.rb +16 -1
  14. data/lib/algolia/models/abtesting/ab_test_configuration.rb +0 -2
  15. data/lib/algolia/models/abtesting/variant.rb +0 -2
  16. data/lib/algolia/models/ingestion/event.rb +1 -11
  17. data/lib/algolia/models/recommend/fallback_params.rb +3 -3
  18. data/lib/algolia/models/recommend/recommend_hit.rb +0 -2
  19. data/lib/algolia/models/recommend/recommend_search_params.rb +3 -3
  20. data/lib/algolia/models/recommend/recommendations_results.rb +13 -0
  21. data/lib/algolia/models/recommend/search_recommend_rules_params.rb +2 -2
  22. data/lib/algolia/models/recommend/trending_facet_hit.rb +0 -2
  23. data/lib/algolia/models/search/browse_params_object.rb +1 -1
  24. data/lib/algolia/models/search/browse_response.rb +13 -0
  25. data/lib/algolia/models/search/consequence_params.rb +1 -1
  26. data/lib/algolia/models/search/get_api_key_response.rb +2 -0
  27. data/lib/algolia/models/search/get_objects_response.rb +0 -2
  28. data/lib/algolia/models/search/index_settings.rb +3 -3
  29. data/lib/algolia/models/search/search_dictionary_entries_response.rb +1 -1
  30. data/lib/algolia/models/search/search_for_facets.rb +1 -1
  31. data/lib/algolia/models/search/search_for_hits.rb +1 -1
  32. data/lib/algolia/models/search/search_params_object.rb +1 -1
  33. data/lib/algolia/models/search/search_response.rb +13 -0
  34. data/lib/algolia/models/search/search_rules_params.rb +2 -2
  35. data/lib/algolia/models/search/search_user_ids_response.rb +1 -1
  36. data/lib/algolia/models/search/settings_response.rb +3 -3
  37. data/lib/algolia/user_agent.rb +8 -2
  38. data/lib/algolia/version.rb +1 -1
  39. metadata +2 -2
@@ -45,6 +45,14 @@ module Algolia
45
45
  # @return [void]
46
46
  def set_client_api_key(api_key)
47
47
  @api_client.set_client_api_key(api_key)
48
+
49
+ self
50
+ end
51
+
52
+ def add_user_agent_segment(segment, version = nil)
53
+ @api_client.config.add_user_agent_segment(segment, version)
54
+
55
+ self
48
56
  end
49
57
 
50
58
  # Creates a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.
@@ -93,7 +101,7 @@ module Algolia
93
101
 
94
102
  # This method allow you to send requests to the Algolia REST API.
95
103
 
96
- # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
104
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
97
105
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
98
106
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
99
107
  # @return [Http::Response] the response
@@ -125,7 +133,7 @@ module Algolia
125
133
 
126
134
  # This method allow you to send requests to the Algolia REST API.
127
135
 
128
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
136
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
129
137
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
130
138
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
131
139
  # @return [Object]
@@ -136,7 +144,7 @@ module Algolia
136
144
 
137
145
  # This method allow you to send requests to the Algolia REST API.
138
146
 
139
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
147
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
140
148
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
141
149
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
142
150
  # @return [Http::Response] the response
@@ -168,7 +176,7 @@ module Algolia
168
176
 
169
177
  # This method allow you to send requests to the Algolia REST API.
170
178
 
171
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
179
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
172
180
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
173
181
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
174
182
  # @return [Object]
@@ -179,7 +187,7 @@ module Algolia
179
187
 
180
188
  # This method allow you to send requests to the Algolia REST API.
181
189
 
182
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
190
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
183
191
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
184
192
  # @param body [Object] Parameters to send with the custom request.
185
193
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
@@ -212,7 +220,7 @@ module Algolia
212
220
 
213
221
  # This method allow you to send requests to the Algolia REST API.
214
222
 
215
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
223
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
216
224
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
217
225
  # @param body [Object] Parameters to send with the custom request.
218
226
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
@@ -224,7 +232,7 @@ module Algolia
224
232
 
225
233
  # This method allow you to send requests to the Algolia REST API.
226
234
 
227
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
235
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
228
236
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
229
237
  # @param body [Object] Parameters to send with the custom request.
230
238
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
@@ -257,7 +265,7 @@ module Algolia
257
265
 
258
266
  # This method allow you to send requests to the Algolia REST API.
259
267
 
260
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
268
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
261
269
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
262
270
  # @param body [Object] Parameters to send with the custom request.
263
271
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
@@ -267,7 +275,7 @@ module Algolia
267
275
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Object")
268
276
  end
269
277
 
270
- # Deletes a Query Suggestions configuration. Deleting only removes the configuration and stops updates to the Query Suggestions index. To delete the Query Suggestions index itself, use the Search API and the &#x60;Delete an index&#x60; operation.
278
+ # Deletes a Query Suggestions configuration. Deleting only removes the configuration and stops updates to the Query Suggestions index. To delete the Query Suggestions index itself, use the Search API and the `Delete an index` operation.
271
279
  #
272
280
  # Required API Key ACLs:
273
281
  # - editSettings
@@ -38,9 +38,17 @@ module Algolia
38
38
  # @return [void]
39
39
  def set_client_api_key(api_key)
40
40
  @api_client.set_client_api_key(api_key)
41
+
42
+ self
41
43
  end
42
44
 
43
- # Create or update a batch of Recommend Rules Each Recommend Rule is created or updated, depending on whether a Recommend Rule with the same &#x60;objectID&#x60; already exists. You may also specify &#x60;true&#x60; for &#x60;clearExistingRules&#x60;, in which case the batch will atomically replace all the existing Recommend Rules. Recommend Rules are similar to Search Rules, except that the conditions and consequences apply to a [source item](/doc/guides/algolia-recommend/overview/#recommend-models) instead of a query. The main differences are the following: - Conditions &#x60;pattern&#x60; and &#x60;anchoring&#x60; are unavailable. - Condition &#x60;filters&#x60; triggers if the source item matches the specified filters. - Condition &#x60;filters&#x60; accepts numeric filters. - Consequence &#x60;params&#x60; only covers filtering parameters. - Consequence &#x60;automaticFacetFilters&#x60; doesn&#39;t require a facet value placeholder (it tries to match the data source item&#39;s attributes instead).
45
+ def add_user_agent_segment(segment, version = nil)
46
+ @api_client.config.add_user_agent_segment(segment, version)
47
+
48
+ self
49
+ end
50
+
51
+ # Create or update a batch of Recommend Rules Each Recommend Rule is created or updated, depending on whether a Recommend Rule with the same `objectID` already exists. You may also specify `true` for `clearExistingRules`, in which case the batch will atomically replace all the existing Recommend Rules. Recommend Rules are similar to Search Rules, except that the conditions and consequences apply to a [source item](/doc/guides/algolia-recommend/overview/#recommend-models) instead of a query. The main differences are the following: - Conditions `pattern` and `anchoring` are unavailable. - Condition `filters` triggers if the source item matches the specified filters. - Condition `filters` accepts numeric filters. - Consequence `params` only covers filtering parameters. - Consequence `automaticFacetFilters` doesn't require a facet value placeholder (it tries to match the data source item's attributes instead).
44
52
  #
45
53
  # Required API Key ACLs:
46
54
  # - editSettings
@@ -99,7 +107,7 @@ module Algolia
99
107
 
100
108
  # This method allow you to send requests to the Algolia REST API.
101
109
 
102
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
110
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
103
111
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
104
112
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
105
113
  # @return [Http::Response] the response
@@ -131,7 +139,7 @@ module Algolia
131
139
 
132
140
  # This method allow you to send requests to the Algolia REST API.
133
141
 
134
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
142
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
135
143
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
136
144
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
137
145
  # @return [Object]
@@ -142,7 +150,7 @@ module Algolia
142
150
 
143
151
  # This method allow you to send requests to the Algolia REST API.
144
152
 
145
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
153
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
146
154
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
147
155
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
148
156
  # @return [Http::Response] the response
@@ -174,7 +182,7 @@ module Algolia
174
182
 
175
183
  # This method allow you to send requests to the Algolia REST API.
176
184
 
177
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
185
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
178
186
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
179
187
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
180
188
  # @return [Object]
@@ -185,7 +193,7 @@ module Algolia
185
193
 
186
194
  # This method allow you to send requests to the Algolia REST API.
187
195
 
188
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
196
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
189
197
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
190
198
  # @param body [Object] Parameters to send with the custom request.
191
199
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
@@ -218,7 +226,7 @@ module Algolia
218
226
 
219
227
  # This method allow you to send requests to the Algolia REST API.
220
228
 
221
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
229
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
222
230
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
223
231
  # @param body [Object] Parameters to send with the custom request.
224
232
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
@@ -230,7 +238,7 @@ module Algolia
230
238
 
231
239
  # This method allow you to send requests to the Algolia REST API.
232
240
 
233
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
241
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
234
242
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
235
243
  # @param body [Object] Parameters to send with the custom request.
236
244
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
@@ -263,7 +271,7 @@ module Algolia
263
271
 
264
272
  # This method allow you to send requests to the Algolia REST API.
265
273
 
266
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
274
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
267
275
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
268
276
  # @param body [Object] Parameters to send with the custom request.
269
277
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)