algolia 3.0.0.alpha.6 → 3.0.0.alpha.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/VERSION +1 -1
  3. data/CHANGELOG.md +4 -0
  4. data/Gemfile.lock +2 -2
  5. data/lib/algolia/api/abtesting_client.rb +41 -21
  6. data/lib/algolia/api/analytics_client.rb +111 -43
  7. data/lib/algolia/api/ingestion_client.rb +334 -94
  8. data/lib/algolia/api/insights_client.rb +13 -13
  9. data/lib/algolia/api/monitoring_client.rb +32 -33
  10. data/lib/algolia/api/personalization_client.rb +34 -18
  11. data/lib/algolia/api/query_suggestions_client.rb +55 -27
  12. data/lib/algolia/api/recommend_client.rb +46 -26
  13. data/lib/algolia/api/search_client.rb +459 -171
  14. data/lib/algolia/api_client.rb +0 -4
  15. data/lib/algolia/models/abtesting/ab_test.rb +7 -1
  16. data/lib/algolia/models/abtesting/list_ab_tests_response.rb +3 -1
  17. data/lib/algolia/models/abtesting/variant.rb +24 -5
  18. data/lib/algolia/models/analytics/click_through_rate_event.rb +3 -1
  19. data/lib/algolia/models/analytics/conversion_rate_event.rb +3 -1
  20. data/lib/algolia/models/analytics/get_click_through_rate_response.rb +3 -1
  21. data/lib/algolia/models/analytics/get_conversation_rate_response.rb +3 -1
  22. data/lib/algolia/models/analytics/top_hit_with_analytics.rb +3 -1
  23. data/lib/algolia/models/analytics/top_search_with_analytics.rb +3 -1
  24. data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_response.rb +1 -11
  25. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +1 -11
  26. data/lib/algolia/models/recommend/highlight_result.rb +1 -0
  27. data/lib/algolia/models/recommend/snippet_result.rb +1 -0
  28. data/lib/algolia/models/search/highlight_result.rb +1 -0
  29. data/lib/algolia/models/search/snippet_result.rb +1 -0
  30. data/lib/algolia/transport/http/http_requester.rb +2 -2
  31. data/lib/algolia/transport/stateful_host.rb +2 -1
  32. data/lib/algolia/transport/transport.rb +7 -4
  33. data/lib/algolia/version.rb +1 -1
  34. metadata +2 -2
@@ -33,8 +33,8 @@ module Algolia
33
33
  new(config)
34
34
  end
35
35
 
36
- # Send requests to the Algolia REST API.
37
36
  # This method allow you to send requests to the Algolia REST API.
37
+
38
38
  # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
39
39
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
40
40
  # @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)
@@ -65,8 +65,8 @@ module Algolia
65
65
  @api_client.call_api(:DELETE, path, new_options)
66
66
  end
67
67
 
68
- # Send requests to the Algolia REST API.
69
68
  # This method allow you to send requests to the Algolia REST API.
69
+
70
70
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
71
71
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
72
72
  # @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)
@@ -76,8 +76,8 @@ module Algolia
76
76
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
77
77
  end
78
78
 
79
- # Send requests to the Algolia REST API.
80
79
  # This method allow you to send requests to the Algolia REST API.
80
+
81
81
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
82
82
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
83
83
  # @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)
@@ -108,8 +108,8 @@ module Algolia
108
108
  @api_client.call_api(:GET, path, new_options)
109
109
  end
110
110
 
111
- # Send requests to the Algolia REST API.
112
111
  # This method allow you to send requests to the Algolia REST API.
112
+
113
113
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
114
114
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
115
115
  # @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)
@@ -119,8 +119,8 @@ module Algolia
119
119
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
120
120
  end
121
121
 
122
- # Send requests to the Algolia REST API.
123
122
  # This method allow you to send requests to the Algolia REST API.
123
+
124
124
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
125
125
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
126
126
  # @param body [Object] Parameters to send with the custom request.
@@ -152,8 +152,8 @@ module Algolia
152
152
  @api_client.call_api(:POST, path, new_options)
153
153
  end
154
154
 
155
- # Send requests to the Algolia REST API.
156
155
  # This method allow you to send requests to the Algolia REST API.
156
+
157
157
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
158
158
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
159
159
  # @param body [Object] Parameters to send with the custom request.
