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 authentication resource.
@@ -237,7 +245,7 @@ module Algolia
237
245
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::TaskCreateResponse")
238
246
  end
239
247
 
240
- # Creates a new task using the v1 endpoint, please use `createTask` instead.
248
+ # Creates a new task using the v1 endpoint, please use `createTask` instead.
241
249
 
242
250
  # @param task_create [TaskCreateV1] Request body for creating a task. (required)
243
251
  # @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)
@@ -322,7 +330,7 @@ module Algolia
322
330
 
323
331
  # This method allow you to send requests to the Algolia REST API.
324
332
 
325
- # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
333
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
326
334
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
327
335
  # @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)
328
336
  # @return [Http::Response] the response
@@ -354,7 +362,7 @@ module Algolia
354
362
 
355
363
  # This method allow you to send requests to the Algolia REST API.
356
364
 
357
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
365
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
358
366
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
359
367
  # @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)
360
368
  # @return [Object]
@@ -365,7 +373,7 @@ module Algolia
365
373
 
366
374
  # This method allow you to send requests to the Algolia REST API.
367
375
 
368
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
376
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
369
377
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
370
378
  # @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)
371
379
  # @return [Http::Response] the response
@@ -397,7 +405,7 @@ module Algolia
397
405
 
398
406
  # This method allow you to send requests to the Algolia REST API.
399
407
 
400
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
408
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
401
409
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
402
410
  # @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)
403
411
  # @return [Object]
@@ -408,7 +416,7 @@ module Algolia
408
416
 
409
417
  # This method allow you to send requests to the Algolia REST API.
410
418
 
411
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
419
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
412
420
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
413
421
  # @param body [Object] Parameters to send with the custom request.
414
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)
@@ -441,7 +449,7 @@ module Algolia
441
449
 
442
450
  # This method allow you to send requests to the Algolia REST API.
443
451
 
444
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
452
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
445
453
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
446
454
  # @param body [Object] Parameters to send with the custom request.
447
455
  # @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)
@@ -453,7 +461,7 @@ module Algolia
453
461
 
454
462
  # This method allow you to send requests to the Algolia REST API.
455
463
 
456
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
464
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
457
465
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
458
466
  # @param body [Object] Parameters to send with the custom request.
459
467
  # @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)
@@ -486,7 +494,7 @@ module Algolia
486
494
 
487
495
  # This method allow you to send requests to the Algolia REST API.
488
496
 
489
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
497
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
490
498
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
491
499
  # @param body [Object] Parameters to send with the custom request.
492
500
  # @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)
@@ -496,7 +504,7 @@ module Algolia
496
504
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Object")
497
505
  end
498
506
 
499
- # Deletes an authentication resource. You can&#39;t delete authentication resources that are used by a source or a destination.
507
+ # Deletes an authentication resource. You can't delete authentication resources that are used by a source or a destination.
500
508
  #
501
509
  # Required API Key ACLs:
502
510
  # - addObject
@@ -547,7 +555,7 @@ module Algolia
547
555
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::DeleteResponse")
548
556
  end
549
557
 
550
- # Deletes a destination by its ID. You can&#39;t delete destinations that are referenced in tasks.
558
+ # Deletes a destination by its ID. You can't delete destinations that are referenced in tasks.
551
559
  #
552
560
  # Required API Key ACLs:
553
561
  # - addObject
@@ -598,7 +606,7 @@ module Algolia
598
606
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::DeleteResponse")
599
607
  end
600
608
 
601
- # Deletes a source by its ID. You can&#39;t delete sources that are referenced in tasks.
609
+ # Deletes a source by its ID. You can't delete sources that are referenced in tasks.
602
610
  #
603
611
  # Required API Key ACLs:
604
612
  # - addObject
@@ -686,7 +694,7 @@ module Algolia
686
694
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::DeleteResponse")
687
695
  end
688
696
 
689
- # Deletes a task by its ID using the v1 endpoint, please use &#x60;deleteTask&#x60; instead.
697
+ # Deletes a task by its ID using the v1 endpoint, please use `deleteTask` instead.
690
698
 
