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.
- checksums.yaml +4 -4
- data/.openapi-generator/VERSION +1 -1
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +2 -2
- data/lib/algolia/api/abtesting_client.rb +41 -21
- data/lib/algolia/api/analytics_client.rb +111 -43
- data/lib/algolia/api/ingestion_client.rb +334 -94
- data/lib/algolia/api/insights_client.rb +13 -13
- data/lib/algolia/api/monitoring_client.rb +32 -33
- data/lib/algolia/api/personalization_client.rb +34 -18
- data/lib/algolia/api/query_suggestions_client.rb +55 -27
- data/lib/algolia/api/recommend_client.rb +46 -26
- data/lib/algolia/api/search_client.rb +459 -171
- data/lib/algolia/api_client.rb +0 -4
- data/lib/algolia/models/abtesting/ab_test.rb +7 -1
- data/lib/algolia/models/abtesting/list_ab_tests_response.rb +3 -1
- data/lib/algolia/models/abtesting/variant.rb +24 -5
- data/lib/algolia/models/analytics/click_through_rate_event.rb +3 -1
- data/lib/algolia/models/analytics/conversion_rate_event.rb +3 -1
- data/lib/algolia/models/analytics/get_click_through_rate_response.rb +3 -1
- data/lib/algolia/models/analytics/get_conversation_rate_response.rb +3 -1
- data/lib/algolia/models/analytics/top_hit_with_analytics.rb +3 -1
- data/lib/algolia/models/analytics/top_search_with_analytics.rb +3 -1
- data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_response.rb +1 -11
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +1 -11
- data/lib/algolia/models/recommend/highlight_result.rb +1 -0
- data/lib/algolia/models/recommend/snippet_result.rb +1 -0
- data/lib/algolia/models/search/highlight_result.rb +1 -0
- data/lib/algolia/models/search/snippet_result.rb +1 -0
- data/lib/algolia/transport/http/http_requester.rb +2 -2
- data/lib/algolia/transport/stateful_host.rb +2 -1
- data/lib/algolia/transport/transport.rb +7 -4
- data/lib/algolia/version.rb +1 -1
- metadata +2 -2
@@ -33,8 +33,10 @@ module Algolia
|
|
33
33
|
new(config)
|
34
34
|
end
|
35
35
|
|
36
|
-
# Create a configuration.
|
37
36
|
# Create a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.
|
37
|
+
#
|
38
|
+
# Required API Key ACLs:
|
39
|
+
# - editSettings
|
38
40
|
# @param query_suggestions_configuration_with_index [QuerySuggestionsConfigurationWithIndex] (required)
|
39
41
|
# @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)
|
40
42
|
# @return [Http::Response] the response
|
@@ -63,8 +65,10 @@ module Algolia
|
|
63
65
|
@api_client.call_api(:POST, path, new_options)
|
64
66
|
end
|
65
67
|
|
66
|
-
# Create a configuration.
|
67
68
|
# Create a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.
|
69
|
+
#
|
70
|
+
# Required API Key ACLs:
|
71
|
+
# - editSettings
|
68
72
|
# @param query_suggestions_configuration_with_index [QuerySuggestionsConfigurationWithIndex] (required)
|
69
73
|
# @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)
|
70
74
|
# @return [BaseResponse]
|
@@ -73,8 +77,8 @@ module Algolia
|
|
73
77
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'QuerySuggestions::BaseResponse')
|
74
78
|
end
|
75
79
|
|
76
|
-
# Send requests to the Algolia REST API.
|
77
80
|
# This method allow you to send requests to the Algolia REST API.
|
81
|
+
|
78
82
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
79
83
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
80
84
|
# @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,8 +109,8 @@ module Algolia
|
|
105
109
|
@api_client.call_api(:DELETE, path, new_options)
|
106
110
|
end
|
107
111
|
|
108
|
-
# Send requests to the Algolia REST API.
|
109
112
|
# This method allow you to send requests to the Algolia REST API.
|
113
|
+
|
110
114
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
111
115
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
112
116
|
# @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)
|
@@ -116,8 +120,8 @@ module Algolia
|
|
116
120
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
117
121
|
end
|
118
122
|
|
119
|
-
# Send requests to the Algolia REST API.
|
120
123
|
# This method allow you to send requests to the Algolia REST API.
|
124
|
+
|
121
125
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
122
126
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
123
127
|
# @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,8 +152,8 @@ module Algolia
|
|
148
152
|
@api_client.call_api(:GET, path, new_options)
|
149
153
|
end
|
150
154
|
|
151
|
-
# Send requests to the Algolia REST API.
|
152
155
|
# This method allow you to send requests to the Algolia REST API.
|
156
|
+
|
153
157
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
154
158
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
155
159
|
# @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)
|
@@ -159,8 +163,8 @@ module Algolia
|
|
159
163
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
160
164
|
end
|
161
165
|
|
162
|
-
# Send requests to the Algolia REST API.
|
163
166
|
# This method allow you to send requests to the Algolia REST API.
|
167
|
+
|
164
168
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
165
169
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
166
170
|
# @param body [Object] Parameters to send with the custom request.
|
@@ -192,8 +196,8 @@ module Algolia
|
|
192
196
|
@api_client.call_api(:POST, path, new_options)
|
193
197
|
end
|
194
198
|
|
195
|
-
# Send requests to the Algolia REST API.
|
196
199
|
# This method allow you to send requests to the Algolia REST API.
|
200
|
+
|
197
201
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
198
202
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
199
203
|
# @param body [Object] Parameters to send with the custom request.
|
@@ -204,8 +208,8 @@ module Algolia
|
|
204
208
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
205
209
|
end
|
206
210
|
|
207
|
-
# Send requests to the Algolia REST API.
|
208
211
|
# This method allow you to send requests to the Algolia REST API.
|
212
|
+
|
209
213
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
210
214
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
211
215
|
# @param body [Object] Parameters to send with the custom request.
|
@@ -237,8 +241,8 @@ module Algolia
|
|
237
241
|
@api_client.call_api(:PUT, path, new_options)
|
238
242
|
end
|
239
243
|
|
240
|
-
# Send requests to the Algolia REST API.
|
241
244
|
# This method allow you to send requests to the Algolia REST API.
|
245
|
+
|
242
246
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
243
247
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
244
248
|
# @param body [Object] Parameters to send with the custom request.
|
@@ -249,8 +253,10 @@ module Algolia
|
|
249
253
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
250
254
|
end
|
251
255
|
|
252
|
-
# Delete a configuration.
|
253
256
|
# Delete a Query Suggestions configuration. Deleting only removes the configuration and stops updates to the Query Suggestions index. The Query Suggestions index itself is not deleted.
|
257
|
+
#
|
258
|
+
# Required API Key ACLs:
|
259
|
+
# - editSettings
|
254
260
|
# @param index_name [String] Query Suggestions index name. (required)
|
255
261
|
# @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)
|
256
262
|
# @return [Http::Response] the response
|
@@ -260,7 +266,7 @@ module Algolia
|
|
260
266
|
raise ArgumentError, "Parameter `index_name` is required when calling `delete_config`."
|
261
267
|
end
|
262
268
|
|
263
|
-
path = '/1/configs/{indexName}'.sub('{' + 'indexName' + '}',
|
269
|
+
path = '/1/configs/{indexName}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
|
264
270
|
query_params = {}
|
265
271
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
266
272
|
header_params = {}
|
@@ -279,8 +285,10 @@ module Algolia
|
|
279
285
|
@api_client.call_api(:DELETE, path, new_options)
|
280
286
|
end
|
281
287
|
|
282
|
-
# Delete a configuration.
|
283
288
|
# Delete a Query Suggestions configuration. Deleting only removes the configuration and stops updates to the Query Suggestions index. The Query Suggestions index itself is not deleted.
|
289
|
+
#
|
290
|
+
# Required API Key ACLs:
|
291
|
+
# - editSettings
|
284
292
|
# @param index_name [String] Query Suggestions index name. (required)
|
285
293
|
# @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
294
|
# @return [BaseResponse]
|
@@ -289,8 +297,10 @@ module Algolia
|
|
289
297
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'QuerySuggestions::BaseResponse')
|
290
298
|
end
|
291
299
|
|
292
|
-
# List configurations.
|
293
300
|
# List all Query Suggestions configurations of your Algolia application.
|
301
|
+
#
|
302
|
+
# Required API Key ACLs:
|
303
|
+
# - settings
|
294
304
|
# @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)
|
295
305
|
# @return [Http::Response] the response
|
296
306
|
def get_all_configs_with_http_info(request_options = {})
|
@@ -313,8 +323,10 @@ module Algolia
|
|
313
323
|
@api_client.call_api(:GET, path, new_options)
|
314
324
|
end
|
315
325
|
|
316
|
-
# List configurations.
|
317
326
|
# List all Query Suggestions configurations of your Algolia application.
|
327
|
+
#
|
328
|
+
# Required API Key ACLs:
|
329
|
+
# - settings
|
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 [Array<QuerySuggestionsConfigurationResponse>]
|
320
332
|
def get_all_configs(request_options = {})
|
@@ -322,8 +334,10 @@ module Algolia
|
|
322
334
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Array<QuerySuggestions::QuerySuggestionsConfigurationResponse>')
|
323
335
|
end
|
324
336
|
|
325
|
-
# Get a configuration.
|
326
337
|
# Get a single Query Suggestions configuration.
|
338
|
+
#
|
339
|
+
# Required API Key ACLs:
|
340
|
+
# - settings
|
327
341
|
# @param index_name [String] Query Suggestions index name. (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
|
@@ -333,7 +347,7 @@ module Algolia
|
|
333
347
|
raise ArgumentError, "Parameter `index_name` is required when calling `get_config`."
|
334
348
|
end
|
335
349
|
|
336
|
-
path = '/1/configs/{indexName}'.sub('{' + 'indexName' + '}',
|
350
|
+
path = '/1/configs/{indexName}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
|
337
351
|
query_params = {}
|
338
352
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
339
353
|
header_params = {}
|
@@ -352,8 +366,10 @@ module Algolia
|
|
352
366
|
@api_client.call_api(:GET, path, new_options)
|
353
367
|
end
|
354
368
|
|
355
|
-
# Get a configuration.
|
356
369
|
# Get a single Query Suggestions configuration.
|
370
|
+
#
|
371
|
+
# Required API Key ACLs:
|
372
|
+
# - settings
|
357
373
|
# @param index_name [String] Query Suggestions index name. (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 [QuerySuggestionsConfigurationResponse]
|
@@ -362,8 +378,10 @@ module Algolia
|
|
362
378
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'QuerySuggestions::QuerySuggestionsConfigurationResponse')
|
363
379
|
end
|
364
380
|
|
365
|
-
# Get configuration status.
|
366
381
|
# Report the status of a Query Suggestions index.
|
382
|
+
#
|
383
|
+
# Required API Key ACLs:
|
384
|
+
# - settings
|
367
385
|
# @param index_name [String] Query Suggestions index name. (required)
|
368
386
|
# @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)
|
369
387
|
# @return [Http::Response] the response
|
@@ -373,7 +391,7 @@ module Algolia
|
|
373
391
|
raise ArgumentError, "Parameter `index_name` is required when calling `get_config_status`."
|
374
392
|
end
|
375
393
|
|
376
|
-
path = '/1/configs/{indexName}/status'.sub('{' + 'indexName' + '}',
|
394
|
+
path = '/1/configs/{indexName}/status'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
|
377
395
|
query_params = {}
|
378
396
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
379
397
|
header_params = {}
|
@@ -392,8 +410,10 @@ module Algolia
|
|
392
410
|
@api_client.call_api(:GET, path, new_options)
|
393
411
|
end
|
394
412
|
|
395
|
-
# Get configuration status.
|
396
413
|
# Report the status of a Query Suggestions index.
|
414
|
+
#
|
415
|
+
# Required API Key ACLs:
|
416
|
+
# - settings
|
397
417
|
# @param index_name [String] Query Suggestions index name. (required)
|
398
418
|
# @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)
|
399
419
|
# @return [GetConfigStatus200Response]
|
@@ -402,8 +422,10 @@ module Algolia
|
|
402
422
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'QuerySuggestions::GetConfigStatus200Response')
|
403
423
|
end
|
404
424
|
|
405
|
-
# Get logs.
|
406
425
|
# Get the logs for a single Query Suggestions index.
|
426
|
+
#
|
427
|
+
# Required API Key ACLs:
|
428
|
+
# - settings
|
407
429
|
# @param index_name [String] Query Suggestions index name. (required)
|
408
430
|
# @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)
|
409
431
|
# @return [Http::Response] the response
|
@@ -413,7 +435,7 @@ module Algolia
|
|
413
435
|
raise ArgumentError, "Parameter `index_name` is required when calling `get_log_file`."
|
414
436
|
end
|
415
437
|
|
416
|
-
path = '/1/logs/{indexName}'.sub('{' + 'indexName' + '}',
|
438
|
+
path = '/1/logs/{indexName}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
|
417
439
|
query_params = {}
|
418
440
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
419
441
|
header_params = {}
|
@@ -432,8 +454,10 @@ module Algolia
|
|
432
454
|
@api_client.call_api(:GET, path, new_options)
|
433
455
|
end
|
434
456
|
|
435
|
-
# Get logs.
|
436
457
|
# Get the logs for a single Query Suggestions index.
|
458
|
+
#
|
459
|
+
# Required API Key ACLs:
|
460
|
+
# - settings
|
437
461
|
# @param index_name [String] Query Suggestions index name. (required)
|
438
462
|
# @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)
|
439
463
|
# @return [GetLogFile200Response]
|
@@ -442,8 +466,10 @@ module Algolia
|
|
442
466
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'QuerySuggestions::GetLogFile200Response')
|
443
467
|
end
|
444
468
|
|
445
|
-
# Update a configuration.
|
446
469
|
# Update a QuerySuggestions configuration.
|
470
|
+
#
|
471
|
+
# Required API Key ACLs:
|
472
|
+
# - editSettings
|
447
473
|
# @param index_name [String] Query Suggestions index name. (required)
|
448
474
|
# @param query_suggestions_configuration [QuerySuggestionsConfiguration] (required)
|
449
475
|
# @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)
|
@@ -458,7 +484,7 @@ module Algolia
|
|
458
484
|
raise ArgumentError, "Parameter `query_suggestions_configuration` is required when calling `update_config`."
|
459
485
|
end
|
460
486
|
|
461
|
-
path = '/1/configs/{indexName}'.sub('{' + 'indexName' + '}',
|
487
|
+
path = '/1/configs/{indexName}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
|
462
488
|
query_params = {}
|
463
489
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
464
490
|
header_params = {}
|
@@ -477,8 +503,10 @@ module Algolia
|
|
477
503
|
@api_client.call_api(:PUT, path, new_options)
|
478
504
|
end
|
479
505
|
|
480
|
-
# Update a configuration.
|
481
506
|
# Update a QuerySuggestions configuration.
|
507
|
+
#
|
508
|
+
# Required API Key ACLs:
|
509
|
+
# - editSettings
|
482
510
|
# @param index_name [String] Query Suggestions index name. (required)
|
483
511
|
# @param query_suggestions_configuration [QuerySuggestionsConfiguration] (required)
|
484
512
|
# @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)
|
@@ -29,8 +29,8 @@ module Algolia
|
|
29
29
|
new(config)
|
30
30
|
end
|
31
31
|
|
32
|
-
# Send requests to the Algolia REST API.
|
33
32
|
# This method allow you to send requests to the Algolia REST API.
|
33
|
+
|
34
34
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
35
35
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
36
36
|
# @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)
|
@@ -61,8 +61,8 @@ module Algolia
|
|
61
61
|
@api_client.call_api(:DELETE, path, new_options)
|
62
62
|
end
|
63
63
|
|
64
|
-
# Send requests to the Algolia REST API.
|
65
64
|
# This method allow you to send requests to the Algolia REST API.
|
65
|
+
|
66
66
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
67
67
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
68
68
|
# @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)
|
@@ -72,8 +72,8 @@ module Algolia
|
|
72
72
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
73
73
|
end
|
74
74
|
|
75
|
-
# Send requests to the Algolia REST API.
|
76
75
|
# This method allow you to send requests to the Algolia REST API.
|
76
|
+
|
77
77
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
78
78
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
79
79
|
# @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)
|
@@ -104,8 +104,8 @@ module Algolia
|
|
104
104
|
@api_client.call_api(:GET, path, new_options)
|
105
105
|
end
|
106
106
|
|
107
|
-
# Send requests to the Algolia REST API.
|
108
107
|
# This method allow you to send requests to the Algolia REST API.
|
108
|
+
|
109
109
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
110
110
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
111
111
|
# @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)
|
@@ -115,8 +115,8 @@ module Algolia
|
|
115
115
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
116
116
|
end
|
117
117
|
|
118
|
-
# Send requests to the Algolia REST API.
|
119
118
|
# This method allow you to send requests to the Algolia REST API.
|
119
|
+
|
120
120
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
121
121
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
122
122
|
# @param body [Object] Parameters to send with the custom request.
|
@@ -148,8 +148,8 @@ module Algolia
|
|
148
148
|
@api_client.call_api(:POST, path, new_options)
|
149
149
|
end
|
150
150
|
|
151
|
-
# Send requests to the Algolia REST API.
|
152
151
|
# This method allow you to send requests to the Algolia REST API.
|
152
|
+
|
153
153
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
154
154
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
155
155
|
# @param body [Object] Parameters to send with the custom request.
|
@@ -160,8 +160,8 @@ module Algolia
|
|
160
160
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
161
161
|
end
|
162
162
|
|
163
|
-
# Send requests to the Algolia REST API.
|
164
163
|
# This method allow you to send requests to the Algolia REST API.
|
164
|
+
|
165
165
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
166
166
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
167
167
|
# @param body [Object] Parameters to send with the custom request.
|
@@ -193,8 +193,8 @@ module Algolia
|
|
193
193
|
@api_client.call_api(:PUT, path, new_options)
|
194
194
|
end
|
195
195
|
|
196
|
-
# Send requests to the Algolia REST API.
|
197
196
|
# This method allow you to send requests to the Algolia REST API.
|
197
|
+
|
198
198
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
199
199
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
200
200
|
# @param body [Object] Parameters to send with the custom request.
|
@@ -205,8 +205,10 @@ module Algolia
|
|
205
205
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
206
206
|
end
|
207
207
|
|
208
|
-
# Delete a Recommend rule.
|
209
208
|
# Delete a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
|
209
|
+
#
|
210
|
+
# Required API Key ACLs:
|
211
|
+
# - editSettings
|
210
212
|
# @param index_name [String] Index on which to perform the request. (required)
|
211
213
|
# @param model [RecommendModels] [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required)
|
212
214
|
# @param object_id [String] Unique record (object) identifier. (required)
|
@@ -226,8 +228,8 @@ module Algolia
|
|
226
228
|
raise ArgumentError, "Parameter `object_id` is required when calling `delete_recommend_rule`."
|
227
229
|
end
|
228
230
|
|
229
|
-
path = '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}'.sub('{' + 'indexName' + '}',
|
230
|
-
'{' + 'objectID' + '}',
|
231
|
+
path = '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'model' + '}', Transport.encode_uri(model.to_s)).sub(
|
232
|
+
'{' + 'objectID' + '}', Transport.encode_uri(object_id.to_s)
|
231
233
|
)
|
232
234
|
query_params = {}
|
233
235
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
@@ -247,8 +249,10 @@ module Algolia
|
|
247
249
|
@api_client.call_api(:DELETE, path, new_options)
|
248
250
|
end
|
249
251
|
|
250
|
-
# Delete a Recommend rule.
|
251
252
|
# Delete a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
|
253
|
+
#
|
254
|
+
# Required API Key ACLs:
|
255
|
+
# - editSettings
|
252
256
|
# @param index_name [String] Index on which to perform the request. (required)
|
253
257
|
# @param model [RecommendModels] [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required)
|
254
258
|
# @param object_id [String] Unique record (object) identifier. (required)
|
@@ -259,8 +263,10 @@ module Algolia
|
|
259
263
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Recommend::DeletedAtResponse')
|
260
264
|
end
|
261
265
|
|
262
|
-
# Get a Recommend rule.
|
263
266
|
# Return a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
|
267
|
+
#
|
268
|
+
# Required API Key ACLs:
|
269
|
+
# - settings
|
264
270
|
# @param index_name [String] Index on which to perform the request. (required)
|
265
271
|
# @param model [RecommendModels] [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required)
|
266
272
|
# @param object_id [String] Unique record (object) identifier. (required)
|
@@ -280,8 +286,8 @@ module Algolia
|
|
280
286
|
raise ArgumentError, "Parameter `object_id` is required when calling `get_recommend_rule`."
|
281
287
|
end
|
282
288
|
|
283
|
-
path = '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}'.sub('{' + 'indexName' + '}',
|
284
|
-
'{' + 'objectID' + '}',
|
289
|
+
path = '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'model' + '}', Transport.encode_uri(model.to_s)).sub(
|
290
|
+
'{' + 'objectID' + '}', Transport.encode_uri(object_id.to_s)
|
285
291
|
)
|
286
292
|
query_params = {}
|
287
293
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
@@ -301,8 +307,10 @@ module Algolia
|
|
301
307
|
@api_client.call_api(:GET, path, new_options)
|
302
308
|
end
|
303
309
|
|
304
|
-
# Get a Recommend rule.
|
305
310
|
# Return a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
|
311
|
+
#
|
312
|
+
# Required API Key ACLs:
|
313
|
+
# - settings
|
306
314
|
# @param index_name [String] Index on which to perform the request. (required)
|
307
315
|
# @param model [RecommendModels] [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required)
|
308
316
|
# @param object_id [String] Unique record (object) identifier. (required)
|
@@ -313,8 +321,10 @@ module Algolia
|
|
313
321
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Recommend::RuleResponse')
|
314
322
|
end
|
315
323
|
|
316
|
-
# Get a Recommend task's status.
|
317
324
|
# Some operations, such as deleting a Recommend rule, will respond with a `taskID` value. Use this value here to check the status of that task.
|
325
|
+
#
|
326
|
+
# Required API Key ACLs:
|
327
|
+
# - editSettings
|
318
328
|
# @param index_name [String] Index on which to perform the request. (required)
|
319
329
|
# @param model [RecommendModels] [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required)
|
320
330
|
# @param task_id [Integer] Unique identifier of a task. Numeric value (up to 64bits). (required)
|
@@ -334,8 +344,8 @@ module Algolia
|
|
334
344
|
raise ArgumentError, "Parameter `task_id` is required when calling `get_recommend_status`."
|
335
345
|
end
|
336
346
|
|
337
|
-
path = '/1/indexes/{indexName}/{model}/task/{taskID}'.sub('{' + 'indexName' + '}',
|
338
|
-
'{' + 'taskID' + '}',
|
347
|
+
path = '/1/indexes/{indexName}/{model}/task/{taskID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'model' + '}', Transport.encode_uri(model.to_s)).sub(
|
348
|
+
'{' + 'taskID' + '}', Transport.encode_uri(task_id.to_s)
|
339
349
|
)
|
340
350
|
query_params = {}
|
341
351
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
@@ -355,8 +365,10 @@ module Algolia
|
|
355
365
|
@api_client.call_api(:GET, path, new_options)
|
356
366
|
end
|
357
367
|
|
358
|
-
# Get a Recommend task's status.
|
359
368
|
# Some operations, such as deleting a Recommend rule, will respond with a `taskID` value. Use this value here to check the status of that task.
|
369
|
+
#
|
370
|
+
# Required API Key ACLs:
|
371
|
+
# - editSettings
|
360
372
|
# @param index_name [String] Index on which to perform the request. (required)
|
361
373
|
# @param model [RecommendModels] [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required)
|
362
374
|
# @param task_id [Integer] Unique identifier of a task. Numeric value (up to 64bits). (required)
|
@@ -367,8 +379,10 @@ module Algolia
|
|
367
379
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Recommend::GetRecommendTaskResponse')
|
368
380
|
end
|
369
381
|
|
370
|
-
# Get recommendations and trending items.
|
371
382
|
# Returns results from either recommendation or trending models: - **Recommendations** are provided by the [Related Products](https://www.algolia.com/doc/guides/algolia-recommend/overview/#related-products-and-related-content) and [Frequently Bought Together](https://www.algolia.com/doc/guides/algolia-recommend/overview/#frequently-bought-together) models - **Trending** models are [Trending Items and Trending Facet Values](https://www.algolia.com/doc/guides/algolia-recommend/overview/#trending-items-and-trending-facet-values).
|
383
|
+
#
|
384
|
+
# Required API Key ACLs:
|
385
|
+
# - search
|
372
386
|
# @param get_recommendations_params [GetRecommendationsParams] (required)
|
373
387
|
# @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)
|
374
388
|
# @return [Http::Response] the response
|
@@ -397,8 +411,10 @@ module Algolia
|
|
397
411
|
@api_client.call_api(:POST, path, new_options)
|
398
412
|
end
|
399
413
|
|
400
|
-
# Get recommendations and trending items.
|
401
414
|
# Returns results from either recommendation or trending models: - **Recommendations** are provided by the [Related Products](https://www.algolia.com/doc/guides/algolia-recommend/overview/#related-products-and-related-content) and [Frequently Bought Together](https://www.algolia.com/doc/guides/algolia-recommend/overview/#frequently-bought-together) models - **Trending** models are [Trending Items and Trending Facet Values](https://www.algolia.com/doc/guides/algolia-recommend/overview/#trending-items-and-trending-facet-values).
|
415
|
+
#
|
416
|
+
# Required API Key ACLs:
|
417
|
+
# - search
|
402
418
|
# @param get_recommendations_params [GetRecommendationsParams] (required)
|
403
419
|
# @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)
|
404
420
|
# @return [GetRecommendationsResponse]
|
@@ -407,8 +423,10 @@ module Algolia
|
|
407
423
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Recommend::GetRecommendationsResponse')
|
408
424
|
end
|
409
425
|
|
410
|
-
# List Recommend rules.
|
411
426
|
# List [Recommend rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
|
427
|
+
#
|
428
|
+
# Required API Key ACLs:
|
429
|
+
# - settings
|
412
430
|
# @param index_name [String] Index on which to perform the request. (required)
|
413
431
|
# @param model [RecommendModels] [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required)
|
414
432
|
# @param search_recommend_rules_params [SearchRecommendRulesParams]
|
@@ -424,8 +442,8 @@ module Algolia
|
|
424
442
|
raise ArgumentError, "Parameter `model` is required when calling `search_recommend_rules`."
|
425
443
|
end
|
426
444
|
|
427
|
-
path = '/1/indexes/{indexName}/{model}/recommend/rules/search'.sub('{' + 'indexName' + '}',
|
428
|
-
|
445
|
+
path = '/1/indexes/{indexName}/{model}/recommend/rules/search'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'model' + '}',
|
446
|
+
Transport.encode_uri(model.to_s))
|
429
447
|
query_params = {}
|
430
448
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
431
449
|
header_params = {}
|
@@ -444,8 +462,10 @@ module Algolia
|
|
444
462
|
@api_client.call_api(:POST, path, new_options)
|
445
463
|
end
|
446
464
|
|
447
|
-
# List Recommend rules.
|
448
465
|
# List [Recommend rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
|
466
|
+
#
|
467
|
+
# Required API Key ACLs:
|
468
|
+
# - settings
|
449
469
|
# @param index_name [String] Index on which to perform the request. (required)
|
450
470
|
# @param model [RecommendModels] [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). (required)
|
451
471
|
# @param search_recommend_rules_params [SearchRecommendRulesParams]
|