@@ -164,8 +164,8 @@ module Algolia
164
164
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
165
165
  end
166
166
 
167
- # Send requests to the Algolia REST API.
168
167
  # This method allow you to send requests to the Algolia REST API.
168
+
169
169
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
170
170
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
171
171
  # @param body [Object] Parameters to send with the custom request.
@@ -197,8 +197,8 @@ module Algolia
197
197
  @api_client.call_api(:PUT, path, new_options)
198
198
  end
199
199
 
200
- # Send requests to the Algolia REST API.
201
200
  # This method allow you to send requests to the Algolia REST API.
201
+
202
202
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
203
203
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
204
204
  # @param body [Object] Parameters to send with the custom request.
@@ -209,8 +209,8 @@ module Algolia
209
209
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
210
210
  end
211
211
 
212
- # Delete user token.
213
212
  # Delete all events related to a certain user token from events metrics and analytics. To delete a personalization user profile, see [Delete a user profile](https://www.algolia.com/doc/rest-api/personalization/#delete-a-user-profile).
213
+
214
214
  # @param user_token [String] The user token for which to delete all associated events. (required)
215
215
  # @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)
216
216
  # @return [Http::Response] the response
@@ -232,7 +232,7 @@ module Algolia
232
232
  raise ArgumentError, "invalid value for 'user_token' when calling InsightsClient.delete_user_token, must conform to the pattern #{pattern}."
233
233
  end
234
234
 
235
- path = '/1/usertokens/{userToken}'.sub('{' + 'userToken' + '}', @api_client.encode_uri(user_token.to_s))
235
+ path = '/1/usertokens/{userToken}'.sub('{' + 'userToken' + '}', Transport.encode_uri(user_token.to_s))
236
236
  query_params = {}
237
237
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
238
238
  header_params = {}
@@ -251,8 +251,8 @@ module Algolia
251
251
  @api_client.call_api(:DELETE, path, new_options)
252
252
  end
253
253
 
254
- # Delete user token.
255
254
  # Delete all events related to a certain user token from events metrics and analytics. To delete a personalization user profile, see [Delete a user profile](https://www.algolia.com/doc/rest-api/personalization/#delete-a-user-profile).
255
+
256
256
  # @param user_token [String] The user token for which to delete all associated events. (required)
257
257
  # @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)
258
258
  # @return [nil]
@@ -261,8 +261,8 @@ module Algolia
261
261
  nil
262
262
  end
263
263
 
264
- # Send events.
265
264
  # Send a list of events to the Insights API. You can include up to 1,000 events in a single request, but the request body must be smaller than 2&amp;nbsp;MB.
265
+
266
266
  # @param insights_events [InsightsEvents] (required)
267
267
  # @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)
268
268
  # @return [Http::Response] the response
@@ -291,8 +291,8 @@ module Algolia
291
291
  @api_client.call_api(:POST, path, new_options)
292
292
  end
293
293
 
294
- # Send events.
295
294
  # Send a list of events to the Insights API. You can include up to 1,000 events in a single request, but the request body must be smaller than 2&nbsp;MB.
295
+
296
296
  # @param insights_events [InsightsEvents] (required)
297
297
  # @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)
298
298
  # @return [EventsResponse]
@@ -24,8 +24,8 @@ module Algolia
24
24
  new(config)
25
25
  end
26
26
 
27
- # Send requests to the Algolia REST API.
28
27
  # This method allow you to send requests to the Algolia REST API.
28
+
29
29
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
30
30
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
31
31
  # @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)
@@ -56,8 +56,8 @@ module Algolia
56
56
  @api_client.call_api(:DELETE, path, new_options)
57
57
  end
58
58
 
59
- # Send requests to the Algolia REST API.
60
59
  # This method allow you to send requests to the Algolia REST API.
60
+
61
61
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
62
62
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
63
63
  # @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)
@@ -67,8 +67,8 @@ module Algolia
67
67
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
68
68
  end
69
69
 
70
- # Send requests to the Algolia REST API.
71
70
  # This method allow you to send requests to the Algolia REST API.
71
+
72
72
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
73
73
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
74
74
  # @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,8 +99,8 @@ module Algolia
99
99
  @api_client.call_api(:GET, path, new_options)
100
100
  end
101
101
 