691
699
  # @param task_id [String] Unique identifier of a task. (required)
692
700
  # @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)
@@ -817,7 +825,7 @@ module Algolia
817
825
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::TaskUpdateResponse")
818
826
  end
819
827
 
820
- # Disables a task using the v1 endpoint, please use &#x60;disableTask&#x60; instead.
828
+ # Disables a task using the v1 endpoint, please use `disableTask` instead.
821
829
  #
822
830
  # Required API Key ACLs:
823
831
  # - addObject
@@ -913,7 +921,7 @@ module Algolia
913
921
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::TaskUpdateResponse")
914
922
  end
915
923
 
916
- # Enables a task using the v1 endpoint, please use &#x60;enableTask&#x60; instead.
924
+ # Enables a task using the v1 endpoint, please use `enableTask` instead.
917
925
  #
918
926
  # Required API Key ACLs:
919
927
  # - addObject
@@ -1264,7 +1272,7 @@ module Algolia
1264
1272
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::Task")
1265
1273
  end
1266
1274
 
1267
- # Retrieves a task by its ID using the v1 endpoint, please use &#x60;getTask&#x60; instead.
1275
+ # Retrieves a task by its ID using the v1 endpoint, please use `getTask` instead.
1268
1276
  #
1269
1277
  # Required API Key ACLs:
1270
1278
  # - addObject
@@ -1751,7 +1759,7 @@ module Algolia
1751
1759
  # @param items_per_page [Integer] Number of items per page. (default to 10)
1752
1760
  # @param page [Integer] Page number of the paginated API response.
1753
1761
  # @param type [Array<SourceType>] Source type. Some sources require authentication.
1754
- # @param authentication_id [Array<String>] Authentication IDs of the sources to retrieve. &#39;none&#39; returns sources that doesn&#39;t have an authentication.
1762
+ # @param authentication_id [Array<String>] Authentication IDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication.
1755
1763
  # @param sort [SourceSortKeys] Property by which to sort the list of sources. (default to 'createdAt')
1756
1764
  # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
1757
1765
  # @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)
@@ -1802,7 +1810,7 @@ module Algolia
1802
1810
  # @param items_per_page [Integer] Number of items per page. (default to 10)
1803
1811
  # @param page [Integer] Page number of the paginated API response.
1804
1812
  # @param type [Array<SourceType>] Source type. Some sources require authentication.
1805
- # @param authentication_id [Array<String>] Authentication IDs of the sources to retrieve. &#39;none&#39; returns sources that doesn&#39;t have an authentication.
1813
+ # @param authentication_id [Array<String>] Authentication IDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication.
1806
1814
  # @param sort [SourceSortKeys] Property by which to sort the list of sources. (default to 'createdAt')
1807
1815
  # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
1808
1816
  # @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)
@@ -1837,7 +1845,7 @@ module Algolia
1837
1845
  # @param items_per_page [Integer] Number of items per page. (default to 10)
1838
1846
  # @param page [Integer] Page number of the paginated API response.
1839
1847
  # @param action [Array<ActionType>] Actions for filtering the list of tasks.
1840
- # @param enabled [Boolean] Whether to filter the list of tasks by the &#x60;enabled&#x60; status.
1848
+ # @param enabled [Boolean] Whether to filter the list of tasks by the `enabled` status.
1841
1849
  # @param source_id [Array<String>] Source IDs for filtering the list of tasks.
1842
1850
  # @param destination_id [Array<String>] Destination IDs for filtering the list of tasks.
1843
1851
  # @param trigger_type [Array<TriggerType>] Type of task trigger for filtering the list of tasks.
@@ -1897,7 +1905,7 @@ module Algolia
1897
1905
  # @param items_per_page [Integer] Number of items per page. (default to 10)
1898
1906
  # @param page [Integer] Page number of the paginated API response.
1899
1907
  # @param action [Array<ActionType>] Actions for filtering the list of tasks.
1900
- # @param enabled [Boolean] Whether to filter the list of tasks by the &#x60;enabled&#x60; status.
1908
+ # @param enabled [Boolean] Whether to filter the list of tasks by the `enabled` status.
1901
1909
  # @param source_id [Array<String>] Source IDs for filtering the list of tasks.