102
- # Send requests to the Algolia REST API.
103
102
  # This method allow you to send requests to the Algolia REST API.
103
+
104
104
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
105
105
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
106
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)
@@ -110,8 +110,8 @@ module Algolia
110
110
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
111
111
  end
112
112
 
113
- # Send requests to the Algolia REST API.
114
113
  # This method allow you to send requests to the Algolia REST API.
114
+
115
115
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
116
116
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
117
117
  # @param body [Object] Parameters to send with the custom request.
@@ -143,8 +143,8 @@ module Algolia
143
143
  @api_client.call_api(:POST, path, new_options)
144
144
  end
145
145
 
146
- # Send requests to the Algolia REST API.
147
146
  # This method allow you to send requests to the Algolia REST API.
147
+
148
148
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
149
149
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
150
150
  # @param body [Object] Parameters to send with the custom request.
@@ -155,8 +155,8 @@ module Algolia
155
155
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
156
156
  end
157
157
 
158
- # Send requests to the Algolia REST API.
159
158
  # This method allow you to send requests to the Algolia REST API.
159
+
160
160
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
161
161
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
162
162
  # @param body [Object] Parameters to send with the custom request.
@@ -188,8 +188,8 @@ module Algolia
188
188
  @api_client.call_api(:PUT, path, new_options)
189
189
  end
190
190
 
191
- # Send requests to the Algolia REST API.
192
191
  # This method allow you to send requests to the Algolia REST API.
192
+
193
193
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
194
194
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
195
195
  # @param body [Object] Parameters to send with the custom request.
@@ -200,8 +200,8 @@ module Algolia
200
200
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
201
201
  end
202
202
 
203
- # List incidents for selected clusters.
204
203
  # List known incidents for selected clusters.
204
+
205
205
  # @param clusters [String] Subset of clusters, separated by comma. (required)
206
206
  # @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)
207
207
  # @return [Http::Response] the response
@@ -211,7 +211,7 @@ module Algolia
211
211
  raise ArgumentError, "Parameter `clusters` is required when calling `get_cluster_incidents`."
212
212
  end
213
213
 
214
- path = '/1/incidents/{clusters}'.sub('{' + 'clusters' + '}', @api_client.encode_uri(clusters.to_s))
214
+ path = '/1/incidents/{clusters}'.sub('{' + 'clusters' + '}', Transport.encode_uri(clusters.to_s))
215
215
  query_params = {}
216
216
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
217
217
  header_params = {}
@@ -230,8 +230,8 @@ module Algolia
230
230
  @api_client.call_api(:GET, path, new_options)
231
231
  end
232
232
 
233
- # List incidents for selected clusters.
234
233
  # List known incidents for selected clusters.
234
+
235
235
  # @param clusters [String] Subset of clusters, separated by comma. (required)
236
236
  # @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)
237
237
  # @return [IncidentsResponse]
@@ -240,8 +240,8 @@ module Algolia
240
240
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Monitoring::IncidentsResponse')
241
241
  end
242
242
 
243
- # List statuses of selected clusters.
244
243
  # Report whether a cluster is operational.
244
+
245
245
  # @param clusters [String] Subset of clusters, separated by comma. (required)
246
246
  # @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)
247
247
  # @return [Http::Response] the response
@@ -251,7 +251,7 @@ module Algolia
251
251
  raise ArgumentError, "Parameter `clusters` is required when calling `get_cluster_status`."
252
252
  end
253
253
 
254
- path = '/1/status/{clusters}'.sub('{' + 'clusters' + '}', @api_client.encode_uri(clusters.to_s))
254
+ path = '/1/status/{clusters}'.sub('{' + 'clusters' + '}', Transport.encode_uri(clusters.to_s))
255
255
  query_params = {}
256
256
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
257
257
  header_params = {}
@@ -270,8 +270,8 @@ module Algolia
270
270
  @api_client.call_api(:GET, path, new_options)
271
271
  end
272
272
 
273
- # List statuses of selected clusters.
274
273
  # Report whether a cluster is operational.
274
+
275
275
  # @param clusters [String] Subset of clusters, separated by comma. (required)
276
276
  # @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)
277
277
  # @return [StatusResponse]
@@ -280,8 +280,8 @@ module Algolia
280
280
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Monitoring::StatusResponse')
281
281
  end
282
282
 
283
- # List incidents.
284
283
  # List known incidents for all clusters.
284
+
285
285
  # @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)
286
286
  # @return [Http::Response] the response
287
287
  def get_incidents_with_http_info(request_options = {})
@@ -304,8 +304,8 @@ module Algolia
304
304
  @api_client.call_api(:GET, path, new_options)
305
305
  end
306
306
 
307
- # List incidents.
308
307
  # List known incidents for all clusters.
308
+
309
309
  # @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)
310
310
  # @return [IncidentsResponse]
311
311
  def get_incidents(request_options = {})
@@ -313,8 +313,8 @@ module Algolia
313
313
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Monitoring::IncidentsResponse')
314
314
  end
315
315
 
316
- # Get indexing times.
317
316
  # List the average times for indexing operations for selected clusters.
317
+
318
318
  # @param clusters [String] Subset of clusters, separated by comma. (required)
319
319
  # @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)
320
320
  # @return [Http::Response] the response
@@ -324,7 +324,7 @@ module Algolia
324
324
  raise ArgumentError, "Parameter `clusters` is required when calling `get_indexing_time`."
325
325
  end
326
326
 
327
- path = '/1/indexing/{clusters}'.sub('{' + 'clusters' + '}', @api_client.encode_uri(clusters.to_s))
327
+ path = '/1/indexing/{clusters}'.sub('{' + 'clusters' + '}', Transport.encode_uri(clusters.to_s))
328
328
  query_params = {}
329
329
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
330
330
  header_params = {}
@@ -343,8 +343,8 @@ module Algolia
343
343
  @api_client.call_api(:GET, path, new_options)
344
344
  end
345
345
 
346
- # Get indexing times.
347
346
  # List the average times for indexing operations for selected clusters.
347
+
348
348
  # @param clusters [String] Subset of clusters, separated by comma. (required)
349
349
  # @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)
350
350
  # @return [IndexingTimeResponse]
@@ -353,8 +353,8 @@ module Algolia
353
353
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Monitoring::IndexingTimeResponse')
354
354
  end
355
355
 
356
- # List servers.
357
356
  # List the servers belonging to clusters. The response depends on whether you authenticate your API request: - With authentication, the response lists the servers assigned to your Algolia application&#39;s cluster. - Without authentication, the response lists the servers for all Algolia clusters.
357
+
358
358
  # @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)
359
359
  # @return [Http::Response] the response
360
360
  def get_inventory_with_http_info(request_options = {})
@@ -377,8 +377,8 @@ module Algolia
377
377
  @api_client.call_api(:GET, path, new_options)
378
378
  end
379
379
 
380
- # List servers.
381
380
  # List the servers belonging to clusters. The response depends on whether you authenticate your API request: - With authentication, the response lists the servers assigned to your Algolia application's cluster. - Without authentication, the response lists the servers for all Algolia clusters.
381
+
382
382
  # @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)
383
383
  # @return [InventoryResponse]
384
384
  def get_inventory(request_options = {})
@@ -386,8 +386,8 @@ module Algolia
386
386
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Monitoring::InventoryResponse')
387
387
  end
388
388
 
389
- # Get search latency times.
390
389
  # List the average latency for search requests for selected clusters.
390
+
391
391
  # @param clusters [String] Subset of clusters, separated by comma. (required)
392
392
  # @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)
393
393
  # @return [Http::Response] the response
@@ -397,7 +397,7 @@ module Algolia
397
397
  raise ArgumentError, "Parameter `clusters` is required when calling `get_latency`."
398
398
  end
399
399
 
400
- path = '/1/latency/{clusters}'.sub('{' + 'clusters' + '}', @api_client.encode_uri(clusters.to_s))
400
+ path = '/1/latency/{clusters}'.sub('{' + 'clusters' + '}', Transport.encode_uri(clusters.to_s))
401
401
  query_params = {}
402
402
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
403
403
  header_params = {}
@@ -416,8 +416,8 @@ module Algolia
416
416
  @api_client.call_api(:GET, path, new_options)
417
417
  end
418
418
 
419
- # Get search latency times.
420
419
  # List the average latency for search requests for selected clusters.
420
+
421
421
  # @param clusters [String] Subset of clusters, separated by comma. (required)
422
422
  # @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)