1902
1910
  # @param destination_id [Array<String>] Destination IDs for filtering the list of tasks.
1903
1911
  # @param trigger_type [Array<TriggerType>] Type of task trigger for filtering the list of tasks.
@@ -1932,7 +1940,7 @@ module Algolia
1932
1940
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::ListTasksResponse")
1933
1941
  end
1934
1942
 
1935
- # Retrieves a list of tasks using the v1 endpoint, please use &#x60;getTasks&#x60; instead.
1943
+ # Retrieves a list of tasks using the v1 endpoint, please use `getTasks` instead.
1936
1944
  #
1937
1945
  # Required API Key ACLs:
1938
1946
  # - addObject
@@ -1941,7 +1949,7 @@ module Algolia
1941
1949
  # @param items_per_page [Integer] Number of items per page. (default to 10)
1942
1950
  # @param page [Integer] Page number of the paginated API response.
1943
1951
  # @param action [Array<ActionType>] Actions for filtering the list of tasks.
1944
- # @param enabled [Boolean] Whether to filter the list of tasks by the &#x60;enabled&#x60; status.
1952
+ # @param enabled [Boolean] Whether to filter the list of tasks by the `enabled` status.
1945
1953
  # @param source_id [Array<String>] Source IDs for filtering the list of tasks.
1946
1954
  # @param destination_id [Array<String>] Destination IDs for filtering the list of tasks.
1947
1955
  # @param trigger_type [Array<TriggerType>] Type of task trigger for filtering the list of tasks.
@@ -2001,7 +2009,7 @@ module Algolia
2001
2009
  # @param items_per_page [Integer] Number of items per page. (default to 10)
2002
2010
  # @param page [Integer] Page number of the paginated API response.
2003
2011
  # @param action [Array<ActionType>] Actions for filtering the list of tasks.
2004
- # @param enabled [Boolean] Whether to filter the list of tasks by the &#x60;enabled&#x60; status.
2012
+ # @param enabled [Boolean] Whether to filter the list of tasks by the `enabled` status.
2005
2013
  # @param source_id [Array<String>] Source IDs for filtering the list of tasks.
2006
2014
  # @param destination_id [Array<String>] Destination IDs for filtering the list of tasks.
2007
2015
  # @param trigger_type [Array<TriggerType>] Type of task trigger for filtering the list of tasks.
@@ -2098,14 +2106,14 @@ module Algolia
2098
2106
  )
2099
2107
  end
2100
2108
 
2101
- # Push a &#x60;batch&#x60; request payload through the Pipeline. You can check the status of task pushes with the observability endpoints.
2109
+ # Push a `batch` request payload through the Pipeline. You can check the status of task pushes with the observability endpoints.
2102
2110
  #
2103
2111
  # Required API Key ACLs:
2104
2112
  # - addObject
2105
2113
  # - deleteIndex
2106
2114
  # - editSettings
2107
2115
  # @param task_id [String] Unique identifier of a task. (required)
2108
- # @param push_task_payload [PushTaskPayload] Request body of a Search API &#x60;batch&#x60; request that will be pushed in the Connectors pipeline. (required)
2116
+ # @param push_task_payload [PushTaskPayload] Request body of a Search API `batch` request that will be pushed in the Connectors pipeline. (required)
2109
2117
  # @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)
2110
2118
  # @return [Http::Response] the response
2111
2119
  def push_task_with_http_info(task_id, push_task_payload, request_options = {})
@@ -2144,7 +2152,7 @@ module Algolia
2144
2152
  # - deleteIndex
2145
2153
  # - editSettings
2146
2154
  # @param task_id [String] Unique identifier of a task. (required)
2147
- # @param push_task_payload [PushTaskPayload] Request body of a Search API &#x60;batch&#x60; request that will be pushed in the Connectors pipeline. (required)
2155
+ # @param push_task_payload [PushTaskPayload] Request body of a Search API `batch` request that will be pushed in the Connectors pipeline. (required)
2148
2156
  # @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)
2149
2157
  # @return [RunResponse]