423
423
  # @return [LatencyResponse]
@@ -426,8 +426,8 @@ module Algolia
426
426
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Monitoring::LatencyResponse')
427
427
  end
428
428
 
429
- # Get metrics for a given period.
430
429
  # Report the aggregate value of a metric for a selected period of time.
430
+
431
431
  # @param metric [Metric] Metric to report. For more information about the individual metrics, see the response. To include all metrics, use &#x60;*&#x60; as the parameter. (required)
432
432
  # @param period [Period] Period over which to aggregate the metrics: - &#x60;minute&#x60;. Aggregate the last minute. 1 data point per 10 seconds. - &#x60;hour&#x60;. Aggregate the last hour. 1 data point per minute. - &#x60;day&#x60;. Aggregate the last day. 1 data point per 10 minutes. - &#x60;week&#x60;. Aggregate the last week. 1 data point per hour. - &#x60;month&#x60;. Aggregate the last month. 1 data point per day. (required)
433
433
  # @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)
@@ -442,8 +442,7 @@ module Algolia
442
442
  raise ArgumentError, "Parameter `period` is required when calling `get_metrics`."
443
443
  end
444
444
 
445
- path = '/1/infrastructure/{metric}/period/{period}'.sub('{' + 'metric' + '}', @api_client.encode_uri(metric.to_s)).sub('{' + 'period' + '}',
446
- @api_client.encode_uri(period.to_s))
445
+ path = '/1/infrastructure/{metric}/period/{period}'.sub('{' + 'metric' + '}', Transport.encode_uri(metric.to_s)).sub('{' + 'period' + '}', Transport.encode_uri(period.to_s))
447
446
  query_params = {}
448
447
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
449
448
  header_params = {}
@@ -462,8 +461,8 @@ module Algolia
462
461
  @api_client.call_api(:GET, path, new_options)
463
462
  end
464
463
 
465
- # Get metrics for a given period.
466
464
  # Report the aggregate value of a metric for a selected period of time.
465
+
467
466
  # @param metric [Metric] Metric to report. For more information about the individual metrics, see the response. To include all metrics, use &#x60;*&#x60; as the parameter. (required)
468
467
  # @param period [Period] Period over which to aggregate the metrics: - &#x60;minute&#x60;. Aggregate the last minute. 1 data point per 10 seconds. - &#x60;hour&#x60;. Aggregate the last hour. 1 data point per minute. - &#x60;day&#x60;. Aggregate the last day. 1 data point per 10 minutes. - &#x60;week&#x60;. Aggregate the last week. 1 data point per hour. - &#x60;month&#x60;. Aggregate the last month. 1 data point per day. (required)
469
468
  # @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)
@@ -473,8 +472,8 @@ module Algolia
473
472
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Monitoring::InfrastructureResponse')
474
473
  end
475
474
 
476
- # Test the reachability of clusters.
477
475
  # Test whether clusters are reachable or not.
476
+
478
477
  # @param clusters [String] Subset of clusters, separated by comma. (required)
479
478
  # @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)
480
479
  # @return [Http::Response] the response
@@ -484,7 +483,7 @@ module Algolia
484
483
  raise ArgumentError, "Parameter `clusters` is required when calling `get_reachability`."
485
484
  end
486
485
 
487
- path = '/1/reachability/{clusters}/probes'.sub('{' + 'clusters' + '}', @api_client.encode_uri(clusters.to_s))
486
+ path = '/1/reachability/{clusters}/probes'.sub('{' + 'clusters' + '}', Transport.encode_uri(clusters.to_s))
488
487
  query_params = {}
489
488
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
490
489
  header_params = {}
@@ -503,8 +502,8 @@ module Algolia
503
502
  @api_client.call_api(:GET, path, new_options)
504
503
  end
505
504
 
506
- # Test the reachability of clusters.
507
505
  # Test whether clusters are reachable or not.
506
+
508
507
  # @param clusters [String] Subset of clusters, separated by comma. (required)
509
508
  # @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)
510
509
  # @return [Hash<String, Hash>]
@@ -513,8 +512,8 @@ module Algolia
513
512
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Monitoring::Hash<String, Hash>')
514
513
  end
515
514
 
516
- # List cluster statuses.
517
515
  # Report whether clusters are operational. The response depends on whether you authenticate your API request. - With authentication, the response includes the status of the cluster assigned to your Algolia application. - Without authentication, the response lists the statuses of all public Algolia clusters.
516
+
518
517
  # @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)
519
518
  # @return [Http::Response] the response
520
519
  def get_status_with_http_info(request_options = {})
@@ -537,8 +536,8 @@ module Algolia
537
536
  @api_client.call_api(:GET, path, new_options)
538
537
  end
539
538
 
540
- # List cluster statuses.
541
539
  # Report whether clusters are operational. The response depends on whether you authenticate your API request. - With authentication, the response includes the status of the cluster assigned to your Algolia application. - Without authentication, the response lists the statuses of all public Algolia clusters.
540
+
542
541
  # @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)
543
542
  # @return [StatusResponse]
544
543
  def get_status(request_options = {})
@@ -33,8 +33,8 @@ module Algolia
33
33
  new(config)
34
34
  end
35
35
 
36
- # Send requests to the Algolia REST API.
37
36
  # This method allow you to send requests to the Algolia REST API.
37
+
38
38
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
39
39
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
40
40
  # @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)
@@ -65,8 +65,8 @@ module Algolia
65
65
  @api_client.call_api(:DELETE, path, new_options)
66
66
  end
67
67
 
68
- # Send requests to the Algolia REST API.
69
68
  # This method allow you to send requests to the Algolia REST API.
69
+
70
70
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
71
71
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
72
72
  # @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)
@@ -76,8 +76,8 @@ module Algolia
76
76
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
77
77
  end
78
78
 
79
- # Send requests to the Algolia REST API.
80
79
  # This method allow you to send requests to the Algolia REST API.
80
+
81
81
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
82
82
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
83
83
  # @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)
@@ -108,8 +108,8 @@ module Algolia
108
108
  @api_client.call_api(:GET, path, new_options)
109
109
  end
110
110
 
111
- # Send requests to the Algolia REST API.
112
111
  # This method allow you to send requests to the Algolia REST API.
112
+
113
113
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
114
114
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
115
115
  # @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)
@@ -119,8 +119,8 @@ module Algolia
119
119
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
120
120
  end
121
121
 
122
- # Send requests to the Algolia REST API.
123
122
  # This method allow you to send requests to the Algolia REST API.
123
+
124
124
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
125
125
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
126
126
  # @param body [Object] Parameters to send with the custom request.
@@ -152,8 +152,8 @@ module Algolia
152
152
  @api_client.call_api(:POST, path, new_options)
153
153
  end
154
154
 
155
- # Send requests to the Algolia REST API.
156
155
  # This method allow you to send requests to the Algolia REST API.
156
+
157
157
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
158
158
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
159
159
  # @param body [Object] Parameters to send with the custom request.
@@ -164,8 +164,8 @@ module Algolia
164
164
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
165
165
  end
166
166
 
167
- # Send requests to the Algolia REST API.
168
167
  # This method allow you to send requests to the Algolia REST API.
168
+
169
169
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
170
170
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
171
171
  # @param body [Object] Parameters to send with the custom request.
@@ -197,8 +197,8 @@ module Algolia
197
197
  @api_client.call_api(:PUT, path, new_options)
198
198
  end
199
199
 
200
- # Send requests to the Algolia REST API.
201
200
  # This method allow you to send requests to the Algolia REST API.
201
+
202
202
  # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
203
203
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
204
204
  # @param body [Object] Parameters to send with the custom request.
@@ -209,8 +209,10 @@ module Algolia
209
209
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
210
210
  end
211
211
 
212
- # Delete a user profile.
213
212
  # Delete the user profile and all its associated data. Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours for the deletion request to be fully processed.
213
+ #
214
+ # Required API Key ACLs:
215
+ # - recommendation
214
216
  # @param user_token [String] userToken representing the user for which to fetch the Personalization profile. (required)
215
217
  # @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)
216
218
  # @return [Http::Response] the response
@@ -220,7 +222,7 @@ module Algolia
220
222
  raise ArgumentError, "Parameter `user_token` is required when calling `delete_user_profile`."
221
223
  end
222
224
 
223
- path = '/1/profiles/{userToken}'.sub('{' + 'userToken' + '}', @api_client.encode_uri(user_token.to_s))
225
+ path = '/1/profiles/{userToken}'.sub('{' + 'userToken' + '}', Transport.encode_uri(user_token.to_s))
224
226
  query_params = {}