2150
2158
  def push_task(task_id, push_task_payload, request_options = {})
@@ -2250,7 +2258,7 @@ module Algolia
2250
2258
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::RunResponse")
2251
2259
  end
2252
2260
 
2253
- # Runs a task using the v1 endpoint, please use &#x60;runTask&#x60; instead. You can check the status of task runs with the observability endpoints.
2261
+ # Runs a task using the v1 endpoint, please use `runTask` instead. You can check the status of task runs with the observability endpoints.
2254
2262
  #
2255
2263
  # Required API Key ACLs:
2256
2264
  # - addObject
@@ -2490,7 +2498,7 @@ module Algolia
2490
2498
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Array<Ingestion::Task>")
2491
2499
  end
2492
2500
 
2493
- # Searches for tasks using the v1 endpoint, please use &#x60;searchTasks&#x60; instead.
2501
+ # Searches for tasks using the v1 endpoint, please use `searchTasks` instead.
2494
2502
  #
2495
2503
  # Required API Key ACLs:
2496
2504
  # - addObject
@@ -2586,7 +2594,7 @@ module Algolia
2586
2594
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Array<Ingestion::Transformation>")
2587
2595
  end
2588
2596
 
2589
- # Triggers a stream-listing request for a source. Triggering stream-listing requests only works with sources with &#x60;type: docker&#x60; and &#x60;imageType: singer&#x60;.
2597
+ # Triggers a stream-listing request for a source. Triggering stream-listing requests only works with sources with `type: docker` and `imageType: singer`.
2590
2598
  #
2591
2599
  # Required API Key ACLs:
2592
2600
  # - addObject
@@ -2971,7 +2979,7 @@ module Algolia
2971
2979
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::TaskUpdateResponse")
2972
2980
  end
2973
2981
 
2974
- # Updates a task by its ID using the v1 endpoint, please use &#x60;updateTask&#x60; instead.
2982
+ # Updates a task by its ID using the v1 endpoint, please use `updateTask` instead.
2975
2983
 
2976
2984
  # @param task_id [String] Unique identifier of a task. (required)
2977
2985
  # @param task_update [TaskUpdateV1] (required)
@@ -45,11 +45,19 @@ 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
  # This method allow you to send requests to the Algolia REST API.
51
59
 
52
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
60
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
53
61
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
54
62
  # @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)
55
63
  # @return [Http::Response] the response
@@ -81,7 +89,7 @@ module Algolia
81
89
 
82
90
  # This method allow you to send requests to the Algolia REST API.
83
91
 
84
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
92
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
85
93
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
86
94
  # @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)
87
95
  # @return [Object]
@@ -92,7 +100,7 @@ module Algolia
92
100
 
93
101
  # This method allow you to send requests to the Algolia REST API.
94
102
 
95
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
103
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
96
104
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
97
105
  # @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)
98
106
  # @return [Http::Response] the response
@@ -124,7 +132,7 @@ module Algolia
124
132
 
125
133
  # This method allow you to send requests to the Algolia REST API.
126
134
 
127
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
135
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
128
136
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
129
137
  # @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)
130
138
  # @return [Object]
@@ -135,7 +143,7 @@ module Algolia
135
143
 
136
144
  # This method allow you to send requests to the Algolia REST API.
137
145
 
138
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
146
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
139
147
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
140
148
  # @param body [Object] Parameters to send with the custom request.
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)
@@ -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 body [Object] Parameters to send with the custom request.
174
182
  # @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,7 +188,7 @@ module Algolia
180
188
 
181
189
  # This method allow you to send requests to the Algolia REST API.
182
190
 
183
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
191
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
184
192
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
185
193
  # @param body [Object] Parameters to send with the custom request.
186
194
  # @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)
@@ -213,7 +221,7 @@ module Algolia
213
221
 
214
222
  # This method allow you to send requests to the Algolia REST API.
215
223
 
216
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
224
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
217
225
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
218
226
  # @param body [Object] Parameters to send with the custom request.
219
227
  # @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)
@@ -223,7 +231,7 @@ module Algolia
223
231
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Object")
224
232
  end