225
227
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
226
228
  header_params = {}
@@ -239,8 +241,10 @@ module Algolia
239
241
  @api_client.call_api(:DELETE, path, new_options)
240
242
  end
241
243
 
242
- # Delete a user profile.
243
244
  # Delete the user profile and all its associated data. Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours for the deletion request to be fully processed.
245
+ #
246
+ # Required API Key ACLs:
247
+ # - recommendation
244
248
  # @param user_token [String] userToken representing the user for which to fetch the Personalization profile. (required)
245
249
  # @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)
246
250
  # @return [DeleteUserProfileResponse]
@@ -249,8 +253,10 @@ module Algolia
249
253
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Personalization::DeleteUserProfileResponse')
250
254
  end
251
255
 
252
- # Get the current strategy.
253
256
  # The strategy contains information on the events and facets that impact user profiles and personalized search results.
257
+ #
258
+ # Required API Key ACLs:
259
+ # - recommendation
254
260
  # @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)
255
261
  # @return [Http::Response] the response
256
262
  def get_personalization_strategy_with_http_info(request_options = {})
@@ -273,8 +279,10 @@ module Algolia
273
279
  @api_client.call_api(:GET, path, new_options)
274
280
  end
275
281
 
276
- # Get the current strategy.
277
282
  # The strategy contains information on the events and facets that impact user profiles and personalized search results.
283
+ #
284
+ # Required API Key ACLs:
285
+ # - recommendation
278
286
  # @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)
279
287
  # @return [PersonalizationStrategyParams]
280
288
  def get_personalization_strategy(request_options = {})
@@ -282,8 +290,10 @@ module Algolia
282
290
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Personalization::PersonalizationStrategyParams')
283
291
  end
284
292
 
285
- # Get a user profile.
286
293
  # Get the user profile built from Personalization strategy. The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes.
294
+ #
295
+ # Required API Key ACLs:
296
+ # - recommendation
287
297
  # @param user_token [String] userToken representing the user for which to fetch the Personalization profile. (required)
288
298
  # @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)
289
299
  # @return [Http::Response] the response
@@ -293,7 +303,7 @@ module Algolia
293
303
  raise ArgumentError, "Parameter `user_token` is required when calling `get_user_token_profile`."
294
304
  end
295
305
 
296
- path = '/1/profiles/personalization/{userToken}'.sub('{' + 'userToken' + '}', @api_client.encode_uri(user_token.to_s))
306
+ path = '/1/profiles/personalization/{userToken}'.sub('{' + 'userToken' + '}', Transport.encode_uri(user_token.to_s))
297
307
  query_params = {}
298
308
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
299
309
  header_params = {}
@@ -312,8 +322,10 @@ module Algolia
312
322
  @api_client.call_api(:GET, path, new_options)
313
323
  end
314
324
 
315
- # Get a user profile.
316
325
  # Get the user profile built from Personalization strategy. The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes.
326
+ #
327
+ # Required API Key ACLs:
328
+ # - recommendation
317
329
  # @param user_token [String] userToken representing the user for which to fetch the Personalization profile. (required)
318
330
  # @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)
319
331
  # @return [GetUserTokenResponse]
@@ -322,8 +334,10 @@ module Algolia
322
334
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Personalization::GetUserTokenResponse')
323
335
  end
324
336
 
325
- # Set a new strategy.
326
337
  # A strategy defines the events and facets that impact user profiles and personalized search results.
338
+ #
339
+ # Required API Key ACLs:
340
+ # - recommendation
327
341
  # @param personalization_strategy_params [PersonalizationStrategyParams] (required)
328
342
  # @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)
329
343
  # @return [Http::Response] the response
@@ -352,8 +366,10 @@ module Algolia
352
366
  @api_client.call_api(:POST, path, new_options)
353
367
  end
354
368
 
355
- # Set a new strategy.
356
369
  # A strategy defines the events and facets that impact user profiles and personalized search results.
370
+ #
371
+ # Required API Key ACLs:
372
+ # - recommendation
357
373
  # @param personalization_strategy_params [PersonalizationStrategyParams] (required)
358
374
  # @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)
359
375
  # @return [SetPersonalizationStrategyResponse]