225
233
 
226
- # Deletes all events related to the specified user token from events metrics and analytics. The deletion is asynchronous, and processed within 48 hours. To delete a personalization user profile, see &#x60;Delete a user profile&#x60; in the Personalization API.
234
+ # Deletes all events related to the specified user token from events metrics and analytics. The deletion is asynchronous, and processed within 48 hours. To delete a personalization user profile, see `Delete a user profile` in the Personalization API.
227
235
 
228
236
  # @param user_token [String] User token for which to delete all associated events. (required)
229
237
  # @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
  nil
264
272
  end
265
273
 
266
- # Sends 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.
274
+ # Sends 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.
267
275
 
268
276
  # @param insights_events [InsightsEvents] (required)
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)
@@ -30,11 +30,19 @@ module Algolia
30
30
  # @return [void]
31
31
  def set_client_api_key(api_key)
32
32
  @api_client.set_client_api_key(api_key)
33
+
34
+ self
35
+ end
36
+
37
+ def add_user_agent_segment(segment, version = nil)
38
+ @api_client.config.add_user_agent_segment(segment, version)
39
+
40
+ self
33
41
  end
34
42
 
35
43
  # This method allow you to send requests to the Algolia REST API.
36
44
 
37
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
45
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
38
46
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
39
47
  # @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
48
  # @return [Http::Response] the response
@@ -66,7 +74,7 @@ module Algolia
66
74
 
67
75
  # This method allow you to send requests to the Algolia REST API.
68
76
 
69
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
77
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
70
78
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
71
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)
72
80
  # @return [Object]
@@ -77,7 +85,7 @@ module Algolia
77
85
 
78
86
  # This method allow you to send requests to the Algolia REST API.
79
87
 
80
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
88
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
81
89
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
82
90
  # @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)
83
91
  # @return [Http::Response] the response
@@ -109,7 +117,7 @@ module Algolia
109
117
 
110
118
  # This method allow you to send requests to the Algolia REST API.
111
119
 
112
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
120
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
113
121
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
114
122
  # @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
123
  # @return [Object]
@@ -120,7 +128,7 @@ module Algolia
120
128
 
121
129
  # This method allow you to send requests to the Algolia REST API.
122
130
 
123
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
131
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
124
132
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
125
133
  # @param body [Object] Parameters to send with the custom request.
126
134
  # @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)
@@ -153,7 +161,7 @@ module Algolia
153
161
 
154
162
  # This method allow you to send requests to the Algolia REST API.
155
163
 
156
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
164
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
157
165
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
158
166
  # @param body [Object] Parameters to send with the custom request.
159
167
  # @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)
@@ -165,7 +173,7 @@ module Algolia
165
173
 
166
174
  # This method allow you to send requests to the Algolia REST API.
167
175
 
168
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
176
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
169
177
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
170
178
  # @param body [Object] Parameters to send with the custom request.
171
179
  # @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)
@@ -198,7 +206,7 @@ module Algolia
198
206
 
199
207
  # This method allow you to send requests to the Algolia REST API.
200
208
 
201
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
209
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
202
210
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
203
211
  # @param body [Object] Parameters to send with the custom request.
204
212
  # @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)
@@ -401,10 +409,10 @@ module Algolia
401
409
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Monitoring::LatencyResponse")
402
410
  end
403
411
 
404
- # Retrieves metrics related to your Algolia infrastructure, aggregated over a selected time window. Access to this API is available as part of the [Premium or Elevate plans](https://www.algolia.com/pricing). You must authenticate requests with the &#x60;x-algolia-application-id&#x60; and &#x60;x-algolia-api-key&#x60; headers (using the Monitoring API key).
412
+ # Retrieves metrics related to your Algolia infrastructure, aggregated over a selected time window. Access to this API is available as part of the [Premium or Elevate plans](https://www.algolia.com/pricing). You must authenticate requests with the `x-algolia-application-id` and `x-algolia-api-key` headers (using the Monitoring API key).
405
413
 
406
- # @param metric [Metric] Metric to report. For more information about the individual metrics, see the description of the API response. To include all metrics, use &#x60;*&#x60;. (required)
407
- # @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)
414
+ # @param metric [Metric] Metric to report. For more information about the individual metrics, see the description of the API response. To include all metrics, use `*`. (required)
415
+ # @param period [Period] Period over which to aggregate the metrics: - `minute`. Aggregate the last minute. 1 data point per 10 seconds. - `hour`. Aggregate the last hour. 1 data point per minute. - `day`. Aggregate the last day. 1 data point per 10 minutes. - `week`. Aggregate the last week. 1 data point per hour. - `month`. Aggregate the last month. 1 data point per day. (required)
408
416
  # @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
417
  # @return [Http::Response] the response
410
418
  def get_metrics_with_http_info(metric, period, request_options = {})
@@ -440,8 +448,8 @@ module Algolia
440
448
 
441
449
  # Retrieves metrics related to your Algolia infrastructure, aggregated over a selected time window. Access to this API is available as part of the [Premium or Elevate plans](https://www.algolia.com/pricing). You must authenticate requests with the `x-algolia-application-id` and `x-algolia-api-key` headers (using the Monitoring API key).
442
450
 
443
- # @param metric [Metric] Metric to report. For more information about the individual metrics, see the description of the API response. To include all metrics, use &#x60;*&#x60;. (required)
444
- # @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)
451
+ # @param metric [Metric] Metric to report. For more information about the individual metrics, see the description of the API response. To include all metrics, use `*`. (required)
452
+ # @param period [Period] Period over which to aggregate the metrics: - `minute`. Aggregate the last minute. 1 data point per 10 seconds. - `hour`. Aggregate the last hour. 1 data point per minute. - `day`. Aggregate the last day. 1 data point per 10 minutes. - `week`. Aggregate the last week. 1 data point per hour. - `month`. Aggregate the last month. 1 data point per day. (required)
445
453
  # @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)
446
454
  # @return [InfrastructureResponse]
447
455
  def get_metrics(metric, period, request_options = {})
@@ -492,7 +500,7 @@ module Algolia
492
500
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Hash<String, Hash>")
493
501
  end
494
502
 
495
- # Retrieves the servers that belong 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.
503
+ # Retrieves the servers that belong 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.
496
504
 
497
505
  # @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)
498
506
  # @return [Http::Response] the response
@@ -45,11 +45,19 @@ 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
  # This method allow you to send requests to the Algolia REST API.
51
59
 
52
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
60
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
53
61
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
54
62
  # @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)
55
63
  # @return [Http::Response] the response
@@ -81,7 +89,7 @@ module Algolia
81
89
 
82
90
  # This method allow you to send requests to the Algolia REST API.
83
91
 
84
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
92
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
85
93
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
86
94
  # @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)
87
95
  # @return [Object]
@@ -92,7 +100,7 @@ module Algolia
92
100
 
93
101
  # This method allow you to send requests to the Algolia REST API.
94
102
 
95
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
103
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
96
104
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
97
105
  # @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)
98
106
  # @return [Http::Response] the response
@@ -124,7 +132,7 @@ module Algolia
124
132
 
125
133
  # This method allow you to send requests to the Algolia REST API.
126
134
 
127
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
135
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
128
136
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
129
137
  # @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)
130
138
  # @return [Object]
@@ -135,7 +143,7 @@ module Algolia
135
143
 
136
144
  # This method allow you to send requests to the Algolia REST API.
137
145
 
138
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
146
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
139
147
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
140
148
  # @param body [Object] Parameters to send with the custom request.
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)
@@ -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 body [Object] Parameters to send with the custom request.
174
182
  # @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,7 +188,7 @@ module Algolia
180
188
 
181
189
  # This method allow you to send requests to the Algolia REST API.
182
190
 
183
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
191
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
184
192
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
185
193
  # @param body [Object] Parameters to send with the custom request.
186
194
  # @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)
@@ -213,7 +221,7 @@ module Algolia
213
221
 
214
222
  # This method allow you to send requests to the Algolia REST API.
215
223
 
216
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
224
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
217
225
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
218
226
  # @param body [Object] Parameters to send with the custom request.
219
227
  # @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)