algolia 3.0.0.beta.8 → 3.0.0.beta.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (586) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release.yml +2 -0
  3. data/CHANGELOG.md +8 -0
  4. data/Gemfile.lock +3 -30
  5. data/Rakefile +0 -2
  6. data/algolia.gemspec +1 -1
  7. data/lib/algolia/api/abtesting_client.rb +52 -37
  8. data/lib/algolia/api/analytics_client.rb +415 -116
  9. data/lib/algolia/api/ingestion_client.rb +462 -182
  10. data/lib/algolia/api/insights_client.rb +45 -28
  11. data/lib/algolia/api/monitoring_client.rb +50 -44
  12. data/lib/algolia/api/personalization_client.rb +57 -32
  13. data/lib/algolia/api/query_suggestions_client.rb +59 -40
  14. data/lib/algolia/api/recommend_client.rb +70 -43
  15. data/lib/algolia/api/search_client.rb +461 -264
  16. data/lib/algolia/api/usage_client.rb +48 -28
  17. data/lib/algolia/api_client.rb +25 -24
  18. data/lib/algolia/api_error.rb +8 -8
  19. data/lib/algolia/configuration.rb +17 -6
  20. data/lib/algolia/error.rb +2 -2
  21. data/lib/algolia/logger_helper.rb +4 -4
  22. data/lib/algolia/models/abtesting/ab_test.rb +62 -37
  23. data/lib/algolia/models/abtesting/ab_test_configuration.rb +35 -20
  24. data/lib/algolia/models/abtesting/ab_test_response.rb +35 -20
  25. data/lib/algolia/models/abtesting/ab_tests_variant.rb +38 -23
  26. data/lib/algolia/models/abtesting/ab_tests_variant_search_params.rb +41 -26
  27. data/lib/algolia/models/abtesting/add_ab_tests_request.rb +38 -23
  28. data/lib/algolia/models/abtesting/add_ab_tests_variant.rb +33 -24
  29. data/lib/algolia/models/abtesting/currency.rb +32 -20
  30. data/lib/algolia/models/abtesting/custom_search_params.rb +33 -18
  31. data/lib/algolia/models/abtesting/effect.rb +2 -3
  32. data/lib/algolia/models/abtesting/empty_search.rb +33 -18
  33. data/lib/algolia/models/abtesting/error_base.rb +24 -13
  34. data/lib/algolia/models/abtesting/filter_effects.rb +34 -19
  35. data/lib/algolia/models/abtesting/filter_effects_empty_search.rb +34 -19
  36. data/lib/algolia/models/abtesting/filter_effects_outliers.rb +34 -19
  37. data/lib/algolia/models/abtesting/list_ab_tests_response.rb +37 -22
  38. data/lib/algolia/models/abtesting/minimum_detectable_effect.rb +37 -22
  39. data/lib/algolia/models/abtesting/outliers.rb +29 -17
  40. data/lib/algolia/models/abtesting/status.rb +2 -3
  41. data/lib/algolia/models/abtesting/variant.rb +83 -51
  42. data/lib/algolia/models/analytics/click_positions_inner.rb +39 -24
  43. data/lib/algolia/models/analytics/currencies_value.rb +34 -19
  44. data/lib/algolia/models/analytics/daily_add_to_cart_rates.rb +42 -27
  45. data/lib/algolia/models/analytics/daily_average_clicks.rb +40 -25
  46. data/lib/algolia/models/analytics/daily_click_through_rates.rb +42 -27
  47. data/lib/algolia/models/analytics/daily_conversion_rates.rb +42 -27
  48. data/lib/algolia/models/analytics/daily_no_click_rates.rb +41 -26
  49. data/lib/algolia/models/analytics/daily_no_results_rates.rb +39 -24
  50. data/lib/algolia/models/analytics/daily_purchase_rates.rb +40 -25
  51. data/lib/algolia/models/analytics/daily_revenue.rb +34 -19
  52. data/lib/algolia/models/analytics/daily_searches.rb +34 -19
  53. data/lib/algolia/models/analytics/daily_searches_no_clicks.rb +37 -22
  54. data/lib/algolia/models/analytics/daily_searches_no_results.rb +37 -22
  55. data/lib/algolia/models/analytics/daily_users.rb +34 -19
  56. data/lib/algolia/models/analytics/direction.rb +2 -3
  57. data/lib/algolia/models/analytics/error_base.rb +24 -13
  58. data/lib/algolia/models/analytics/get_add_to_cart_rate_response.rb +42 -27
  59. data/lib/algolia/models/analytics/get_average_click_position_response.rb +40 -25
  60. data/lib/algolia/models/analytics/get_click_positions_response.rb +36 -21
  61. data/lib/algolia/models/analytics/get_click_through_rate_response.rb +42 -27
  62. data/lib/algolia/models/analytics/get_conversion_rate_response.rb +42 -27
  63. data/lib/algolia/models/analytics/get_no_click_rate_response.rb +41 -26
  64. data/lib/algolia/models/analytics/get_no_results_rate_response.rb +39 -24
  65. data/lib/algolia/models/analytics/get_purchase_rate_response.rb +40 -25
  66. data/lib/algolia/models/analytics/get_revenue.rb +34 -19
  67. data/lib/algolia/models/analytics/get_searches_count_response.rb +34 -19
  68. data/lib/algolia/models/analytics/get_searches_no_clicks_response.rb +33 -18
  69. data/lib/algolia/models/analytics/get_searches_no_results_response.rb +33 -18
  70. data/lib/algolia/models/analytics/get_status_response.rb +35 -20
  71. data/lib/algolia/models/analytics/get_top_countries_response.rb +33 -18
  72. data/lib/algolia/models/analytics/get_top_filter_attribute.rb +34 -19
  73. data/lib/algolia/models/analytics/get_top_filter_attributes_response.rb +33 -18
  74. data/lib/algolia/models/analytics/get_top_filter_for_attribute.rb +36 -21
  75. data/lib/algolia/models/analytics/get_top_filter_for_attribute_response.rb +33 -18
  76. data/lib/algolia/models/analytics/get_top_filters_no_results_response.rb +35 -20
  77. data/lib/algolia/models/analytics/get_top_filters_no_results_value.rb +35 -20
  78. data/lib/algolia/models/analytics/get_top_filters_no_results_values.rb +34 -19
  79. data/lib/algolia/models/analytics/get_top_hits_response.rb +34 -25
  80. data/lib/algolia/models/analytics/get_top_searches_response.rb +34 -25
  81. data/lib/algolia/models/analytics/get_users_count_response.rb +34 -19
  82. data/lib/algolia/models/analytics/operator.rb +2 -3
  83. data/lib/algolia/models/analytics/order_by.rb +2 -3
  84. data/lib/algolia/models/analytics/top_country.rb +34 -19
  85. data/lib/algolia/models/analytics/top_hit.rb +30 -18
  86. data/lib/algolia/models/analytics/top_hit_with_analytics.rb +50 -35
  87. data/lib/algolia/models/analytics/top_hit_with_revenue_analytics.rb +77 -50
  88. data/lib/algolia/models/analytics/top_hits_response.rb +33 -18
  89. data/lib/algolia/models/analytics/top_hits_response_with_analytics.rb +33 -18
  90. data/lib/algolia/models/analytics/top_hits_response_with_revenue_analytics.rb +33 -18
  91. data/lib/algolia/models/analytics/top_search.rb +35 -20
  92. data/lib/algolia/models/analytics/top_search_with_analytics.rb +76 -44
  93. data/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb +94 -58
  94. data/lib/algolia/models/analytics/top_searches_response.rb +33 -18
  95. data/lib/algolia/models/analytics/top_searches_response_with_analytics.rb +33 -18
  96. data/lib/algolia/models/analytics/top_searches_response_with_revenue_analytics.rb +33 -18
  97. data/lib/algolia/models/ingestion/action_type.rb +2 -3
  98. data/lib/algolia/models/ingestion/auth_algolia.rb +34 -19
  99. data/lib/algolia/models/ingestion/auth_algolia_insights.rb +34 -19
  100. data/lib/algolia/models/ingestion/auth_algolia_insights_partial.rb +34 -19
  101. data/lib/algolia/models/ingestion/auth_algolia_partial.rb +34 -19
  102. data/lib/algolia/models/ingestion/auth_api_key.rb +33 -18
  103. data/lib/algolia/models/ingestion/auth_api_key_partial.rb +33 -18
  104. data/lib/algolia/models/ingestion/auth_basic.rb +34 -19
  105. data/lib/algolia/models/ingestion/auth_basic_partial.rb +34 -19
  106. data/lib/algolia/models/ingestion/auth_google_service_account.rb +34 -19
  107. data/lib/algolia/models/ingestion/auth_google_service_account_partial.rb +34 -19
  108. data/lib/algolia/models/ingestion/auth_input.rb +37 -28
  109. data/lib/algolia/models/ingestion/auth_input_partial.rb +37 -28
  110. data/lib/algolia/models/ingestion/auth_o_auth.rb +36 -21
  111. data/lib/algolia/models/ingestion/auth_o_auth_partial.rb +36 -21
  112. data/lib/algolia/models/ingestion/authentication.rb +41 -26
  113. data/lib/algolia/models/ingestion/authentication_create.rb +38 -23
  114. data/lib/algolia/models/ingestion/authentication_create_response.rb +35 -20
  115. data/lib/algolia/models/ingestion/authentication_search.rb +33 -18
  116. data/lib/algolia/models/ingestion/authentication_sort_keys.rb +2 -3
  117. data/lib/algolia/models/ingestion/authentication_type.rb +2 -3
  118. data/lib/algolia/models/ingestion/authentication_update.rb +38 -23
  119. data/lib/algolia/models/ingestion/authentication_update_response.rb +35 -20
  120. data/lib/algolia/models/ingestion/big_commerce_channel.rb +34 -19
  121. data/lib/algolia/models/ingestion/big_commerce_metafield.rb +34 -19
  122. data/lib/algolia/models/ingestion/big_query_data_type.rb +2 -3
  123. data/lib/algolia/models/ingestion/commercetools_custom_fields.rb +39 -24
  124. data/lib/algolia/models/ingestion/delete_response.rb +33 -18
  125. data/lib/algolia/models/ingestion/destination.rb +39 -24
  126. data/lib/algolia/models/ingestion/destination_create.rb +36 -21
  127. data/lib/algolia/models/ingestion/destination_create_response.rb +35 -20
  128. data/lib/algolia/models/ingestion/destination_index_name.rb +35 -20
  129. data/lib/algolia/models/ingestion/destination_index_prefix.rb +33 -18
  130. data/lib/algolia/models/ingestion/destination_input.rb +33 -24
  131. data/lib/algolia/models/ingestion/destination_search.rb +33 -18
  132. data/lib/algolia/models/ingestion/destination_sort_keys.rb +2 -3
  133. data/lib/algolia/models/ingestion/destination_type.rb +2 -3
  134. data/lib/algolia/models/ingestion/destination_update.rb +36 -21
  135. data/lib/algolia/models/ingestion/destination_update_response.rb +35 -20
  136. data/lib/algolia/models/ingestion/docker_image_type.rb +2 -3
  137. data/lib/algolia/models/ingestion/docker_registry.rb +2 -3
  138. data/lib/algolia/models/ingestion/{on_demand_date_utils_input.rb → docker_streams_input.rb} +41 -49
  139. data/lib/algolia/models/ingestion/error_base.rb +24 -13
  140. data/lib/algolia/models/ingestion/event.rb +38 -26
  141. data/lib/algolia/models/ingestion/event_sort_keys.rb +2 -3
  142. data/lib/algolia/models/ingestion/event_status.rb +2 -3
  143. data/lib/algolia/models/ingestion/event_type.rb +2 -3
  144. data/lib/algolia/models/ingestion/list_authentications_response.rb +34 -19
  145. data/lib/algolia/models/ingestion/list_destinations_response.rb +34 -19
  146. data/lib/algolia/models/ingestion/list_events_response.rb +35 -20
  147. data/lib/algolia/models/ingestion/list_sources_response.rb +34 -19
  148. data/lib/algolia/models/ingestion/list_tasks_response.rb +34 -19
  149. data/lib/algolia/models/ingestion/list_transformations_response.rb +34 -19
  150. data/lib/algolia/models/ingestion/mapping_field_directive.rb +34 -19
  151. data/lib/algolia/models/ingestion/mapping_format_schema.rb +2 -3
  152. data/lib/algolia/models/ingestion/mapping_input.rb +34 -19
  153. data/lib/algolia/models/ingestion/mapping_kit_action.rb +36 -21
  154. data/lib/algolia/models/ingestion/mapping_type_csv.rb +2 -3
  155. data/lib/algolia/models/ingestion/method_type.rb +2 -3
  156. data/lib/algolia/models/ingestion/on_demand_trigger.rb +34 -19
  157. data/lib/algolia/models/ingestion/on_demand_trigger_input.rb +33 -18
  158. data/lib/algolia/models/ingestion/on_demand_trigger_type.rb +2 -3
  159. data/lib/algolia/models/ingestion/order_keys.rb +2 -3
  160. data/lib/algolia/models/ingestion/pagination.rb +45 -30
  161. data/lib/algolia/models/ingestion/platform.rb +2 -3
  162. data/lib/algolia/models/ingestion/platform_none.rb +2 -3
  163. data/lib/algolia/models/ingestion/platform_with_none.rb +33 -24
  164. data/lib/algolia/models/ingestion/record_type.rb +2 -3
  165. data/lib/algolia/models/ingestion/run.rb +59 -33
  166. data/lib/algolia/models/ingestion/run_list_response.rb +35 -20
  167. data/lib/algolia/models/ingestion/run_outcome.rb +2 -3
  168. data/lib/algolia/models/ingestion/run_progress.rb +34 -19
  169. data/lib/algolia/models/ingestion/run_reason_code.rb +2 -3
  170. data/lib/algolia/models/ingestion/run_response.rb +34 -19
  171. data/lib/algolia/models/ingestion/run_sort_keys.rb +2 -3
  172. data/lib/algolia/models/ingestion/run_status.rb +2 -3
  173. data/lib/algolia/models/ingestion/run_type.rb +2 -3
  174. data/lib/algolia/models/ingestion/schedule_trigger.rb +36 -21
  175. data/lib/algolia/models/ingestion/schedule_trigger_input.rb +34 -19
  176. data/lib/algolia/models/ingestion/schedule_trigger_type.rb +2 -3
  177. data/lib/algolia/models/ingestion/shopify_input.rb +34 -19
  178. data/lib/algolia/models/ingestion/shopify_market.rb +35 -20
  179. data/lib/algolia/models/ingestion/shopify_metafield.rb +35 -20
  180. data/lib/algolia/models/ingestion/sort_keys.rb +2 -3
  181. data/lib/algolia/models/ingestion/source.rb +35 -23
  182. data/lib/algolia/models/ingestion/source_big_commerce.rb +37 -22
  183. data/lib/algolia/models/ingestion/source_big_query.rb +39 -24
  184. data/lib/algolia/models/ingestion/source_commercetools.rb +38 -23
  185. data/lib/algolia/models/ingestion/source_create.rb +36 -21
  186. data/lib/algolia/models/ingestion/source_create_response.rb +35 -20
  187. data/lib/algolia/models/ingestion/source_csv.rb +43 -25
  188. data/lib/algolia/models/ingestion/source_docker.rb +37 -22
  189. data/lib/algolia/models/ingestion/source_ga4_big_query_export.rb +35 -20
  190. data/lib/algolia/models/ingestion/source_input.rb +39 -30
  191. data/lib/algolia/models/ingestion/source_json.rb +35 -20
  192. data/lib/algolia/models/ingestion/source_search.rb +33 -18
  193. data/lib/algolia/models/ingestion/source_shopify.rb +52 -29
  194. data/lib/algolia/models/ingestion/source_shopify_base.rb +33 -18
  195. data/lib/algolia/models/ingestion/source_sort_keys.rb +2 -3
  196. data/lib/algolia/models/ingestion/source_type.rb +2 -3
  197. data/lib/algolia/models/ingestion/source_update.rb +35 -20
  198. data/lib/algolia/models/ingestion/source_update_commercetools.rb +37 -22
  199. data/lib/algolia/models/ingestion/source_update_docker.rb +36 -21
  200. data/lib/algolia/models/ingestion/source_update_input.rb +38 -29
  201. data/lib/algolia/models/ingestion/source_update_response.rb +35 -20
  202. data/lib/algolia/models/ingestion/source_update_shopify.rb +48 -26
  203. data/lib/algolia/models/ingestion/source_watch_response.rb +36 -21
  204. data/lib/algolia/models/ingestion/{streaming_utils_input.rb → streaming_input.rb} +34 -19
  205. data/lib/algolia/models/ingestion/streaming_trigger.rb +33 -18
  206. data/lib/algolia/models/ingestion/streaming_trigger_type.rb +2 -3
  207. data/lib/algolia/models/ingestion/subscription_trigger.rb +33 -18
  208. data/lib/algolia/models/ingestion/subscription_trigger_type.rb +2 -3
  209. data/lib/algolia/models/ingestion/task.rb +55 -31
  210. data/lib/algolia/models/ingestion/task_create.rb +43 -28
  211. data/lib/algolia/models/ingestion/task_create_response.rb +34 -19
  212. data/lib/algolia/models/ingestion/task_create_trigger.rb +35 -26
  213. data/lib/algolia/models/ingestion/task_input.rb +34 -26
  214. data/lib/algolia/models/ingestion/task_search.rb +33 -18
  215. data/lib/algolia/models/ingestion/task_sort_keys.rb +2 -3
  216. data/lib/algolia/models/ingestion/task_update.rb +40 -25
  217. data/lib/algolia/models/ingestion/task_update_response.rb +34 -19
  218. data/lib/algolia/models/ingestion/transformation.rb +38 -25
  219. data/lib/algolia/models/ingestion/transformation_create.rb +35 -22
  220. data/lib/algolia/models/ingestion/transformation_create_response.rb +34 -19
  221. data/lib/algolia/models/ingestion/transformation_search.rb +33 -18
  222. data/lib/algolia/models/ingestion/transformation_try.rb +34 -19
  223. data/lib/algolia/models/ingestion/transformation_try_response.rb +34 -19
  224. data/lib/algolia/models/ingestion/transformation_try_response_error.rb +34 -19
  225. data/lib/algolia/models/ingestion/transformation_update_response.rb +34 -19
  226. data/lib/algolia/models/ingestion/trigger.rb +35 -26
  227. data/lib/algolia/models/ingestion/trigger_type.rb +2 -3
  228. data/lib/algolia/models/ingestion/trigger_update_input.rb +33 -18
  229. data/lib/algolia/models/ingestion/window.rb +30 -18
  230. data/lib/algolia/models/insights/add_to_cart_event.rb +2 -3
  231. data/lib/algolia/models/insights/added_to_cart_object_ids.rb +91 -46
  232. data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +99 -50
  233. data/lib/algolia/models/insights/click_event.rb +2 -3
  234. data/lib/algolia/models/insights/clicked_filters.rb +71 -38
  235. data/lib/algolia/models/insights/clicked_object_ids.rb +71 -38
  236. data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +93 -47
  237. data/lib/algolia/models/insights/conversion_event.rb +2 -3
  238. data/lib/algolia/models/insights/converted_filters.rb +71 -38
  239. data/lib/algolia/models/insights/converted_object_ids.rb +71 -38
  240. data/lib/algolia/models/insights/converted_object_ids_after_search.rb +78 -42
  241. data/lib/algolia/models/insights/discount.rb +33 -24
  242. data/lib/algolia/models/insights/error_base.rb +24 -13
  243. data/lib/algolia/models/insights/events_items.rb +43 -34
  244. data/lib/algolia/models/insights/events_response.rb +34 -19
  245. data/lib/algolia/models/insights/insights_events.rb +36 -21
  246. data/lib/algolia/models/insights/object_data.rb +35 -20
  247. data/lib/algolia/models/insights/object_data_after_search.rb +42 -24
  248. data/lib/algolia/models/insights/price.rb +33 -24
  249. data/lib/algolia/models/insights/purchase_event.rb +2 -3
  250. data/lib/algolia/models/insights/purchased_object_ids.rb +91 -46
  251. data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +91 -46
  252. data/lib/algolia/models/insights/value.rb +33 -24
  253. data/lib/algolia/models/insights/view_event.rb +2 -3
  254. data/lib/algolia/models/insights/viewed_filters.rb +71 -38
  255. data/lib/algolia/models/insights/viewed_object_ids.rb +71 -38
  256. data/lib/algolia/models/monitoring/error_base.rb +24 -13
  257. data/lib/algolia/models/monitoring/get_servers403_response.rb +33 -18
  258. data/lib/algolia/models/monitoring/incident.rb +30 -18
  259. data/lib/algolia/models/monitoring/incidents_inner.rb +34 -19
  260. data/lib/algolia/models/monitoring/incidents_response.rb +33 -18
  261. data/lib/algolia/models/monitoring/indexing_time_response.rb +33 -18
  262. data/lib/algolia/models/monitoring/indexing_time_response_metrics.rb +33 -18
  263. data/lib/algolia/models/monitoring/infrastructure_response.rb +33 -18
  264. data/lib/algolia/models/monitoring/infrastructure_response_metrics.rb +37 -22
  265. data/lib/algolia/models/monitoring/inventory_response.rb +33 -18
  266. data/lib/algolia/models/monitoring/latency_response.rb +33 -18
  267. data/lib/algolia/models/monitoring/latency_response_metrics.rb +33 -18
  268. data/lib/algolia/models/monitoring/metric.rb +2 -3
  269. data/lib/algolia/models/monitoring/period.rb +2 -3
  270. data/lib/algolia/models/monitoring/probes_metric.rb +34 -19
  271. data/lib/algolia/models/monitoring/region.rb +2 -3
  272. data/lib/algolia/models/monitoring/server.rb +35 -23
  273. data/lib/algolia/models/monitoring/server_status.rb +2 -3
  274. data/lib/algolia/models/monitoring/status.rb +2 -3
  275. data/lib/algolia/models/monitoring/status_response.rb +33 -18
  276. data/lib/algolia/models/monitoring/time_inner.rb +34 -19
  277. data/lib/algolia/models/monitoring/type.rb +2 -3
  278. data/lib/algolia/models/personalization/delete_user_profile_response.rb +34 -19
  279. data/lib/algolia/models/personalization/error_base.rb +24 -13
  280. data/lib/algolia/models/personalization/event_scoring.rb +35 -20
  281. data/lib/algolia/models/personalization/event_type.rb +2 -3
  282. data/lib/algolia/models/personalization/facet_scoring.rb +34 -19
  283. data/lib/algolia/models/personalization/get_user_token_response.rb +35 -20
  284. data/lib/algolia/models/personalization/personalization_strategy_params.rb +38 -23
  285. data/lib/algolia/models/personalization/set_personalization_strategy_response.rb +33 -18
  286. data/lib/algolia/models/query-suggestions/app_id.rb +29 -17
  287. data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_response.rb +22 -9
  288. data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_with_index.rb +22 -9
  289. data/lib/algolia/models/query-suggestions/base_response.rb +34 -19
  290. data/lib/algolia/models/query-suggestions/configuration.rb +44 -26
  291. data/lib/algolia/models/query-suggestions/configuration_response.rb +48 -30
  292. data/lib/algolia/models/query-suggestions/configuration_with_index.rb +46 -28
  293. data/lib/algolia/models/query-suggestions/error_base.rb +24 -13
  294. data/lib/algolia/models/query-suggestions/facet.rb +30 -18
  295. data/lib/algolia/models/query-suggestions/get_config_status200_response.rb +37 -22
  296. data/lib/algolia/models/query-suggestions/get_log_file200_response.rb +36 -21
  297. data/lib/algolia/models/query-suggestions/languages.rb +33 -24
  298. data/lib/algolia/models/query-suggestions/log_level.rb +2 -3
  299. data/lib/algolia/models/query-suggestions/query_suggestions_configuration.rb +34 -16
  300. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +34 -16
  301. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_with_index.rb +34 -16
  302. data/lib/algolia/models/query-suggestions/source_index.rb +49 -34
  303. data/lib/algolia/models/recommend/advanced_syntax_features.rb +2 -3
  304. data/lib/algolia/models/recommend/alternatives_as_exact.rb +2 -3
  305. data/lib/algolia/models/recommend/around_precision.rb +33 -24
  306. data/lib/algolia/models/recommend/around_precision_from_value_inner.rb +34 -19
  307. data/lib/algolia/models/recommend/around_radius.rb +33 -24
  308. data/lib/algolia/models/recommend/around_radius_all.rb +2 -3
  309. data/lib/algolia/models/recommend/auto_facet_filter.rb +34 -19
  310. data/lib/algolia/models/recommend/base_recommend_request.rb +42 -27
  311. data/lib/algolia/models/recommend/base_search_params.rb +110 -63
  312. data/lib/algolia/models/recommend/base_search_params_without_query.rb +106 -60
  313. data/lib/algolia/models/recommend/base_search_response.rb +76 -121
  314. data/lib/algolia/models/recommend/bought_together_query.rb +46 -31
  315. data/lib/algolia/models/recommend/condition.rb +35 -20
  316. data/lib/algolia/models/recommend/consequence.rb +39 -24
  317. data/lib/algolia/models/recommend/deleted_at_response.rb +34 -19
  318. data/lib/algolia/models/recommend/distinct.rb +33 -24
  319. data/lib/algolia/models/recommend/error_base.rb +24 -13
  320. data/lib/algolia/models/recommend/exact_on_single_word_query.rb +2 -3
  321. data/lib/algolia/models/recommend/exhaustive.rb +37 -22
  322. data/lib/algolia/models/recommend/facet_filters.rb +33 -24
  323. data/lib/algolia/models/recommend/facet_ordering.rb +34 -19
  324. data/lib/algolia/models/recommend/facets.rb +29 -17
  325. data/lib/algolia/models/recommend/facets_stats.rb +36 -21
  326. data/lib/algolia/models/recommend/fallback_params.rb +207 -118
  327. data/lib/algolia/models/recommend/fbt_model.rb +2 -3
  328. data/lib/algolia/models/recommend/frequently_bought_together.rb +34 -19
  329. data/lib/algolia/models/recommend/get_recommend_task_response.rb +33 -18
  330. data/lib/algolia/models/recommend/get_recommendations_params.rb +33 -18
  331. data/lib/algolia/models/recommend/get_recommendations_response.rb +33 -18
  332. data/lib/algolia/models/recommend/hide_consequence_object.rb +33 -18
  333. data/lib/algolia/models/recommend/highlight_result.rb +34 -25
  334. data/lib/algolia/models/recommend/highlight_result_option.rb +36 -21
  335. data/lib/algolia/models/recommend/ignore_plurals.rb +33 -24
  336. data/lib/algolia/models/recommend/index_settings_as_search_params.rb +134 -75
  337. data/lib/algolia/models/recommend/looking_similar.rb +35 -20
  338. data/lib/algolia/models/recommend/looking_similar_model.rb +2 -3
  339. data/lib/algolia/models/recommend/looking_similar_query.rb +47 -32
  340. data/lib/algolia/models/recommend/match_level.rb +2 -3
  341. data/lib/algolia/models/recommend/matched_geo_location.rb +35 -20
  342. data/lib/algolia/models/recommend/mode.rb +2 -3
  343. data/lib/algolia/models/recommend/numeric_filters.rb +33 -24
  344. data/lib/algolia/models/recommend/optional_filters.rb +33 -24
  345. data/lib/algolia/models/recommend/params_consequence.rb +35 -20
  346. data/lib/algolia/models/recommend/personalization.rb +35 -20
  347. data/lib/algolia/models/recommend/promote_consequence_object.rb +36 -21
  348. data/lib/algolia/models/recommend/query_type.rb +2 -3
  349. data/lib/algolia/models/recommend/ranking_info.rb +76 -48
  350. data/lib/algolia/models/recommend/re_ranking_apply_filter.rb +33 -24
  351. data/lib/algolia/models/recommend/recommend_hit.rb +32 -21
  352. data/lib/algolia/models/recommend/recommend_models.rb +2 -3
  353. data/lib/algolia/models/recommend/recommend_rule.rb +38 -23
  354. data/lib/algolia/models/recommend/recommend_rule_metadata.rb +33 -18
  355. data/lib/algolia/models/recommend/recommendations_hit.rb +33 -24
  356. data/lib/algolia/models/recommend/recommendations_hits.rb +33 -18
  357. data/lib/algolia/models/recommend/recommendations_request.rb +37 -28
  358. data/lib/algolia/models/recommend/recommendations_results.rb +159 -114
  359. data/lib/algolia/models/recommend/recommended_for_you.rb +34 -19
  360. data/lib/algolia/models/recommend/recommended_for_you_model.rb +2 -3
  361. data/lib/algolia/models/recommend/recommended_for_you_query.rb +46 -31
  362. data/lib/algolia/models/recommend/redirect.rb +29 -17
  363. data/lib/algolia/models/recommend/redirect_rule_index_metadata.rb +37 -22
  364. data/lib/algolia/models/recommend/redirect_rule_index_metadata_data.rb +33 -18
  365. data/lib/algolia/models/recommend/redirect_url.rb +33 -18
  366. data/lib/algolia/models/recommend/related_model.rb +2 -3
  367. data/lib/algolia/models/recommend/related_products.rb +35 -20
  368. data/lib/algolia/models/recommend/related_query.rb +47 -32
  369. data/lib/algolia/models/recommend/remove_stop_words.rb +33 -24
  370. data/lib/algolia/models/recommend/remove_words_if_no_results.rb +2 -3
  371. data/lib/algolia/models/recommend/rendering_content.rb +34 -19
  372. data/lib/algolia/models/recommend/search_pagination.rb +282 -0
  373. data/lib/algolia/models/recommend/search_params.rb +207 -118
  374. data/lib/algolia/models/recommend/search_params_object.rb +208 -119
  375. data/lib/algolia/models/recommend/search_params_query.rb +33 -18
  376. data/lib/algolia/models/recommend/search_recommend_rules_params.rb +48 -33
  377. data/lib/algolia/models/recommend/search_recommend_rules_response.rb +38 -23
  378. data/lib/algolia/models/recommend/semantic_search.rb +35 -20
  379. data/lib/algolia/models/recommend/snippet_result.rb +34 -25
  380. data/lib/algolia/models/recommend/snippet_result_option.rb +34 -19
  381. data/lib/algolia/models/recommend/sort_remaining_by.rb +2 -3
  382. data/lib/algolia/models/recommend/supported_language.rb +72 -5
  383. data/lib/algolia/models/recommend/tag_filters.rb +33 -24
  384. data/lib/algolia/models/recommend/task_status.rb +2 -3
  385. data/lib/algolia/models/recommend/trending_facet_hit.rb +38 -23
  386. data/lib/algolia/models/recommend/trending_facets.rb +37 -22
  387. data/lib/algolia/models/recommend/trending_facets_model.rb +2 -3
  388. data/lib/algolia/models/recommend/trending_facets_query.rb +49 -34
  389. data/lib/algolia/models/recommend/trending_items.rb +36 -21
  390. data/lib/algolia/models/recommend/trending_items_model.rb +2 -3
  391. data/lib/algolia/models/recommend/trending_items_query.rb +58 -34
  392. data/lib/algolia/models/recommend/typo_tolerance.rb +33 -24
  393. data/lib/algolia/models/recommend/typo_tolerance_enum.rb +2 -3
  394. data/lib/algolia/models/recommend/value.rb +31 -19
  395. data/lib/algolia/models/search/acl.rb +19 -5
  396. data/lib/algolia/models/search/action.rb +11 -4
  397. data/lib/algolia/models/search/add_api_key_response.rb +34 -19
  398. data/lib/algolia/models/search/advanced_syntax_features.rb +2 -3
  399. data/lib/algolia/models/search/alternatives_as_exact.rb +2 -3
  400. data/lib/algolia/models/search/anchoring.rb +2 -3
  401. data/lib/algolia/models/search/api_key.rb +46 -25
  402. data/lib/algolia/models/search/api_key_operation.rb +2 -3
  403. data/lib/algolia/models/search/around_precision.rb +33 -24
  404. data/lib/algolia/models/search/around_precision_from_value_inner.rb +34 -19
  405. data/lib/algolia/models/search/around_radius.rb +33 -24
  406. data/lib/algolia/models/search/around_radius_all.rb +2 -3
  407. data/lib/algolia/models/search/assign_user_id_params.rb +33 -18
  408. data/lib/algolia/models/search/attribute_to_update.rb +33 -24
  409. data/lib/algolia/models/search/automatic_facet_filter.rb +35 -20
  410. data/lib/algolia/models/search/automatic_facet_filters.rb +33 -24
  411. data/lib/algolia/models/search/base_get_api_key_response.rb +34 -19
  412. data/lib/algolia/models/search/base_index_settings.rb +71 -39
  413. data/lib/algolia/models/search/base_search_params.rb +110 -63
  414. data/lib/algolia/models/search/base_search_params_without_query.rb +106 -60
  415. data/lib/algolia/models/search/base_search_response.rb +76 -121
  416. data/lib/algolia/models/search/batch_assign_user_ids_params.rb +34 -19
  417. data/lib/algolia/models/search/batch_dictionary_entries_params.rb +34 -19
  418. data/lib/algolia/models/search/batch_dictionary_entries_request.rb +34 -19
  419. data/lib/algolia/models/search/batch_params.rb +33 -18
  420. data/lib/algolia/models/search/batch_request.rb +34 -19
  421. data/lib/algolia/models/search/batch_response.rb +34 -19
  422. data/lib/algolia/models/search/batch_write_params.rb +33 -18
  423. data/lib/algolia/models/{ingestion/schedule_date_utils_input.rb → search/browse_pagination.rb} +92 -45
  424. data/lib/algolia/models/search/browse_params.rb +33 -24
  425. data/lib/algolia/models/search/browse_params_object.rb +210 -120
  426. data/lib/algolia/models/search/browse_response.rb +158 -118
  427. data/lib/algolia/models/search/built_in_operation.rb +34 -19
  428. data/lib/algolia/models/search/built_in_operation_type.rb +2 -3
  429. data/lib/algolia/models/search/condition.rb +38 -23
  430. data/lib/algolia/models/search/consequence.rb +43 -28
  431. data/lib/algolia/models/search/consequence_hide.rb +33 -18
  432. data/lib/algolia/models/search/consequence_params.rb +213 -122
  433. data/lib/algolia/models/search/consequence_query.rb +33 -24
  434. data/lib/algolia/models/search/consequence_query_object.rb +34 -19
  435. data/lib/algolia/models/search/created_at_response.rb +33 -18
  436. data/lib/algolia/models/search/cursor.rb +29 -17
  437. data/lib/algolia/models/search/delete_api_key_response.rb +33 -18
  438. data/lib/algolia/models/search/delete_by_params.rb +50 -26
  439. data/lib/algolia/models/search/delete_source_response.rb +33 -18
  440. data/lib/algolia/models/search/deleted_at_response.rb +34 -19
  441. data/lib/algolia/models/search/dictionary_action.rb +2 -3
  442. data/lib/algolia/models/search/dictionary_entry.rb +29 -18
  443. data/lib/algolia/models/search/dictionary_entry_state.rb +2 -3
  444. data/lib/algolia/models/search/dictionary_language.rb +33 -18
  445. data/lib/algolia/models/search/dictionary_settings_params.rb +33 -18
  446. data/lib/algolia/models/search/dictionary_type.rb +2 -3
  447. data/lib/algolia/models/search/distinct.rb +33 -24
  448. data/lib/algolia/models/search/edit.rb +31 -19
  449. data/lib/algolia/models/search/edit_type.rb +2 -3
  450. data/lib/algolia/models/search/error_base.rb +24 -13
  451. data/lib/algolia/models/search/exact_on_single_word_query.rb +2 -3
  452. data/lib/algolia/models/search/exhaustive.rb +37 -22
  453. data/lib/algolia/models/search/facet_filters.rb +33 -24
  454. data/lib/algolia/models/search/facet_hits.rb +35 -20
  455. data/lib/algolia/models/search/facet_ordering.rb +34 -19
  456. data/lib/algolia/models/search/facets.rb +29 -17
  457. data/lib/algolia/models/search/facets_stats.rb +36 -21
  458. data/lib/algolia/models/search/fetched_index.rb +58 -30
  459. data/lib/algolia/models/search/get_api_key_response.rb +56 -30
  460. data/lib/algolia/models/search/get_dictionary_settings_response.rb +33 -18
  461. data/lib/algolia/models/search/get_logs_response.rb +33 -18
  462. data/lib/algolia/models/search/get_objects_params.rb +33 -18
  463. data/lib/algolia/models/search/get_objects_request.rb +35 -20
  464. data/lib/algolia/models/search/get_objects_response.rb +33 -18
  465. data/lib/algolia/models/search/get_task_response.rb +33 -18
  466. data/lib/algolia/models/search/get_top_user_ids_response.rb +33 -18
  467. data/lib/algolia/models/search/has_pending_mappings_response.rb +34 -19
  468. data/lib/algolia/models/search/highlight_result.rb +34 -25
  469. data/lib/algolia/models/search/highlight_result_option.rb +36 -21
  470. data/lib/algolia/models/search/hit.rb +24 -16
  471. data/lib/algolia/models/search/ignore_plurals.rb +33 -24
  472. data/lib/algolia/models/search/index_settings.rb +171 -97
  473. data/lib/algolia/models/search/index_settings_as_search_params.rb +134 -75
  474. data/lib/algolia/models/search/languages.rb +39 -24
  475. data/lib/algolia/models/search/list_api_keys_response.rb +33 -18
  476. data/lib/algolia/models/search/list_clusters_response.rb +33 -18
  477. data/lib/algolia/models/search/list_indices_response.rb +34 -19
  478. data/lib/algolia/models/search/list_user_ids_response.rb +33 -18
  479. data/lib/algolia/models/search/log.rb +70 -37
  480. data/lib/algolia/models/search/log_query.rb +31 -19
  481. data/lib/algolia/models/search/log_type.rb +2 -3
  482. data/lib/algolia/models/search/match_level.rb +2 -3
  483. data/lib/algolia/models/search/matched_geo_location.rb +35 -20
  484. data/lib/algolia/models/search/mode.rb +2 -3
  485. data/lib/algolia/models/search/multiple_batch_request.rb +35 -20
  486. data/lib/algolia/models/search/multiple_batch_response.rb +34 -19
  487. data/lib/algolia/models/search/numeric_filters.rb +33 -24
  488. data/lib/algolia/models/search/operation_index_params.rb +35 -20
  489. data/lib/algolia/models/search/operation_type.rb +2 -3
  490. data/lib/algolia/models/search/optional_filters.rb +33 -24
  491. data/lib/algolia/models/search/params.rb +32 -20
  492. data/lib/algolia/models/search/personalization.rb +35 -20
  493. data/lib/algolia/models/search/promote.rb +33 -24
  494. data/lib/algolia/models/search/promote_object_id.rb +34 -19
  495. data/lib/algolia/models/search/promote_object_ids.rb +36 -21
  496. data/lib/algolia/models/search/query_type.rb +2 -3
  497. data/lib/algolia/models/search/ranking_info.rb +76 -48
  498. data/lib/algolia/models/search/re_ranking_apply_filter.rb +33 -24
  499. data/lib/algolia/models/search/redirect.rb +29 -17
  500. data/lib/algolia/models/search/redirect_rule_index_metadata.rb +37 -22
  501. data/lib/algolia/models/search/redirect_rule_index_metadata_data.rb +33 -18
  502. data/lib/algolia/models/search/redirect_url.rb +33 -18
  503. data/lib/algolia/models/search/remove_stop_words.rb +33 -24
  504. data/lib/algolia/models/search/remove_user_id_response.rb +33 -18
  505. data/lib/algolia/models/search/remove_words_if_no_results.rb +2 -3
  506. data/lib/algolia/models/search/rendering_content.rb +34 -19
  507. data/lib/algolia/models/search/replace_all_objects_response.rb +35 -20
  508. data/lib/algolia/models/search/replace_source_response.rb +33 -18
  509. data/lib/algolia/models/search/rule.rb +37 -25
  510. data/lib/algolia/models/search/save_object_response.rb +35 -20
  511. data/lib/algolia/models/search/save_synonym_response.rb +35 -20
  512. data/lib/algolia/models/search/scope_type.rb +2 -3
  513. data/lib/algolia/models/search/search_dictionary_entries_params.rb +41 -26
  514. data/lib/algolia/models/search/search_dictionary_entries_response.rb +38 -23
  515. data/lib/algolia/models/search/search_for_facet_values_request.rb +37 -22
  516. data/lib/algolia/models/search/search_for_facet_values_response.rb +35 -20
  517. data/lib/algolia/models/search/search_for_facets.rb +218 -124
  518. data/lib/algolia/models/search/search_for_facets_options.rb +39 -24
  519. data/lib/algolia/models/search/search_for_hits.rb +214 -122
  520. data/lib/algolia/models/search/search_for_hits_options.rb +34 -19
  521. data/lib/algolia/models/search/search_hits.rb +26 -15
  522. data/lib/algolia/models/search/search_method_params.rb +34 -19
  523. data/lib/algolia/models/search/search_pagination.rb +282 -0
  524. data/lib/algolia/models/search/search_params.rb +33 -24
  525. data/lib/algolia/models/search/search_params_object.rb +208 -119
  526. data/lib/algolia/models/search/search_params_query.rb +33 -18
  527. data/lib/algolia/models/search/search_params_string.rb +33 -18
  528. data/lib/algolia/models/search/search_query.rb +33 -24
  529. data/lib/algolia/models/search/search_response.rb +154 -111
  530. data/lib/algolia/models/search/search_responses.rb +33 -18
  531. data/lib/algolia/models/search/search_result.rb +33 -24
  532. data/lib/algolia/models/search/search_rules_params.rb +45 -30
  533. data/lib/algolia/models/search/search_rules_response.rb +36 -21
  534. data/lib/algolia/models/search/search_strategy.rb +2 -3
  535. data/lib/algolia/models/search/search_synonyms_params.rb +41 -26
  536. data/lib/algolia/models/search/search_synonyms_response.rb +25 -14
  537. data/lib/algolia/models/search/search_type_default.rb +2 -3
  538. data/lib/algolia/models/search/search_type_facet.rb +2 -3
  539. data/lib/algolia/models/search/search_user_ids_params.rb +41 -26
  540. data/lib/algolia/models/search/search_user_ids_response.rb +42 -27
  541. data/lib/algolia/models/search/secured_api_key_restrictions.rb +38 -23
  542. data/lib/algolia/models/search/semantic_search.rb +35 -20
  543. data/lib/algolia/models/search/snippet_result.rb +34 -25
  544. data/lib/algolia/models/search/snippet_result_option.rb +34 -19
  545. data/lib/algolia/models/search/sort_remaining_by.rb +2 -3
  546. data/lib/algolia/models/search/source.rb +30 -18
  547. data/lib/algolia/models/search/standard_entries.rb +39 -24
  548. data/lib/algolia/models/search/supported_language.rb +72 -5
  549. data/lib/algolia/models/search/synonym_hit.rb +40 -25
  550. data/lib/algolia/models/search/synonym_type.rb +2 -3
  551. data/lib/algolia/models/search/tag_filters.rb +33 -24
  552. data/lib/algolia/models/search/task_status.rb +2 -3
  553. data/lib/algolia/models/search/time_range.rb +34 -19
  554. data/lib/algolia/models/search/typo_tolerance.rb +33 -24
  555. data/lib/algolia/models/search/typo_tolerance_enum.rb +2 -3
  556. data/lib/algolia/models/search/update_api_key_response.rb +34 -19
  557. data/lib/algolia/models/search/updated_at_response.rb +34 -19
  558. data/lib/algolia/models/search/updated_at_with_object_id_response.rb +35 -20
  559. data/lib/algolia/models/search/updated_rule_response.rb +35 -20
  560. data/lib/algolia/models/search/user_highlight_result.rb +34 -19
  561. data/lib/algolia/models/search/user_hit.rb +35 -23
  562. data/lib/algolia/models/search/user_id.rb +33 -21
  563. data/lib/algolia/models/search/value.rb +31 -19
  564. data/lib/algolia/models/usage/error_base.rb +24 -13
  565. data/lib/algolia/models/usage/get_usage200_response.rb +33 -18
  566. data/lib/algolia/models/usage/get_usage200_response_statistics_inner.rb +34 -19
  567. data/lib/algolia/models/usage/get_usage400_response.rb +33 -18
  568. data/lib/algolia/models/usage/get_usage400_response_error.rb +35 -20
  569. data/lib/algolia/models/usage/get_usage400_response_error_errors_inner.rb +36 -21
  570. data/lib/algolia/models/usage/granularity.rb +2 -3
  571. data/lib/algolia/models/usage/statistic.rb +88 -5
  572. data/lib/algolia/models/usage/statistic_value.rb +33 -24
  573. data/lib/algolia/transport/call_type.rb +1 -1
  574. data/lib/algolia/transport/echo_requester.rb +11 -2
  575. data/lib/algolia/transport/http/http_requester.rb +23 -15
  576. data/lib/algolia/transport/http/response.rb +8 -8
  577. data/lib/algolia/transport/request_options.rb +6 -4
  578. data/lib/algolia/transport/retry_outcome_type.rb +3 -3
  579. data/lib/algolia/transport/retry_strategy.rb +8 -7
  580. data/lib/algolia/transport/stateful_host.rb +6 -6
  581. data/lib/algolia/transport/transport.rb +27 -20
  582. data/lib/algolia/user_agent.rb +1 -1
  583. data/lib/algolia/version.rb +1 -1
  584. data/lib/algolia.rb +16 -16
  585. metadata +20 -13
  586. data/.rubocop.yml +0 -99
@@ -1,16 +1,16 @@
1
1
  # Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
- require 'openssl'
4
- require 'base64'
3
+ require "openssl"
4
+ require "base64"
5
5
 
6
6
  module Algolia
7
7
  class SearchClient
8
8
  attr_accessor :api_client
9
9
 
10
10
  def initialize(config = nil)
11
- raise '`config` is missing.' if config.nil?
12
- raise '`app_id` is missing.' if config.app_id.nil? || config.app_id == ''
13
- raise '`api_key` is missing.' if config.api_key.nil? || config.api_key == ''
11
+ raise "`config` is missing." if config.nil?
12
+ raise "`app_id` is missing." if config.app_id.nil? || config.app_id == ""
13
+ raise "`api_key` is missing." if config.api_key.nil? || config.api_key == ""
14
14
 
15
15
  @api_client = Algolia::ApiClient.new(config)
16
16
  end
@@ -20,11 +20,14 @@ module Algolia
20
20
  hosts << Transport::StatefulHost.new("#{app_id}-dsn.algolia.net", accept: CallType::READ)
21
21
  hosts << Transport::StatefulHost.new("#{app_id}.algolia.net", accept: CallType::WRITE)
22
22
 
23
- hosts += 1.upto(3).map do |i|
24
- Transport::StatefulHost.new("#{app_id}-#{i}.algolianet.com", accept: CallType::READ | CallType::WRITE)
25
- end.shuffle
23
+ hosts += 1
24
+ .upto(3)
25
+ .map do |i|
26
+ Transport::StatefulHost.new("#{app_id}-#{i}.algolianet.com", accept: CallType::READ | CallType::WRITE)
27
+ end
28
+ .shuffle
26
29
 
27
- config = Algolia::Configuration.new(app_id, api_key, hosts, 'Search', opts)
30
+ config = Algolia::Configuration.new(app_id, api_key, hosts, "Search", opts)
28
31
  create_with_config(config)
29
32
  end
30
33
 
@@ -45,7 +48,7 @@ module Algolia
45
48
  raise ArgumentError, "Parameter `api_key` is required when calling `add_api_key`."
46
49
  end
47
50
 
48
- path = '/1/keys'
51
+ path = "/1/keys"
49
52
  query_params = {}
50
53
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
51
54
  header_params = {}
@@ -54,7 +57,7 @@ module Algolia
54
57
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(api_key)
55
58
 
56
59
  new_options = request_options.merge(
57
- :operation => :'SearchClient.add_api_key',
60
+ :operation => :"SearchClient.add_api_key",
58
61
  :header_params => header_params,
59
62
  :query_params => query_params,
60
63
  :body => post_body,
@@ -73,7 +76,7 @@ module Algolia
73
76
  # @return [AddApiKeyResponse]
74
77
  def add_api_key(api_key, request_options = {})
75
78
  response = add_api_key_with_http_info(api_key, request_options)
76
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::AddApiKeyResponse')
79
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::AddApiKeyResponse")
77
80
  end
78
81
 
79
82
  # If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. To update _some_ attributes of an existing record, use the [&#x60;partial&#x60; operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or replace multiple records, use the [&#x60;batch&#x60; operation](#tag/Records/operation/batch).
@@ -99,8 +102,10 @@ module Algolia
99
102
  raise ArgumentError, "Parameter `body` is required when calling `add_or_update_object`."
100
103
  end
101
104
 
102
- path = '/1/indexes/{indexName}/{objectID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'objectID' + '}',
103
- Transport.encode_uri(object_id.to_s))
105
+ path = "/1/indexes/{indexName}/{objectID}".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s)).sub(
106
+ "{" + "objectID" + "}",
107
+ Transport.encode_uri(object_id.to_s)
108
+ )
104
109
  query_params = {}
105
110
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
106
111
  header_params = {}
@@ -109,7 +114,7 @@ module Algolia
109
114
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(body)
110
115
 
111
116
  new_options = request_options.merge(
112
- :operation => :'SearchClient.add_or_update_object',
117
+ :operation => :"SearchClient.add_or_update_object",
113
118
  :header_params => header_params,
114
119
  :query_params => query_params,
115
120
  :body => post_body,
@@ -130,7 +135,10 @@ module Algolia
130
135
  # @return [UpdatedAtWithObjectIdResponse]
131
136
  def add_or_update_object(index_name, object_id, body, request_options = {})
132
137
  response = add_or_update_object_with_http_info(index_name, object_id, body, request_options)
133
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtWithObjectIdResponse')
138
+ @api_client.deserialize(
139
+ response.body,
140
+ request_options[:debug_return_type] || "Search::UpdatedAtWithObjectIdResponse"
141
+ )
134
142
  end
135
143
 
136
144
  # Adds a source to the list of allowed sources.
@@ -146,7 +154,7 @@ module Algolia
146
154
  raise ArgumentError, "Parameter `source` is required when calling `append_source`."
147
155
  end
148
156
 
149
- path = '/1/security/sources/append'
157
+ path = "/1/security/sources/append"
150
158
  query_params = {}
151
159
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
152
160
  header_params = {}
@@ -155,7 +163,7 @@ module Algolia
155
163
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(source)
156
164
 
157
165
  new_options = request_options.merge(
158
- :operation => :'SearchClient.append_source',
166
+ :operation => :"SearchClient.append_source",
159
167
  :header_params => header_params,
160
168
  :query_params => query_params,
161
169
  :body => post_body,
@@ -174,7 +182,7 @@ module Algolia
174
182
  # @return [CreatedAtResponse]
175
183
  def append_source(source, request_options = {})
176
184
  response = append_source_with_http_info(source, request_options)
177
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::CreatedAtResponse')
185
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::CreatedAtResponse")
178
186
  end
179
187
 
180
188
  # Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID.
@@ -193,7 +201,10 @@ module Algolia
193
201
 
194
202
  pattern = /^[a-zA-Z0-9 \-*.]+$/
195
203
  if @api_client.config.client_side_validation && x_algolia_user_id !~ pattern
196
- raise ArgumentError, "invalid value for 'x_algolia_user_id' when calling SearchClient.assign_user_id, must conform to the pattern #{pattern}."
204
+ raise(
205
+ ArgumentError,
206
+ "invalid value for 'x_algolia_user_id' when calling SearchClient.assign_user_id, must conform to the pattern #{pattern}."
207
+ )
197
208
  end
198
209
 
199
210
  # verify the required parameter 'assign_user_id_params' is set
@@ -201,17 +212,17 @@ module Algolia
201
212
  raise ArgumentError, "Parameter `assign_user_id_params` is required when calling `assign_user_id`."
202
213
  end
203
214
 
204
- path = '/1/clusters/mapping'
215
+ path = "/1/clusters/mapping"
205
216
  query_params = {}
206
217
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
207
218
  header_params = {}
208
- header_params[:'X-Algolia-User-ID'] = x_algolia_user_id
219
+ header_params[:"X-Algolia-User-ID"] = x_algolia_user_id
209
220
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
210
221
 
211
222
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(assign_user_id_params)
212
223
 
213
224
  new_options = request_options.merge(
214
- :operation => :'SearchClient.assign_user_id',
225
+ :operation => :"SearchClient.assign_user_id",
215
226
  :header_params => header_params,
216
227
  :query_params => query_params,
217
228
  :body => post_body,
@@ -231,7 +242,7 @@ module Algolia
231
242
  # @return [CreatedAtResponse]
232
243
  def assign_user_id(x_algolia_user_id, assign_user_id_params, request_options = {})
233
244
  response = assign_user_id_with_http_info(x_algolia_user_id, assign_user_id_params, request_options)
234
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::CreatedAtResponse')
245
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::CreatedAtResponse")
235
246
  end
236
247
 
237
248
  # Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they&#39;re specified. - Actions are equivalent to the individual API requests of the same name.
@@ -250,7 +261,7 @@ module Algolia
250
261
  raise ArgumentError, "Parameter `batch_write_params` is required when calling `batch`."
251
262
  end
252
263
 
253
- path = '/1/indexes/{indexName}/batch'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
264
+ path = "/1/indexes/{indexName}/batch".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
254
265
  query_params = {}
255
266
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
256
267
  header_params = {}
@@ -259,7 +270,7 @@ module Algolia
259
270
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(batch_write_params)
260
271
 
261
272
  new_options = request_options.merge(
262
- :operation => :'SearchClient.batch',
273
+ :operation => :"SearchClient.batch",
263
274
  :header_params => header_params,
264
275
  :query_params => query_params,
265
276
  :body => post_body,
@@ -277,7 +288,7 @@ module Algolia
277
288
  # @return [BatchResponse]
278
289
  def batch(index_name, batch_write_params, request_options = {})
279
290
  response = batch_with_http_info(index_name, batch_write_params, request_options)
280
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::BatchResponse')
291
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::BatchResponse")
281
292
  end
282
293
 
283
294
  # Assigns multiple user IDs to a cluster. **You can&#39;t move users with this operation**.
@@ -296,25 +307,31 @@ module Algolia
296
307
 
297
308
  pattern = /^[a-zA-Z0-9 \-*.]+$/
298
309
  if @api_client.config.client_side_validation && x_algolia_user_id !~ pattern
299
- raise ArgumentError, "invalid value for 'x_algolia_user_id' when calling SearchClient.batch_assign_user_ids, must conform to the pattern #{pattern}."
310
+ raise(
311
+ ArgumentError,
312
+ "invalid value for 'x_algolia_user_id' when calling SearchClient.batch_assign_user_ids, must conform to the pattern #{pattern}."
313
+ )
300
314
  end
301
315
 
302
316
  # verify the required parameter 'batch_assign_user_ids_params' is set
303
317
  if @api_client.config.client_side_validation && batch_assign_user_ids_params.nil?
304
- raise ArgumentError, "Parameter `batch_assign_user_ids_params` is required when calling `batch_assign_user_ids`."
318
+ raise(
319
+ ArgumentError,
320
+ "Parameter `batch_assign_user_ids_params` is required when calling `batch_assign_user_ids`."
321
+ )
305
322
  end
306
323
 
307
- path = '/1/clusters/mapping/batch'
324
+ path = "/1/clusters/mapping/batch"
308
325
  query_params = {}
309
326
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
310
327
  header_params = {}
311
- header_params[:'X-Algolia-User-ID'] = x_algolia_user_id
328
+ header_params[:"X-Algolia-User-ID"] = x_algolia_user_id
312
329
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
313
330
 
314
331
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(batch_assign_user_ids_params)
315
332
 
316
333
  new_options = request_options.merge(
317
- :operation => :'SearchClient.batch_assign_user_ids',
334
+ :operation => :"SearchClient.batch_assign_user_ids",
318
335
  :header_params => header_params,
319
336
  :query_params => query_params,
320
337
  :body => post_body,
@@ -334,7 +351,7 @@ module Algolia
334
351
  # @return [CreatedAtResponse]
335
352
  def batch_assign_user_ids(x_algolia_user_id, batch_assign_user_ids_params, request_options = {})
336
353
  response = batch_assign_user_ids_with_http_info(x_algolia_user_id, batch_assign_user_ids_params, request_options)
337
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::CreatedAtResponse')
354
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::CreatedAtResponse")
338
355
  end
339
356
 
340
357
  # Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
@@ -352,10 +369,16 @@ module Algolia
352
369
  end
353
370
  # verify the required parameter 'batch_dictionary_entries_params' is set
354
371
  if @api_client.config.client_side_validation && batch_dictionary_entries_params.nil?
355
- raise ArgumentError, "Parameter `batch_dictionary_entries_params` is required when calling `batch_dictionary_entries`."
372
+ raise(
373
+ ArgumentError,
374
+ "Parameter `batch_dictionary_entries_params` is required when calling `batch_dictionary_entries`."
375
+ )
356
376
  end
357
377
 
358
- path = '/1/dictionaries/{dictionaryName}/batch'.sub('{' + 'dictionaryName' + '}', Transport.encode_uri(dictionary_name.to_s))
378
+ path = "/1/dictionaries/{dictionaryName}/batch".sub(
379
+ "{" + "dictionaryName" + "}",
380
+ Transport.encode_uri(dictionary_name.to_s)
381
+ )
359
382
  query_params = {}
360
383
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
361
384
  header_params = {}
@@ -364,7 +387,7 @@ module Algolia
364
387
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(batch_dictionary_entries_params)
365
388
 
366
389
  new_options = request_options.merge(
367
- :operation => :'SearchClient.batch_dictionary_entries',
390
+ :operation => :"SearchClient.batch_dictionary_entries",
368
391
  :header_params => header_params,
369
392
  :query_params => query_params,
370
393
  :body => post_body,
@@ -383,11 +406,15 @@ module Algolia
383
406
  # @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)
384
407
  # @return [UpdatedAtResponse]
385
408
  def batch_dictionary_entries(dictionary_name, batch_dictionary_entries_params, request_options = {})
386
- response = batch_dictionary_entries_with_http_info(dictionary_name, batch_dictionary_entries_params, request_options)
387
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
409
+ response = batch_dictionary_entries_with_http_info(
410
+ dictionary_name,
411
+ batch_dictionary_entries_params,
412
+ request_options
413
+ )
414
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::UpdatedAtResponse")
388
415
  end
389
416
 
390
- # Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn&#39;t collect data when using &#x60;browse&#x60;. - Records are ranked by attributes and custom ranking. - Deduplication (&#x60;distinct&#x60;) is turned off. - There&#39;s no ranking for: typo-tolerance, number of matched words, proximity, geo distance.
417
+ # Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn&#39;t collect data when using &#x60;browse&#x60;. - Records are ranked by attributes and custom ranking. - There&#39;s no ranking for: typo-tolerance, number of matched words, proximity, geo distance. Browse requests automatically apply these settings: - &#x60;advancedSyntax&#x60;: &#x60;false&#x60; - &#x60;attributesToHighlight&#x60;: &#x60;[]&#x60; - &#x60;attributesToSnippet&#x60;: &#x60;[]&#x60; - &#x60;distinct&#x60;: &#x60;false&#x60; - &#x60;enablePersonalization&#x60;: &#x60;false&#x60; - &#x60;enableRules&#x60;: &#x60;false&#x60; - &#x60;facets&#x60;: &#x60;[]&#x60; - &#x60;getRankingInfo&#x60;: &#x60;false&#x60; - &#x60;ignorePlurals&#x60;: &#x60;false&#x60; - &#x60;optionalFilters&#x60;: &#x60;[]&#x60; - &#x60;typoTolerance&#x60;: &#x60;true&#x60; or &#x60;false&#x60; (&#x60;min&#x60; and &#x60;strict&#x60; is evaluated to &#x60;true&#x60;) If you send these parameters with your browse requests, they&#39;ll be ignored.
391
418
  #
392
419
  # Required API Key ACLs:
393
420
  # - browse
@@ -401,7 +428,7 @@ module Algolia
401
428
  raise ArgumentError, "Parameter `index_name` is required when calling `browse`."
402
429
  end
403
430
 
404
- path = '/1/indexes/{indexName}/browse'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
431
+ path = "/1/indexes/{indexName}/browse".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
405
432
  query_params = {}
406
433
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
407
434
  header_params = {}
@@ -410,7 +437,7 @@ module Algolia
410
437
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(browse_params)
411
438
 
412
439
  new_options = request_options.merge(
413
- :operation => :'SearchClient.browse',
440
+ :operation => :"SearchClient.browse",
414
441
  :header_params => header_params,
415
442
  :query_params => query_params,
416
443
  :body => post_body,
@@ -420,7 +447,7 @@ module Algolia
420
447
  @api_client.call_api(:POST, path, new_options)
421
448
  end
422
449
 
423
- # Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn't collect data when using `browse`. - Records are ranked by attributes and custom ranking. - Deduplication (`distinct`) is turned off. - There's no ranking for: typo-tolerance, number of matched words, proximity, geo distance.
450
+ # Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn't collect data when using `browse`. - Records are ranked by attributes and custom ranking. - There's no ranking for: typo-tolerance, number of matched words, proximity, geo distance. Browse requests automatically apply these settings: - `advancedSyntax`: `false` - `attributesToHighlight`: `[]` - `attributesToSnippet`: `[]` - `distinct`: `false` - `enablePersonalization`: `false` - `enableRules`: `false` - `facets`: `[]` - `getRankingInfo`: `false` - `ignorePlurals`: `false` - `optionalFilters`: `[]` - `typoTolerance`: `true` or `false` (`min` and `strict` is evaluated to `true`) If you send these parameters with your browse requests, they'll be ignored.
424
451
  #
425
452
  # Required API Key ACLs:
426
453
  # - browse
@@ -430,7 +457,7 @@ module Algolia
430
457
  # @return [BrowseResponse]
431
458
  def browse(index_name, browse_params = nil, request_options = {})
432
459
  response = browse_with_http_info(index_name, browse_params, request_options)
433
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::BrowseResponse')
460
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::BrowseResponse")
434
461
  end
435
462
 
436
463
  # Deletes only the records from an index while keeping settings, synonyms, and rules.
@@ -446,7 +473,7 @@ module Algolia
446
473
  raise ArgumentError, "Parameter `index_name` is required when calling `clear_objects`."
447
474
  end
448
475
 
449
- path = '/1/indexes/{indexName}/clear'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
476
+ path = "/1/indexes/{indexName}/clear".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
450
477
  query_params = {}
451
478
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
452
479
  header_params = {}
@@ -455,7 +482,7 @@ module Algolia
455
482
  post_body = request_options[:debug_body]
456
483
 
457
484
  new_options = request_options.merge(
458
- :operation => :'SearchClient.clear_objects',
485
+ :operation => :"SearchClient.clear_objects",
459
486
  :header_params => header_params,
460
487
  :query_params => query_params,
461
488
  :body => post_body,
@@ -474,7 +501,7 @@ module Algolia
474
501
  # @return [UpdatedAtResponse]
475
502
  def clear_objects(index_name, request_options = {})
476
503
  response = clear_objects_with_http_info(index_name, request_options)
477
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
504
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::UpdatedAtResponse")
478
505
  end
479
506
 
480
507
  # Deletes all rules from the index.
@@ -491,7 +518,7 @@ module Algolia
491
518
  raise ArgumentError, "Parameter `index_name` is required when calling `clear_rules`."
492
519
  end
493
520
 
494
- path = '/1/indexes/{indexName}/rules/clear'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
521
+ path = "/1/indexes/{indexName}/rules/clear".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
495
522
  query_params = {}
496
523
  query_params[:forwardToReplicas] = forward_to_replicas unless forward_to_replicas.nil?
497
524
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -501,7 +528,7 @@ module Algolia
501
528
  post_body = request_options[:debug_body]
502
529
 
503
530
  new_options = request_options.merge(
504
- :operation => :'SearchClient.clear_rules',
531
+ :operation => :"SearchClient.clear_rules",
505
532
  :header_params => header_params,
506
533
  :query_params => query_params,
507
534
  :body => post_body,
@@ -521,7 +548,7 @@ module Algolia
521
548
  # @return [UpdatedAtResponse]
522
549
  def clear_rules(index_name, forward_to_replicas = nil, request_options = {})
523
550
  response = clear_rules_with_http_info(index_name, forward_to_replicas, request_options)
524
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
551
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::UpdatedAtResponse")
525
552
  end
526
553
 
527
554
  # Deletes all synonyms from the index.
@@ -538,7 +565,7 @@ module Algolia
538
565
  raise ArgumentError, "Parameter `index_name` is required when calling `clear_synonyms`."
539
566
  end
540
567
 
541
- path = '/1/indexes/{indexName}/synonyms/clear'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
568
+ path = "/1/indexes/{indexName}/synonyms/clear".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
542
569
  query_params = {}
543
570
  query_params[:forwardToReplicas] = forward_to_replicas unless forward_to_replicas.nil?
544
571
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -548,7 +575,7 @@ module Algolia
548
575
  post_body = request_options[:debug_body]
549
576
 
550
577
  new_options = request_options.merge(
551
- :operation => :'SearchClient.clear_synonyms',
578
+ :operation => :"SearchClient.clear_synonyms",
552
579
  :header_params => header_params,
553
580
  :query_params => query_params,
554
581
  :body => post_body,
@@ -568,7 +595,7 @@ module Algolia
568
595
  # @return [UpdatedAtResponse]
569
596
  def clear_synonyms(index_name, forward_to_replicas = nil, request_options = {})
570
597
  response = clear_synonyms_with_http_info(index_name, forward_to_replicas, request_options)
571
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
598
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::UpdatedAtResponse")
572
599
  end
573
600
 
574
601
  # This method allow you to send requests to the Algolia REST API.
@@ -583,7 +610,7 @@ module Algolia
583
610
  raise ArgumentError, "Parameter `path` is required when calling `custom_delete`."
584
611
  end
585
612
 
586
- path = '/{path}'.sub('{' + 'path' + '}', path.to_s)
613
+ path = "/{path}".sub("{" + "path" + "}", path.to_s)
587
614
  query_params = {}
588
615
  query_params = query_params.merge(parameters) unless parameters.nil?
589
616
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -593,7 +620,7 @@ module Algolia
593
620
  post_body = request_options[:debug_body]
594
621
 
595
622
  new_options = request_options.merge(
596
- :operation => :'SearchClient.custom_delete',
623
+ :operation => :"SearchClient.custom_delete",
597
624
  :header_params => header_params,
598
625
  :query_params => query_params,
599
626
  :body => post_body,
@@ -611,7 +638,7 @@ module Algolia
611
638
  # @return [Object]
612
639
  def custom_delete(path, parameters = nil, request_options = {})
613
640
  response = custom_delete_with_http_info(path, parameters, request_options)
614
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
641
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Object")
615
642
  end
616
643
 
617
644
  # This method allow you to send requests to the Algolia REST API.
@@ -626,7 +653,7 @@ module Algolia
626
653
  raise ArgumentError, "Parameter `path` is required when calling `custom_get`."
627
654
  end
628
655
 
629
- path = '/{path}'.sub('{' + 'path' + '}', path.to_s)
656
+ path = "/{path}".sub("{" + "path" + "}", path.to_s)
630
657
  query_params = {}
631
658
  query_params = query_params.merge(parameters) unless parameters.nil?
632
659
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -636,7 +663,7 @@ module Algolia
636
663
  post_body = request_options[:debug_body]
637
664
 
638
665
  new_options = request_options.merge(
639
- :operation => :'SearchClient.custom_get',
666
+ :operation => :"SearchClient.custom_get",
640
667
  :header_params => header_params,
641
668
  :query_params => query_params,
642
669
  :body => post_body,
@@ -654,7 +681,7 @@ module Algolia
654
681
  # @return [Object]
655
682
  def custom_get(path, parameters = nil, request_options = {})
656
683
  response = custom_get_with_http_info(path, parameters, request_options)
657
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
684
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Object")
658
685
  end
659
686
 
660
687
  # This method allow you to send requests to the Algolia REST API.
@@ -670,7 +697,7 @@ module Algolia
670
697
  raise ArgumentError, "Parameter `path` is required when calling `custom_post`."
671
698
  end
672
699
 
673
- path = '/{path}'.sub('{' + 'path' + '}', path.to_s)
700
+ path = "/{path}".sub("{" + "path" + "}", path.to_s)
674
701
  query_params = {}
675
702
  query_params = query_params.merge(parameters) unless parameters.nil?
676
703
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -680,7 +707,7 @@ module Algolia
680
707
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(body)
681
708
 
682
709
  new_options = request_options.merge(
683
- :operation => :'SearchClient.custom_post',
710
+ :operation => :"SearchClient.custom_post",
684
711
  :header_params => header_params,
685
712
  :query_params => query_params,
686
713
  :body => post_body,
@@ -699,7 +726,7 @@ module Algolia
699
726
  # @return [Object]
700
727
  def custom_post(path, parameters = nil, body = nil, request_options = {})
701
728
  response = custom_post_with_http_info(path, parameters, body, request_options)
702
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
729
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Object")
703
730
  end
704
731
 
705
732
  # This method allow you to send requests to the Algolia REST API.
@@ -715,7 +742,7 @@ module Algolia
715
742
  raise ArgumentError, "Parameter `path` is required when calling `custom_put`."
716
743
  end
717
744
 
718
- path = '/{path}'.sub('{' + 'path' + '}', path.to_s)
745
+ path = "/{path}".sub("{" + "path" + "}", path.to_s)
719
746
  query_params = {}
720
747
  query_params = query_params.merge(parameters) unless parameters.nil?
721
748
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -725,7 +752,7 @@ module Algolia
725
752
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(body)
726
753
 
727
754
  new_options = request_options.merge(
728
- :operation => :'SearchClient.custom_put',
755
+ :operation => :"SearchClient.custom_put",
729
756
  :header_params => header_params,
730
757
  :query_params => query_params,
731
758
  :body => post_body,
@@ -744,7 +771,7 @@ module Algolia
744
771
  # @return [Object]
745
772
  def custom_put(path, parameters = nil, body = nil, request_options = {})
746
773
  response = custom_put_with_http_info(path, parameters, body, request_options)
747
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
774
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Object")
748
775
  end
749
776
 
750
777
  # Deletes the API key.
@@ -760,7 +787,7 @@ module Algolia
760
787
  raise ArgumentError, "Parameter `key` is required when calling `delete_api_key`."
761
788
  end
762
789
 
763
- path = '/1/keys/{key}'.sub('{' + 'key' + '}', Transport.encode_uri(key.to_s))
790
+ path = "/1/keys/{key}".sub("{" + "key" + "}", Transport.encode_uri(key.to_s))
764
791
  query_params = {}
765
792
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
766
793
  header_params = {}
@@ -769,7 +796,7 @@ module Algolia
769
796
  post_body = request_options[:debug_body]
770
797
 
771
798
  new_options = request_options.merge(
772
- :operation => :'SearchClient.delete_api_key',
799
+ :operation => :"SearchClient.delete_api_key",
773
800
  :header_params => header_params,
774
801
  :query_params => query_params,
775
802
  :body => post_body,
@@ -788,7 +815,7 @@ module Algolia
788
815
  # @return [DeleteApiKeyResponse]
789
816
  def delete_api_key(key, request_options = {})
790
817
  response = delete_api_key_with_http_info(key, request_options)
791
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeleteApiKeyResponse')
818
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::DeleteApiKeyResponse")
792
819
  end
793
820
 
794
821
  # This operation doesn&#39;t accept empty queries or filters. It&#39;s more efficient to get a list of object IDs with the [&#x60;browse&#x60; operation](#tag/Search/operation/browse), and then delete the records using the [&#x60;batch&#x60; operation](tag/Records/operation/batch).
@@ -809,7 +836,7 @@ module Algolia
809
836
  raise ArgumentError, "Parameter `delete_by_params` is required when calling `delete_by`."
810
837
  end
811
838
 
812
- path = '/1/indexes/{indexName}/deleteByQuery'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
839
+ path = "/1/indexes/{indexName}/deleteByQuery".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
813
840
  query_params = {}
814
841
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
815
842
  header_params = {}
@@ -818,7 +845,7 @@ module Algolia
818
845
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(delete_by_params)
819
846
 
820
847
  new_options = request_options.merge(
821
- :operation => :'SearchClient.delete_by',
848
+ :operation => :"SearchClient.delete_by",
822
849
  :header_params => header_params,
823
850
  :query_params => query_params,
824
851
  :body => post_body,
@@ -838,7 +865,7 @@ module Algolia
838
865
  # @return [DeletedAtResponse]
839
866
  def delete_by(index_name, delete_by_params, request_options = {})
840
867
  response = delete_by_with_http_info(index_name, delete_by_params, request_options)
841
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeletedAtResponse')
868
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::DeletedAtResponse")
842
869
  end
843
870
 
844
871
  # Deletes an index and all its settings. - Deleting an index doesn&#39;t delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/).
@@ -854,7 +881,7 @@ module Algolia
854
881
  raise ArgumentError, "Parameter `index_name` is required when calling `delete_index`."
855
882
  end
856
883
 
857
- path = '/1/indexes/{indexName}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
884
+ path = "/1/indexes/{indexName}".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
858
885
  query_params = {}
859
886
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
860
887
  header_params = {}
@@ -863,7 +890,7 @@ module Algolia
863
890
  post_body = request_options[:debug_body]
864
891
 
865
892
  new_options = request_options.merge(
866
- :operation => :'SearchClient.delete_index',
893
+ :operation => :"SearchClient.delete_index",
867
894
  :header_params => header_params,
868
895
  :query_params => query_params,
869
896
  :body => post_body,
@@ -882,7 +909,7 @@ module Algolia
882
909
  # @return [DeletedAtResponse]
883
910
  def delete_index(index_name, request_options = {})
884
911
  response = delete_index_with_http_info(index_name, request_options)
885
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeletedAtResponse')
912
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::DeletedAtResponse")
886
913
  end
887
914
 
888
915
  # Deletes a record by its object ID. To delete more than one record, use the [&#x60;batch&#x60; operation](#tag/Records/operation/batch). To delete records matching a query, use the [&#x60;deleteByQuery&#x60; operation](#tag/Records/operation/deleteBy).
@@ -903,8 +930,10 @@ module Algolia
903
930
  raise ArgumentError, "Parameter `object_id` is required when calling `delete_object`."
904
931
  end
905
932
 
906
- path = '/1/indexes/{indexName}/{objectID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'objectID' + '}',
907
- Transport.encode_uri(object_id.to_s))
933
+ path = "/1/indexes/{indexName}/{objectID}".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s)).sub(
934
+ "{" + "objectID" + "}",
935
+ Transport.encode_uri(object_id.to_s)
936
+ )
908
937
  query_params = {}
909
938
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
910
939
  header_params = {}
@@ -913,7 +942,7 @@ module Algolia
913
942
  post_body = request_options[:debug_body]
914
943
 
915
944
  new_options = request_options.merge(
916
- :operation => :'SearchClient.delete_object',
945
+ :operation => :"SearchClient.delete_object",
917
946
  :header_params => header_params,
918
947
  :query_params => query_params,
919
948
  :body => post_body,
@@ -933,7 +962,7 @@ module Algolia
933
962
  # @return [DeletedAtResponse]
934
963
  def delete_object(index_name, object_id, request_options = {})
935
964
  response = delete_object_with_http_info(index_name, object_id, request_options)
936
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeletedAtResponse')
965
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::DeletedAtResponse")
937
966
  end
938
967
 
939
968
  # Deletes a rule by its ID. To find the object ID for rules, use the [&#x60;search&#x60; operation](#tag/Rules/operation/searchRules).
@@ -955,8 +984,9 @@ module Algolia
955
984
  raise ArgumentError, "Parameter `object_id` is required when calling `delete_rule`."
956
985
  end
957
986
 
958
- path = '/1/indexes/{indexName}/rules/{objectID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'objectID' + '}',
959
- Transport.encode_uri(object_id.to_s))
987
+ path = "/1/indexes/{indexName}/rules/{objectID}"
988
+ .sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
989
+ .sub("{" + "objectID" + "}", Transport.encode_uri(object_id.to_s))
960
990
  query_params = {}
961
991
  query_params[:forwardToReplicas] = forward_to_replicas unless forward_to_replicas.nil?
962
992
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -966,7 +996,7 @@ module Algolia
966
996
  post_body = request_options[:debug_body]
967
997
 
968
998
  new_options = request_options.merge(
969
- :operation => :'SearchClient.delete_rule',
999
+ :operation => :"SearchClient.delete_rule",
970
1000
  :header_params => header_params,
971
1001
  :query_params => query_params,
972
1002
  :body => post_body,
@@ -987,7 +1017,7 @@ module Algolia
987
1017
  # @return [UpdatedAtResponse]
988
1018
  def delete_rule(index_name, object_id, forward_to_replicas = nil, request_options = {})
989
1019
  response = delete_rule_with_http_info(index_name, object_id, forward_to_replicas, request_options)
990
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
1020
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::UpdatedAtResponse")
991
1021
  end
992
1022
 
993
1023
  # Deletes a source from the list of allowed sources.
@@ -1003,7 +1033,7 @@ module Algolia
1003
1033
  raise ArgumentError, "Parameter `source` is required when calling `delete_source`."
1004
1034
  end
1005
1035
 
1006
- path = '/1/security/sources/{source}'.sub('{' + 'source' + '}', Transport.encode_uri(source.to_s))
1036
+ path = "/1/security/sources/{source}".sub("{" + "source" + "}", Transport.encode_uri(source.to_s))
1007
1037
  query_params = {}
1008
1038
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1009
1039
  header_params = {}
@@ -1012,7 +1042,7 @@ module Algolia
1012
1042
  post_body = request_options[:debug_body]
1013
1043
 
1014
1044
  new_options = request_options.merge(
1015
- :operation => :'SearchClient.delete_source',
1045
+ :operation => :"SearchClient.delete_source",
1016
1046
  :header_params => header_params,
1017
1047
  :query_params => query_params,
1018
1048
  :body => post_body,
@@ -1031,7 +1061,7 @@ module Algolia
1031
1061
  # @return [DeleteSourceResponse]
1032
1062
  def delete_source(source, request_options = {})
1033
1063
  response = delete_source_with_http_info(source, request_options)
1034
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeleteSourceResponse')
1064
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::DeleteSourceResponse")
1035
1065
  end
1036
1066
 
1037
1067
  # Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [&#x60;search&#x60; operation](#tag/Synonyms/operation/searchSynonyms).
@@ -1053,8 +1083,9 @@ module Algolia
1053
1083
  raise ArgumentError, "Parameter `object_id` is required when calling `delete_synonym`."
1054
1084
  end
1055
1085
 
1056
- path = '/1/indexes/{indexName}/synonyms/{objectID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'objectID' + '}',
1057
- Transport.encode_uri(object_id.to_s))
1086
+ path = "/1/indexes/{indexName}/synonyms/{objectID}"
1087
+ .sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
1088
+ .sub("{" + "objectID" + "}", Transport.encode_uri(object_id.to_s))
1058
1089
  query_params = {}
1059
1090
  query_params[:forwardToReplicas] = forward_to_replicas unless forward_to_replicas.nil?
1060
1091
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -1064,7 +1095,7 @@ module Algolia
1064
1095
  post_body = request_options[:debug_body]
1065
1096
 
1066
1097
  new_options = request_options.merge(
1067
- :operation => :'SearchClient.delete_synonym',
1098
+ :operation => :"SearchClient.delete_synonym",
1068
1099
  :header_params => header_params,
1069
1100
  :query_params => query_params,
1070
1101
  :body => post_body,
@@ -1085,7 +1116,7 @@ module Algolia
1085
1116
  # @return [DeletedAtResponse]
1086
1117
  def delete_synonym(index_name, object_id, forward_to_replicas = nil, request_options = {})
1087
1118
  response = delete_synonym_with_http_info(index_name, object_id, forward_to_replicas, request_options)
1088
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeletedAtResponse')
1119
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::DeletedAtResponse")
1089
1120
  end
1090
1121
 
1091
1122
  # Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application&#39;s keys. When authenticating with other API keys, you can only retrieve information for that key.
@@ -1099,7 +1130,7 @@ module Algolia
1099
1130
  raise ArgumentError, "Parameter `key` is required when calling `get_api_key`."
1100
1131
  end
1101
1132
 
1102
- path = '/1/keys/{key}'.sub('{' + 'key' + '}', Transport.encode_uri(key.to_s))
1133
+ path = "/1/keys/{key}".sub("{" + "key" + "}", Transport.encode_uri(key.to_s))
1103
1134
  query_params = {}
1104
1135
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1105
1136
  header_params = {}
@@ -1108,7 +1139,7 @@ module Algolia
1108
1139
  post_body = request_options[:debug_body]
1109
1140
 
1110
1141
  new_options = request_options.merge(
1111
- :operation => :'SearchClient.get_api_key',
1142
+ :operation => :"SearchClient.get_api_key",
1112
1143
  :header_params => header_params,
1113
1144
  :query_params => query_params,
1114
1145
  :body => post_body,
@@ -1125,7 +1156,7 @@ module Algolia
1125
1156
  # @return [GetApiKeyResponse]
1126
1157
  def get_api_key(key, request_options = {})
1127
1158
  response = get_api_key_with_http_info(key, request_options)
1128
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetApiKeyResponse')
1159
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::GetApiKeyResponse")
1129
1160
  end
1130
1161
 
1131
1162
  # Checks the status of a given application task.
@@ -1141,7 +1172,7 @@ module Algolia
1141
1172
  raise ArgumentError, "Parameter `task_id` is required when calling `get_app_task`."
1142
1173
  end
1143
1174
 
1144
- path = '/1/task/{taskID}'.sub('{' + 'taskID' + '}', Transport.encode_uri(task_id.to_s))
1175
+ path = "/1/task/{taskID}".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
1145
1176
  query_params = {}
1146
1177
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1147
1178
  header_params = {}
@@ -1150,7 +1181,7 @@ module Algolia
1150
1181
  post_body = request_options[:debug_body]
1151
1182
 
1152
1183
  new_options = request_options.merge(
1153
- :operation => :'SearchClient.get_app_task',
1184
+ :operation => :"SearchClient.get_app_task",
1154
1185
  :header_params => header_params,
1155
1186
  :query_params => query_params,
1156
1187
  :body => post_body,
@@ -1169,7 +1200,7 @@ module Algolia
1169
1200
  # @return [GetTaskResponse]
1170
1201
  def get_app_task(task_id, request_options = {})
1171
1202
  response = get_app_task_with_http_info(task_id, request_options)
1172
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetTaskResponse')
1203
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::GetTaskResponse")
1173
1204
  end
1174
1205
 
1175
1206
  # Lists supported languages with their supported dictionary types and number of custom entries.
@@ -1179,7 +1210,7 @@ module Algolia
1179
1210
  # @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)
1180
1211
  # @return [Http::Response] the response
1181
1212
  def get_dictionary_languages_with_http_info(request_options = {})
1182
- path = '/1/dictionaries/*/languages'
1213
+ path = "/1/dictionaries/*/languages"
1183
1214
  query_params = {}
1184
1215
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1185
1216
  header_params = {}
@@ -1188,7 +1219,7 @@ module Algolia
1188
1219
  post_body = request_options[:debug_body]
1189
1220
 
1190
1221
  new_options = request_options.merge(
1191
- :operation => :'SearchClient.get_dictionary_languages',
1222
+ :operation => :"SearchClient.get_dictionary_languages",
1192
1223
  :header_params => header_params,
1193
1224
  :query_params => query_params,
1194
1225
  :body => post_body,
@@ -1206,7 +1237,7 @@ module Algolia
1206
1237
  # @return [Hash<String, Languages>]
1207
1238
  def get_dictionary_languages(request_options = {})
1208
1239
  response = get_dictionary_languages_with_http_info(request_options)
1209
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::Hash<String, Languages>')
1240
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::Hash<String, Languages>")
1210
1241
  end
1211
1242
 
1212
1243
  # Retrieves the languages for which standard dictionary entries are turned off.
@@ -1216,7 +1247,7 @@ module Algolia
1216
1247
  # @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)
1217
1248
  # @return [Http::Response] the response
1218
1249
  def get_dictionary_settings_with_http_info(request_options = {})
1219
- path = '/1/dictionaries/*/settings'
1250
+ path = "/1/dictionaries/*/settings"
1220
1251
  query_params = {}
1221
1252
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1222
1253
  header_params = {}
@@ -1225,7 +1256,7 @@ module Algolia
1225
1256
  post_body = request_options[:debug_body]
1226
1257
 
1227
1258
  new_options = request_options.merge(
1228
- :operation => :'SearchClient.get_dictionary_settings',
1259
+ :operation => :"SearchClient.get_dictionary_settings",
1229
1260
  :header_params => header_params,
1230
1261
  :query_params => query_params,
1231
1262
  :body => post_body,
@@ -1243,7 +1274,10 @@ module Algolia
1243
1274
  # @return [GetDictionarySettingsResponse]
1244
1275
  def get_dictionary_settings(request_options = {})
1245
1276
  response = get_dictionary_settings_with_http_info(request_options)
1246
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetDictionarySettingsResponse')
1277
+ @api_client.deserialize(
1278
+ response.body,
1279
+ request_options[:debug_return_type] || "Search::GetDictionarySettingsResponse"
1280
+ )
1247
1281
  end
1248
1282
 
1249
1283
  # The request must be authenticated by an API key with the [&#x60;logs&#x60; ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn&#39;t appear in the logs itself.
@@ -1258,10 +1292,13 @@ module Algolia
1258
1292
  # @return [Http::Response] the response
1259
1293
  def get_logs_with_http_info(offset = nil, length = nil, index_name = nil, type = nil, request_options = {})
1260
1294
  if @api_client.config.client_side_validation && !length.nil? && length > 1000
1261
- raise ArgumentError, 'invalid value for ""length"" when calling SearchClient.get_logs, must be smaller than or equal to 1000.'
1295
+ raise(
1296
+ ArgumentError,
1297
+ "invalid value for \"\"length\"\" when calling SearchClient.get_logs, must be smaller than or equal to 1000."
1298
+ )
1262
1299
  end
1263
1300
 
1264
- path = '/1/logs'
1301
+ path = "/1/logs"
1265
1302
  query_params = {}
1266
1303
  query_params[:offset] = offset unless offset.nil?
1267
1304
  query_params[:length] = length unless length.nil?
@@ -1274,7 +1311,7 @@ module Algolia
1274
1311
  post_body = request_options[:debug_body]
1275
1312
 
1276
1313
  new_options = request_options.merge(
1277
- :operation => :'SearchClient.get_logs',
1314
+ :operation => :"SearchClient.get_logs",
1278
1315
  :header_params => header_params,
1279
1316
  :query_params => query_params,
1280
1317
  :body => post_body,
@@ -1296,7 +1333,7 @@ module Algolia
1296
1333
  # @return [GetLogsResponse]
1297
1334
  def get_logs(offset = nil, length = nil, index_name = nil, type = nil, request_options = {})
1298
1335
  response = get_logs_with_http_info(offset, length, index_name, type, request_options)
1299
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetLogsResponse')
1336
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::GetLogsResponse")
1300
1337
  end
1301
1338
 
1302
1339
  # Retrieves one record by its object ID. To retrieve more than one record, use the [&#x60;objects&#x60; operation](#tag/Records/operation/getObjects).
@@ -1318,10 +1355,15 @@ module Algolia
1318
1355
  raise ArgumentError, "Parameter `object_id` is required when calling `get_object`."
1319
1356
  end
1320
1357
 
1321
- path = '/1/indexes/{indexName}/{objectID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'objectID' + '}',
1322
- Transport.encode_uri(object_id.to_s))
1358
+ path = "/1/indexes/{indexName}/{objectID}".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s)).sub(
1359
+ "{" + "objectID" + "}",
1360
+ Transport.encode_uri(object_id.to_s)
1361
+ )
1323
1362
  query_params = {}
1324
- query_params[:attributesToRetrieve] = @api_client.build_collection_param(attributes_to_retrieve, :multi) unless attributes_to_retrieve.nil?
1363
+ unless attributes_to_retrieve.nil?
1364
+ query_params[:attributesToRetrieve] = @api_client.build_collection_param(attributes_to_retrieve, :multi)
1365
+ end
1366
+
1325
1367
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1326
1368
  header_params = {}
1327
1369
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
@@ -1329,7 +1371,7 @@ module Algolia
1329
1371
  post_body = request_options[:debug_body]
1330
1372
 
1331
1373
  new_options = request_options.merge(
1332
- :operation => :'SearchClient.get_object',
1374
+ :operation => :"SearchClient.get_object",
1333
1375
  :header_params => header_params,
1334
1376
  :query_params => query_params,
1335
1377
  :body => post_body,
@@ -1350,7 +1392,7 @@ module Algolia
1350
1392
  # @return [Hash<String, String>]
1351
1393
  def get_object(index_name, object_id, attributes_to_retrieve = nil, request_options = {})
1352
1394
  response = get_object_with_http_info(index_name, object_id, attributes_to_retrieve, request_options)
1353
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::Hash<String, String>')
1395
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::Hash<String, String>")
1354
1396
  end
1355
1397
 
1356
1398
  # Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
@@ -1366,7 +1408,7 @@ module Algolia
1366
1408
  raise ArgumentError, "Parameter `get_objects_params` is required when calling `get_objects`."
1367
1409
  end
1368
1410
 
1369
- path = '/1/indexes/*/objects'
1411
+ path = "/1/indexes/*/objects"
1370
1412
  query_params = {}
1371
1413
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1372
1414
  header_params = {}
@@ -1375,7 +1417,7 @@ module Algolia
1375
1417
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(get_objects_params)
1376
1418
 
1377
1419
  new_options = request_options.merge(
1378
- :operation => :'SearchClient.get_objects',
1420
+ :operation => :"SearchClient.get_objects",
1379
1421
  :header_params => header_params,
1380
1422
  :query_params => query_params,
1381
1423
  :body => post_body,
@@ -1394,7 +1436,7 @@ module Algolia
1394
1436
  # @return [GetObjectsResponse]
1395
1437
  def get_objects(get_objects_params, request_options = {})
1396
1438
  response = get_objects_with_http_info(get_objects_params, request_options)
1397
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetObjectsResponse')
1439
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::GetObjectsResponse")
1398
1440
  end
1399
1441
 
1400
1442
  # Retrieves a rule by its ID. To find the object ID of rules, use the [&#x60;search&#x60; operation](#tag/Rules/operation/searchRules).
@@ -1415,8 +1457,9 @@ module Algolia
1415
1457
  raise ArgumentError, "Parameter `object_id` is required when calling `get_rule`."
1416
1458
  end
1417
1459
 
1418
- path = '/1/indexes/{indexName}/rules/{objectID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'objectID' + '}',
1419
- Transport.encode_uri(object_id.to_s))
1460
+ path = "/1/indexes/{indexName}/rules/{objectID}"
1461
+ .sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
1462
+ .sub("{" + "objectID" + "}", Transport.encode_uri(object_id.to_s))
1420
1463
  query_params = {}
1421
1464
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1422
1465
  header_params = {}
@@ -1425,7 +1468,7 @@ module Algolia
1425
1468
  post_body = request_options[:debug_body]
1426
1469
 
1427
1470
  new_options = request_options.merge(
1428
- :operation => :'SearchClient.get_rule',
1471
+ :operation => :"SearchClient.get_rule",
1429
1472
  :header_params => header_params,
1430
1473
  :query_params => query_params,
1431
1474
  :body => post_body,
@@ -1445,7 +1488,7 @@ module Algolia
1445
1488
  # @return [Rule]
1446
1489
  def get_rule(index_name, object_id, request_options = {})
1447
1490
  response = get_rule_with_http_info(index_name, object_id, request_options)
1448
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::Rule')
1491
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::Rule")
1449
1492
  end
1450
1493
 
1451
1494
  # Retrieves an object with non-null index settings.
@@ -1461,7 +1504,7 @@ module Algolia
1461
1504
  raise ArgumentError, "Parameter `index_name` is required when calling `get_settings`."
1462
1505
  end
1463
1506
 
1464
- path = '/1/indexes/{indexName}/settings'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
1507
+ path = "/1/indexes/{indexName}/settings".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
1465
1508
  query_params = {}
1466
1509
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1467
1510
  header_params = {}
@@ -1470,7 +1513,7 @@ module Algolia
1470
1513
  post_body = request_options[:debug_body]
1471
1514
 
1472
1515
  new_options = request_options.merge(
1473
- :operation => :'SearchClient.get_settings',
1516
+ :operation => :"SearchClient.get_settings",
1474
1517
  :header_params => header_params,
1475
1518
  :query_params => query_params,
1476
1519
  :body => post_body,
@@ -1489,7 +1532,7 @@ module Algolia
1489
1532
  # @return [IndexSettings]
1490
1533
  def get_settings(index_name, request_options = {})
1491
1534
  response = get_settings_with_http_info(index_name, request_options)
1492
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::IndexSettings')
1535
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::IndexSettings")
1493
1536
  end
1494
1537
 
1495
1538
  # Retrieves all allowed IP addresses with access to your application.
@@ -1499,7 +1542,7 @@ module Algolia
1499
1542
  # @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)
1500
1543
  # @return [Http::Response] the response
1501
1544
  def get_sources_with_http_info(request_options = {})
1502
- path = '/1/security/sources'
1545
+ path = "/1/security/sources"
1503
1546
  query_params = {}
1504
1547
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1505
1548
  header_params = {}
@@ -1508,7 +1551,7 @@ module Algolia
1508
1551
  post_body = request_options[:debug_body]
1509
1552
 
1510
1553
  new_options = request_options.merge(
1511
- :operation => :'SearchClient.get_sources',
1554
+ :operation => :"SearchClient.get_sources",
1512
1555
  :header_params => header_params,
1513
1556
  :query_params => query_params,
1514
1557
  :body => post_body,
@@ -1526,7 +1569,7 @@ module Algolia
1526
1569
  # @return [Array<Source>]
1527
1570
  def get_sources(request_options = {})
1528
1571
  response = get_sources_with_http_info(request_options)
1529
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Array<Search::Source>')
1572
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Array<Search::Source>")
1530
1573
  end
1531
1574
 
1532
1575
  # Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [&#x60;search&#x60; operation](#tag/Synonyms/operation/searchSynonyms).
@@ -1547,8 +1590,9 @@ module Algolia
1547
1590
  raise ArgumentError, "Parameter `object_id` is required when calling `get_synonym`."
1548
1591
  end
1549
1592
 
1550
- path = '/1/indexes/{indexName}/synonyms/{objectID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'objectID' + '}',
1551
- Transport.encode_uri(object_id.to_s))
1593
+ path = "/1/indexes/{indexName}/synonyms/{objectID}"
1594
+ .sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
1595
+ .sub("{" + "objectID" + "}", Transport.encode_uri(object_id.to_s))
1552
1596
  query_params = {}
1553
1597
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1554
1598
  header_params = {}
@@ -1557,7 +1601,7 @@ module Algolia
1557
1601
  post_body = request_options[:debug_body]
1558
1602
 
1559
1603
  new_options = request_options.merge(
1560
- :operation => :'SearchClient.get_synonym',
1604
+ :operation => :"SearchClient.get_synonym",
1561
1605
  :header_params => header_params,
1562
1606
  :query_params => query_params,
1563
1607
  :body => post_body,
@@ -1577,7 +1621,7 @@ module Algolia
1577
1621
  # @return [SynonymHit]
1578
1622
  def get_synonym(index_name, object_id, request_options = {})
1579
1623
  response = get_synonym_with_http_info(index_name, object_id, request_options)
1580
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SynonymHit')
1624
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::SynonymHit")
1581
1625
  end
1582
1626
 
1583
1627
  # Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks&#39; responses include a task ID that you can use to check the status.
@@ -1598,8 +1642,9 @@ module Algolia
1598
1642
  raise ArgumentError, "Parameter `task_id` is required when calling `get_task`."
1599
1643
  end
1600
1644
 
1601
- path = '/1/indexes/{indexName}/task/{taskID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'taskID' + '}',
1602
- Transport.encode_uri(task_id.to_s))
1645
+ path = "/1/indexes/{indexName}/task/{taskID}"
1646
+ .sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
1647
+ .sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
1603
1648
  query_params = {}
1604
1649
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1605
1650
  header_params = {}
@@ -1608,7 +1653,7 @@ module Algolia
1608
1653
  post_body = request_options[:debug_body]
1609
1654
 
1610
1655
  new_options = request_options.merge(
1611
- :operation => :'SearchClient.get_task',
1656
+ :operation => :"SearchClient.get_task",
1612
1657
  :header_params => header_params,
1613
1658
  :query_params => query_params,
1614
1659
  :body => post_body,
@@ -1628,7 +1673,7 @@ module Algolia
1628
1673
  # @return [GetTaskResponse]
1629
1674
  def get_task(index_name, task_id, request_options = {})
1630
1675
  response = get_task_with_http_info(index_name, task_id, request_options)
1631
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetTaskResponse')
1676
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::GetTaskResponse")
1632
1677
  end
1633
1678
 
1634
1679
  # Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn&#39;t real-time.
@@ -1638,7 +1683,7 @@ module Algolia
1638
1683
  # @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)
1639
1684
  # @return [Http::Response] the response
1640
1685
  def get_top_user_ids_with_http_info(request_options = {})
1641
- path = '/1/clusters/mapping/top'
1686
+ path = "/1/clusters/mapping/top"
1642
1687
  query_params = {}
1643
1688
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1644
1689
  header_params = {}
@@ -1647,7 +1692,7 @@ module Algolia
1647
1692
  post_body = request_options[:debug_body]
1648
1693
 
1649
1694
  new_options = request_options.merge(
1650
- :operation => :'SearchClient.get_top_user_ids',
1695
+ :operation => :"SearchClient.get_top_user_ids",
1651
1696
  :header_params => header_params,
1652
1697
  :query_params => query_params,
1653
1698
  :body => post_body,
@@ -1665,7 +1710,7 @@ module Algolia
1665
1710
  # @return [GetTopUserIdsResponse]
1666
1711
  def get_top_user_ids(request_options = {})
1667
1712
  response = get_top_user_ids_with_http_info(request_options)
1668
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetTopUserIdsResponse')
1713
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::GetTopUserIdsResponse")
1669
1714
  end
1670
1715
 
1671
1716
  # Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn&#39;t real-time.
@@ -1683,10 +1728,13 @@ module Algolia
1683
1728
 
1684
1729
  pattern = /^[a-zA-Z0-9 \-*.]+$/
1685
1730
  if @api_client.config.client_side_validation && user_id !~ pattern
1686
- raise ArgumentError, "invalid value for 'user_id' when calling SearchClient.get_user_id, must conform to the pattern #{pattern}."
1731
+ raise(
1732
+ ArgumentError,
1733
+ "invalid value for 'user_id' when calling SearchClient.get_user_id, must conform to the pattern #{pattern}."
1734
+ )
1687
1735
  end
1688
1736
 
1689
- path = '/1/clusters/mapping/{userID}'.sub('{' + 'userID' + '}', Transport.encode_uri(user_id.to_s))
1737
+ path = "/1/clusters/mapping/{userID}".sub("{" + "userID" + "}", Transport.encode_uri(user_id.to_s))
1690
1738
  query_params = {}
1691
1739
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1692
1740
  header_params = {}
@@ -1695,7 +1743,7 @@ module Algolia
1695
1743
  post_body = request_options[:debug_body]
1696
1744
 
1697
1745
  new_options = request_options.merge(
1698
- :operation => :'SearchClient.get_user_id',
1746
+ :operation => :"SearchClient.get_user_id",
1699
1747
  :header_params => header_params,
1700
1748
  :query_params => query_params,
1701
1749
  :body => post_body,
@@ -1714,7 +1762,7 @@ module Algolia
1714
1762
  # @return [UserId]
1715
1763
  def get_user_id(user_id, request_options = {})
1716
1764
  response = get_user_id_with_http_info(user_id, request_options)
1717
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UserId')
1765
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::UserId")
1718
1766
  end
1719
1767
 
1720
1768
  # To determine when the time-consuming process of creating a large batch of users or migrating users from one cluster to another is complete, this operation retrieves the status of the process.
@@ -1725,7 +1773,7 @@ module Algolia
1725
1773
  # @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)
1726
1774
  # @return [Http::Response] the response
1727
1775
  def has_pending_mappings_with_http_info(get_clusters = nil, request_options = {})
1728
- path = '/1/clusters/mapping/pending'
1776
+ path = "/1/clusters/mapping/pending"
1729
1777
  query_params = {}
1730
1778
  query_params[:getClusters] = get_clusters unless get_clusters.nil?
1731
1779
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -1735,7 +1783,7 @@ module Algolia
1735
1783
  post_body = request_options[:debug_body]
1736
1784
 
1737
1785
  new_options = request_options.merge(
1738
- :operation => :'SearchClient.has_pending_mappings',
1786
+ :operation => :"SearchClient.has_pending_mappings",
1739
1787
  :header_params => header_params,
1740
1788
  :query_params => query_params,
1741
1789
  :body => post_body,
@@ -1754,7 +1802,10 @@ module Algolia
1754
1802
  # @return [HasPendingMappingsResponse]
1755
1803
  def has_pending_mappings(get_clusters = nil, request_options = {})
1756
1804
  response = has_pending_mappings_with_http_info(get_clusters, request_options)
1757
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::HasPendingMappingsResponse')
1805
+ @api_client.deserialize(
1806
+ response.body,
1807
+ request_options[:debug_return_type] || "Search::HasPendingMappingsResponse"
1808
+ )
1758
1809
  end
1759
1810
 
1760
1811
  # Lists all API keys associated with your Algolia application, including their permissions and restrictions.
@@ -1764,7 +1815,7 @@ module Algolia
1764
1815
  # @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)
1765
1816
  # @return [Http::Response] the response
1766
1817
  def list_api_keys_with_http_info(request_options = {})
1767
- path = '/1/keys'
1818
+ path = "/1/keys"
1768
1819
  query_params = {}
1769
1820
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1770
1821
  header_params = {}
@@ -1773,7 +1824,7 @@ module Algolia
1773
1824
  post_body = request_options[:debug_body]
1774
1825
 
1775
1826
  new_options = request_options.merge(
1776
- :operation => :'SearchClient.list_api_keys',
1827
+ :operation => :"SearchClient.list_api_keys",
1777
1828
  :header_params => header_params,
1778
1829
  :query_params => query_params,
1779
1830
  :body => post_body,
@@ -1791,7 +1842,7 @@ module Algolia
1791
1842
  # @return [ListApiKeysResponse]
1792
1843
  def list_api_keys(request_options = {})
1793
1844
  response = list_api_keys_with_http_info(request_options)
1794
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::ListApiKeysResponse')
1845
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::ListApiKeysResponse")
1795
1846
  end
1796
1847
 
1797
1848
  # Lists the available clusters in a multi-cluster setup.
@@ -1801,7 +1852,7 @@ module Algolia
1801
1852
  # @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
1853
  # @return [Http::Response] the response
1803
1854
  def list_clusters_with_http_info(request_options = {})
1804
- path = '/1/clusters'
1855
+ path = "/1/clusters"
1805
1856
  query_params = {}
1806
1857
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1807
1858
  header_params = {}
@@ -1810,7 +1861,7 @@ module Algolia
1810
1861
  post_body = request_options[:debug_body]
1811
1862
 
1812
1863
  new_options = request_options.merge(
1813
- :operation => :'SearchClient.list_clusters',
1864
+ :operation => :"SearchClient.list_clusters",
1814
1865
  :header_params => header_params,
1815
1866
  :query_params => query_params,
1816
1867
  :body => post_body,
@@ -1828,7 +1879,7 @@ module Algolia
1828
1879
  # @return [ListClustersResponse]
1829
1880
  def list_clusters(request_options = {})
1830
1881
  response = list_clusters_with_http_info(request_options)
1831
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::ListClustersResponse')
1882
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::ListClustersResponse")
1832
1883
  end
1833
1884
 
1834
1885
  # Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
@@ -1841,10 +1892,13 @@ module Algolia
1841
1892
  # @return [Http::Response] the response
1842
1893
  def list_indices_with_http_info(page = nil, hits_per_page = nil, request_options = {})
1843
1894
  if @api_client.config.client_side_validation && !page.nil? && page < 0
1844
- raise ArgumentError, 'invalid value for ""page"" when calling SearchClient.list_indices, must be greater than or equal to 0.'
1895
+ raise(
1896
+ ArgumentError,
1897
+ "invalid value for \"\"page\"\" when calling SearchClient.list_indices, must be greater than or equal to 0."
1898
+ )
1845
1899
  end
1846
1900
 
1847
- path = '/1/indexes'
1901
+ path = "/1/indexes"
1848
1902
  query_params = {}
1849
1903
  query_params[:page] = page unless page.nil?
1850
1904
  query_params[:hitsPerPage] = hits_per_page unless hits_per_page.nil?
@@ -1855,7 +1909,7 @@ module Algolia
1855
1909
  post_body = request_options[:debug_body]
1856
1910
 
1857
1911
  new_options = request_options.merge(
1858
- :operation => :'SearchClient.list_indices',
1912
+ :operation => :"SearchClient.list_indices",
1859
1913
  :header_params => header_params,
1860
1914
  :query_params => query_params,
1861
1915
  :body => post_body,
@@ -1875,7 +1929,7 @@ module Algolia
1875
1929
  # @return [ListIndicesResponse]
1876
1930
  def list_indices(page = nil, hits_per_page = nil, request_options = {})
1877
1931
  response = list_indices_with_http_info(page, hits_per_page, request_options)
1878
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::ListIndicesResponse')
1932
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::ListIndicesResponse")
1879
1933
  end
1880
1934
 
1881
1935
  # Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn&#39;t real-time.
@@ -1888,10 +1942,13 @@ module Algolia
1888
1942
  # @return [Http::Response] the response
1889
1943
  def list_user_ids_with_http_info(page = nil, hits_per_page = nil, request_options = {})
1890
1944
  if @api_client.config.client_side_validation && !page.nil? && page < 0
1891
- raise ArgumentError, 'invalid value for ""page"" when calling SearchClient.list_user_ids, must be greater than or equal to 0.'
1945
+ raise(
1946
+ ArgumentError,
1947
+ "invalid value for \"\"page\"\" when calling SearchClient.list_user_ids, must be greater than or equal to 0."
1948
+ )
1892
1949
  end
1893
1950
 
1894
- path = '/1/clusters/mapping'
1951
+ path = "/1/clusters/mapping"
1895
1952
  query_params = {}
1896
1953
  query_params[:page] = page unless page.nil?
1897
1954
  query_params[:hitsPerPage] = hits_per_page unless hits_per_page.nil?
@@ -1902,7 +1959,7 @@ module Algolia
1902
1959
  post_body = request_options[:debug_body]
1903
1960
 
1904
1961
  new_options = request_options.merge(
1905
- :operation => :'SearchClient.list_user_ids',
1962
+ :operation => :"SearchClient.list_user_ids",
1906
1963
  :header_params => header_params,
1907
1964
  :query_params => query_params,
1908
1965
  :body => post_body,
@@ -1922,7 +1979,7 @@ module Algolia
1922
1979
  # @return [ListUserIdsResponse]
1923
1980
  def list_user_ids(page = nil, hits_per_page = nil, request_options = {})
1924
1981
  response = list_user_ids_with_http_info(page, hits_per_page, request_options)
1925
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::ListUserIdsResponse')
1982
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::ListUserIdsResponse")
1926
1983
  end
1927
1984
 
1928
1985
  # Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name.
@@ -1936,7 +1993,7 @@ module Algolia
1936
1993
  raise ArgumentError, "Parameter `batch_params` is required when calling `multiple_batch`."
1937
1994
  end
1938
1995
 
1939
- path = '/1/indexes/*/batch'
1996
+ path = "/1/indexes/*/batch"
1940
1997
  query_params = {}
1941
1998
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1942
1999
  header_params = {}
@@ -1945,7 +2002,7 @@ module Algolia
1945
2002
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(batch_params)
1946
2003
 
1947
2004
  new_options = request_options.merge(
1948
- :operation => :'SearchClient.multiple_batch',
2005
+ :operation => :"SearchClient.multiple_batch",
1949
2006
  :header_params => header_params,
1950
2007
  :query_params => query_params,
1951
2008
  :body => post_body,
@@ -1962,7 +2019,7 @@ module Algolia
1962
2019
  # @return [MultipleBatchResponse]
1963
2020
  def multiple_batch(batch_params, request_options = {})
1964
2021
  response = multiple_batch_with_http_info(batch_params, request_options)
1965
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::MultipleBatchResponse')
2022
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::MultipleBatchResponse")
1966
2023
  end
1967
2024
 
1968
2025
  # Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn&#39;t exist yet, it&#39;ll be created. **Copy** - Copying a source index that doesn&#39;t exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can&#39;t copy the &#x60;enableReRanking&#x60;, &#x60;mode&#x60;, and &#x60;replicas&#x60; settings. - You can&#39;t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn&#39;t exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/).
@@ -1983,7 +2040,7 @@ module Algolia
1983
2040
  raise ArgumentError, "Parameter `operation_index_params` is required when calling `operation_index`."
1984
2041
  end
1985
2042
 
1986
- path = '/1/indexes/{indexName}/operation'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
2043
+ path = "/1/indexes/{indexName}/operation".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
1987
2044
  query_params = {}
1988
2045
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1989
2046
  header_params = {}
@@ -1992,7 +2049,7 @@ module Algolia
1992
2049
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(operation_index_params)
1993
2050
 
1994
2051
  new_options = request_options.merge(
1995
- :operation => :'SearchClient.operation_index',
2052
+ :operation => :"SearchClient.operation_index",
1996
2053
  :header_params => header_params,
1997
2054
  :query_params => query_params,
1998
2055
  :body => post_body,
@@ -2012,7 +2069,7 @@ module Algolia
2012
2069
  # @return [UpdatedAtResponse]
2013
2070
  def operation_index(index_name, operation_index_params, request_options = {})
2014
2071
  response = operation_index_with_http_info(index_name, operation_index_params, request_options)
2015
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
2072
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::UpdatedAtResponse")
2016
2073
  end
2017
2074
 
2018
2075
  # Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn&#39;t exist, a new record is added to the index **if** &#x60;createIfNotExists&#x60; is true. - If the index doesn&#39;t exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor.
@@ -2025,7 +2082,13 @@ module Algolia
2025
2082
  # @param create_if_not_exists [Boolean] Whether to create a new record if it doesn&#39;t exist. (default to true)
2026
2083
  # @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)
2027
2084
  # @return [Http::Response] the response
2028
- def partial_update_object_with_http_info(index_name, object_id, attributes_to_update, create_if_not_exists = nil, request_options = {})
2085
+ def partial_update_object_with_http_info(
2086
+ index_name,
2087
+ object_id,
2088
+ attributes_to_update,
2089
+ create_if_not_exists = nil,
2090
+ request_options = {}
2091
+ )
2029
2092
  # verify the required parameter 'index_name' is set
2030
2093
  if @api_client.config.client_side_validation && index_name.nil?
2031
2094
  raise ArgumentError, "Parameter `index_name` is required when calling `partial_update_object`."
@@ -2039,8 +2102,9 @@ module Algolia
2039
2102
  raise ArgumentError, "Parameter `attributes_to_update` is required when calling `partial_update_object`."
2040
2103
  end
2041
2104
 
2042
- path = '/1/indexes/{indexName}/{objectID}/partial'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'objectID' + '}',
2043
- Transport.encode_uri(object_id.to_s))
2105
+ path = "/1/indexes/{indexName}/{objectID}/partial"
2106
+ .sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
2107
+ .sub("{" + "objectID" + "}", Transport.encode_uri(object_id.to_s))
2044
2108
  query_params = {}
2045
2109
  query_params[:createIfNotExists] = create_if_not_exists unless create_if_not_exists.nil?
2046
2110
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -2050,7 +2114,7 @@ module Algolia
2050
2114
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(attributes_to_update)
2051
2115
 
2052
2116
  new_options = request_options.merge(
2053
- :operation => :'SearchClient.partial_update_object',
2117
+ :operation => :"SearchClient.partial_update_object",
2054
2118
  :header_params => header_params,
2055
2119
  :query_params => query_params,
2056
2120
  :body => post_body,
@@ -2070,9 +2134,24 @@ module Algolia
2070
2134
  # @param create_if_not_exists [Boolean] Whether to create a new record if it doesn&#39;t exist. (default to true)
2071
2135
  # @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)
2072
2136
  # @return [UpdatedAtWithObjectIdResponse]
2073
- def partial_update_object(index_name, object_id, attributes_to_update, create_if_not_exists = nil, request_options = {})
2074
- response = partial_update_object_with_http_info(index_name, object_id, attributes_to_update, create_if_not_exists, request_options)
2075
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtWithObjectIdResponse')
2137
+ def partial_update_object(
2138
+ index_name,
2139
+ object_id,
2140
+ attributes_to_update,
2141
+ create_if_not_exists = nil,
2142
+ request_options = {}
2143
+ )
2144
+ response = partial_update_object_with_http_info(
2145
+ index_name,
2146
+ object_id,
2147
+ attributes_to_update,
2148
+ create_if_not_exists,
2149
+ request_options
2150
+ )
2151
+ @api_client.deserialize(
2152
+ response.body,
2153
+ request_options[:debug_return_type] || "Search::UpdatedAtWithObjectIdResponse"
2154
+ )
2076
2155
  end
2077
2156
 
2078
2157
  # Deletes a user ID and its associated data from the clusters.
@@ -2090,10 +2169,13 @@ module Algolia
2090
2169
 
2091
2170
  pattern = /^[a-zA-Z0-9 \-*.]+$/
2092
2171
  if @api_client.config.client_side_validation && user_id !~ pattern
2093
- raise ArgumentError, "invalid value for 'user_id' when calling SearchClient.remove_user_id, must conform to the pattern #{pattern}."
2172
+ raise(
2173
+ ArgumentError,
2174
+ "invalid value for 'user_id' when calling SearchClient.remove_user_id, must conform to the pattern #{pattern}."
2175
+ )
2094
2176
  end
2095
2177
 
2096
- path = '/1/clusters/mapping/{userID}'.sub('{' + 'userID' + '}', Transport.encode_uri(user_id.to_s))
2178
+ path = "/1/clusters/mapping/{userID}".sub("{" + "userID" + "}", Transport.encode_uri(user_id.to_s))
2097
2179
  query_params = {}
2098
2180
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2099
2181
  header_params = {}
@@ -2102,7 +2184,7 @@ module Algolia
2102
2184
  post_body = request_options[:debug_body]
2103
2185
 
2104
2186
  new_options = request_options.merge(
2105
- :operation => :'SearchClient.remove_user_id',
2187
+ :operation => :"SearchClient.remove_user_id",
2106
2188
  :header_params => header_params,
2107
2189
  :query_params => query_params,
2108
2190
  :body => post_body,
@@ -2121,7 +2203,7 @@ module Algolia
2121
2203
  # @return [RemoveUserIdResponse]
2122
2204
  def remove_user_id(user_id, request_options = {})
2123
2205
  response = remove_user_id_with_http_info(user_id, request_options)
2124
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::RemoveUserIdResponse')
2206
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::RemoveUserIdResponse")
2125
2207
  end
2126
2208
 
2127
2209
  # Replaces the list of allowed sources.
@@ -2137,7 +2219,7 @@ module Algolia
2137
2219
  raise ArgumentError, "Parameter `source` is required when calling `replace_sources`."
2138
2220
  end
2139
2221
 
2140
- path = '/1/security/sources'
2222
+ path = "/1/security/sources"
2141
2223
  query_params = {}
2142
2224
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2143
2225
  header_params = {}
@@ -2146,7 +2228,7 @@ module Algolia
2146
2228
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(source)
2147
2229
 
2148
2230
  new_options = request_options.merge(
2149
- :operation => :'SearchClient.replace_sources',
2231
+ :operation => :"SearchClient.replace_sources",
2150
2232
  :header_params => header_params,
2151
2233
  :query_params => query_params,
2152
2234
  :body => post_body,
@@ -2165,7 +2247,7 @@ module Algolia
2165
2247
  # @return [ReplaceSourceResponse]
2166
2248
  def replace_sources(source, request_options = {})
2167
2249
  response = replace_sources_with_http_info(source, request_options)
2168
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::ReplaceSourceResponse')
2250
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::ReplaceSourceResponse")
2169
2251
  end
2170
2252
 
2171
2253
  # Restores a deleted API key. Restoring resets the &#x60;validity&#x60; attribute to &#x60;0&#x60;. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can&#39;t be restored.
@@ -2181,7 +2263,7 @@ module Algolia
2181
2263
  raise ArgumentError, "Parameter `key` is required when calling `restore_api_key`."
2182
2264
  end
2183
2265
 
2184
- path = '/1/keys/{key}/restore'.sub('{' + 'key' + '}', Transport.encode_uri(key.to_s))
2266
+ path = "/1/keys/{key}/restore".sub("{" + "key" + "}", Transport.encode_uri(key.to_s))
2185
2267
  query_params = {}
2186
2268
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2187
2269
  header_params = {}
@@ -2190,7 +2272,7 @@ module Algolia
2190
2272
  post_body = request_options[:debug_body]
2191
2273
 
2192
2274
  new_options = request_options.merge(
2193
- :operation => :'SearchClient.restore_api_key',
2275
+ :operation => :"SearchClient.restore_api_key",
2194
2276
  :header_params => header_params,
2195
2277
  :query_params => query_params,
2196
2278
  :body => post_body,
@@ -2209,7 +2291,7 @@ module Algolia
2209
2291
  # @return [AddApiKeyResponse]
2210
2292
  def restore_api_key(key, request_options = {})
2211
2293
  response = restore_api_key_with_http_info(key, request_options)
2212
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::AddApiKeyResponse')
2294
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::AddApiKeyResponse")
2213
2295
  end
2214
2296
 
2215
2297
  # Adds a record to an index or replace it. - If the record doesn&#39;t have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn&#39;t exist, a new record is added to your index. - If you add a record to an index that doesn&#39;t exist yet, a new index is created. To update _some_ attributes of a record, use the [&#x60;partial&#x60; operation](#tag/Records/operation/partial). To add, update, or replace multiple records, use the [&#x60;batch&#x60; operation](#tag/Records/operation/batch).
@@ -2230,7 +2312,7 @@ module Algolia
2230
2312
  raise ArgumentError, "Parameter `body` is required when calling `save_object`."
2231
2313
  end
2232
2314
 
2233
- path = '/1/indexes/{indexName}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
2315
+ path = "/1/indexes/{indexName}".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
2234
2316
  query_params = {}
2235
2317
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2236
2318
  header_params = {}
@@ -2239,7 +2321,7 @@ module Algolia
2239
2321
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(body)
2240
2322
 
2241
2323
  new_options = request_options.merge(
2242
- :operation => :'SearchClient.save_object',
2324
+ :operation => :"SearchClient.save_object",
2243
2325
  :header_params => header_params,
2244
2326
  :query_params => query_params,
2245
2327
  :body => post_body,
@@ -2259,7 +2341,7 @@ module Algolia
2259
2341
  # @return [SaveObjectResponse]
2260
2342
  def save_object(index_name, body, request_options = {})
2261
2343
  response = save_object_with_http_info(index_name, body, request_options)
2262
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SaveObjectResponse')
2344
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::SaveObjectResponse")
2263
2345
  end
2264
2346
 
2265
2347
  # If a rule with the specified object ID doesn&#39;t exist, it&#39;s created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [&#x60;batch&#x60; operation](#tag/Rules/operation/saveRules).
@@ -2286,8 +2368,9 @@ module Algolia
2286
2368
  raise ArgumentError, "Parameter `rule` is required when calling `save_rule`."
2287
2369
  end
2288
2370
 
2289
- path = '/1/indexes/{indexName}/rules/{objectID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'objectID' + '}',
2290
- Transport.encode_uri(object_id.to_s))
2371
+ path = "/1/indexes/{indexName}/rules/{objectID}"
2372
+ .sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
2373
+ .sub("{" + "objectID" + "}", Transport.encode_uri(object_id.to_s))
2291
2374
  query_params = {}
2292
2375
  query_params[:forwardToReplicas] = forward_to_replicas unless forward_to_replicas.nil?
2293
2376
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -2297,7 +2380,7 @@ module Algolia
2297
2380
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(rule)
2298
2381
 
2299
2382
  new_options = request_options.merge(
2300
- :operation => :'SearchClient.save_rule',
2383
+ :operation => :"SearchClient.save_rule",
2301
2384
  :header_params => header_params,
2302
2385
  :query_params => query_params,
2303
2386
  :body => post_body,
@@ -2319,7 +2402,7 @@ module Algolia
2319
2402
  # @return [UpdatedRuleResponse]
2320
2403
  def save_rule(index_name, object_id, rule, forward_to_replicas = nil, request_options = {})
2321
2404
  response = save_rule_with_http_info(index_name, object_id, rule, forward_to_replicas, request_options)
2322
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedRuleResponse')
2405
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::UpdatedRuleResponse")
2323
2406
  end
2324
2407
 
2325
2408
  # Create or update multiple rules. If a rule with the specified object ID doesn&#39;t exist, Algolia creates a new one. Otherwise, existing rules are replaced.
@@ -2332,7 +2415,13 @@ module Algolia
2332
2415
  # @param clear_existing_rules [Boolean] Whether existing rules should be deleted before adding this batch.
2333
2416
  # @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)
2334
2417
  # @return [Http::Response] the response
2335
- def save_rules_with_http_info(index_name, rules, forward_to_replicas = nil, clear_existing_rules = nil, request_options = {})
2418
+ def save_rules_with_http_info(
2419
+ index_name,
2420
+ rules,
2421
+ forward_to_replicas = nil,
2422
+ clear_existing_rules = nil,
2423
+ request_options = {}
2424
+ )
2336
2425
  # verify the required parameter 'index_name' is set
2337
2426
  if @api_client.config.client_side_validation && index_name.nil?
2338
2427
  raise ArgumentError, "Parameter `index_name` is required when calling `save_rules`."
@@ -2342,7 +2431,7 @@ module Algolia
2342
2431
  raise ArgumentError, "Parameter `rules` is required when calling `save_rules`."
2343
2432
  end
2344
2433
 
2345
- path = '/1/indexes/{indexName}/rules/batch'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
2434
+ path = "/1/indexes/{indexName}/rules/batch".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
2346
2435
  query_params = {}
2347
2436
  query_params[:forwardToReplicas] = forward_to_replicas unless forward_to_replicas.nil?
2348
2437
  query_params[:clearExistingRules] = clear_existing_rules unless clear_existing_rules.nil?
@@ -2353,7 +2442,7 @@ module Algolia
2353
2442
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(rules)
2354
2443
 
2355
2444
  new_options = request_options.merge(
2356
- :operation => :'SearchClient.save_rules',
2445
+ :operation => :"SearchClient.save_rules",
2357
2446
  :header_params => header_params,
2358
2447
  :query_params => query_params,
2359
2448
  :body => post_body,
@@ -2374,8 +2463,14 @@ module Algolia
2374
2463
  # @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)
2375
2464
  # @return [UpdatedAtResponse]
2376
2465
  def save_rules(index_name, rules, forward_to_replicas = nil, clear_existing_rules = nil, request_options = {})
2377
- response = save_rules_with_http_info(index_name, rules, forward_to_replicas, clear_existing_rules, request_options)
2378
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
2466
+ response = save_rules_with_http_info(
2467
+ index_name,
2468
+ rules,
2469
+ forward_to_replicas,
2470
+ clear_existing_rules,
2471
+ request_options
2472
+ )
2473
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::UpdatedAtResponse")
2379
2474
  end
2380
2475
 
2381
2476
  # If a synonym with the specified object ID doesn&#39;t exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [&#x60;batch&#x60; operation](#tag/Synonyms/operation/saveSynonyms).
@@ -2402,8 +2497,9 @@ module Algolia
2402
2497
  raise ArgumentError, "Parameter `synonym_hit` is required when calling `save_synonym`."
2403
2498
  end
2404
2499
 
2405
- path = '/1/indexes/{indexName}/synonyms/{objectID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'objectID' + '}',
2406
- Transport.encode_uri(object_id.to_s))
2500
+ path = "/1/indexes/{indexName}/synonyms/{objectID}"
2501
+ .sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
2502
+ .sub("{" + "objectID" + "}", Transport.encode_uri(object_id.to_s))
2407
2503
  query_params = {}
2408
2504
  query_params[:forwardToReplicas] = forward_to_replicas unless forward_to_replicas.nil?
2409
2505
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -2413,7 +2509,7 @@ module Algolia
2413
2509
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(synonym_hit)
2414
2510
 
2415
2511
  new_options = request_options.merge(
2416
- :operation => :'SearchClient.save_synonym',
2512
+ :operation => :"SearchClient.save_synonym",
2417
2513
  :header_params => header_params,
2418
2514
  :query_params => query_params,
2419
2515
  :body => post_body,
@@ -2435,7 +2531,7 @@ module Algolia
2435
2531
  # @return [SaveSynonymResponse]
2436
2532
  def save_synonym(index_name, object_id, synonym_hit, forward_to_replicas = nil, request_options = {})
2437
2533
  response = save_synonym_with_http_info(index_name, object_id, synonym_hit, forward_to_replicas, request_options)
2438
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SaveSynonymResponse')
2534
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::SaveSynonymResponse")
2439
2535
  end
2440
2536
 
2441
2537
  # If a synonym with the &#x60;objectID&#x60; doesn&#39;t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
@@ -2448,7 +2544,13 @@ module Algolia
2448
2544
  # @param replace_existing_synonyms [Boolean] Whether to replace all synonyms in the index with the ones sent with this request.
2449
2545
  # @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)
2450
2546
  # @return [Http::Response] the response
2451
- def save_synonyms_with_http_info(index_name, synonym_hit, forward_to_replicas = nil, replace_existing_synonyms = nil, request_options = {})
2547
+ def save_synonyms_with_http_info(
2548
+ index_name,
2549
+ synonym_hit,
2550
+ forward_to_replicas = nil,
2551
+ replace_existing_synonyms = nil,
2552
+ request_options = {}
2553
+ )
2452
2554
  # verify the required parameter 'index_name' is set
2453
2555
  if @api_client.config.client_side_validation && index_name.nil?
2454
2556
  raise ArgumentError, "Parameter `index_name` is required when calling `save_synonyms`."
@@ -2458,7 +2560,7 @@ module Algolia
2458
2560
  raise ArgumentError, "Parameter `synonym_hit` is required when calling `save_synonyms`."
2459
2561
  end
2460
2562
 
2461
- path = '/1/indexes/{indexName}/synonyms/batch'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
2563
+ path = "/1/indexes/{indexName}/synonyms/batch".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
2462
2564
  query_params = {}
2463
2565
  query_params[:forwardToReplicas] = forward_to_replicas unless forward_to_replicas.nil?
2464
2566
  query_params[:replaceExistingSynonyms] = replace_existing_synonyms unless replace_existing_synonyms.nil?
@@ -2469,7 +2571,7 @@ module Algolia
2469
2571
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(synonym_hit)
2470
2572
 
2471
2573
  new_options = request_options.merge(
2472
- :operation => :'SearchClient.save_synonyms',
2574
+ :operation => :"SearchClient.save_synonyms",
2473
2575
  :header_params => header_params,
2474
2576
  :query_params => query_params,
2475
2577
  :body => post_body,
@@ -2489,9 +2591,21 @@ module Algolia
2489
2591
  # @param replace_existing_synonyms [Boolean] Whether to replace all synonyms in the index with the ones sent with this request.
2490
2592
  # @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)
2491
2593
  # @return [UpdatedAtResponse]
2492
- def save_synonyms(index_name, synonym_hit, forward_to_replicas = nil, replace_existing_synonyms = nil, request_options = {})
2493
- response = save_synonyms_with_http_info(index_name, synonym_hit, forward_to_replicas, replace_existing_synonyms, request_options)
2494
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
2594
+ def save_synonyms(
2595
+ index_name,
2596
+ synonym_hit,
2597
+ forward_to_replicas = nil,
2598
+ replace_existing_synonyms = nil,
2599
+ request_options = {}
2600
+ )
2601
+ response = save_synonyms_with_http_info(
2602
+ index_name,
2603
+ synonym_hit,
2604
+ forward_to_replicas,
2605
+ replace_existing_synonyms,
2606
+ request_options
2607
+ )
2608
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::UpdatedAtResponse")
2495
2609
  end
2496
2610
 
2497
2611
  # Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters.
@@ -2507,7 +2621,7 @@ module Algolia
2507
2621
  raise ArgumentError, "Parameter `search_method_params` is required when calling `search`."
2508
2622
  end
2509
2623
 
2510
- path = '/1/indexes/*/queries'
2624
+ path = "/1/indexes/*/queries"
2511
2625
  query_params = {}
2512
2626
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2513
2627
  header_params = {}
@@ -2516,7 +2630,7 @@ module Algolia
2516
2630
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(search_method_params)
2517
2631
 
2518
2632
  new_options = request_options.merge(
2519
- :operation => :'SearchClient.search',
2633
+ :operation => :"SearchClient.search",
2520
2634
  :header_params => header_params,
2521
2635
  :query_params => query_params,
2522
2636
  :body => post_body,
@@ -2535,7 +2649,7 @@ module Algolia
2535
2649
  # @return [SearchResponses]
2536
2650
  def search(search_method_params, request_options = {})
2537
2651
  response = search_with_http_info(search_method_params, request_options)
2538
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchResponses')
2652
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::SearchResponses")
2539
2653
  end
2540
2654
 
2541
2655
  # Searches for standard and custom dictionary entries.
@@ -2546,17 +2660,27 @@ module Algolia
2546
2660
  # @param search_dictionary_entries_params [SearchDictionaryEntriesParams] (required)
2547
2661
  # @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)
2548
2662
  # @return [Http::Response] the response
2549
- def search_dictionary_entries_with_http_info(dictionary_name, search_dictionary_entries_params, request_options = {})
2663
+ def search_dictionary_entries_with_http_info(
2664
+ dictionary_name,
2665
+ search_dictionary_entries_params,
2666
+ request_options = {}
2667
+ )
2550
2668
  # verify the required parameter 'dictionary_name' is set
2551
2669
  if @api_client.config.client_side_validation && dictionary_name.nil?
2552
2670
  raise ArgumentError, "Parameter `dictionary_name` is required when calling `search_dictionary_entries`."
2553
2671
  end
2554
2672
  # verify the required parameter 'search_dictionary_entries_params' is set
2555
2673
  if @api_client.config.client_side_validation && search_dictionary_entries_params.nil?
2556
- raise ArgumentError, "Parameter `search_dictionary_entries_params` is required when calling `search_dictionary_entries`."
2674
+ raise(
2675
+ ArgumentError,
2676
+ "Parameter `search_dictionary_entries_params` is required when calling `search_dictionary_entries`."
2677
+ )
2557
2678
  end
2558
2679
 
2559
- path = '/1/dictionaries/{dictionaryName}/search'.sub('{' + 'dictionaryName' + '}', Transport.encode_uri(dictionary_name.to_s))
2680
+ path = "/1/dictionaries/{dictionaryName}/search".sub(
2681
+ "{" + "dictionaryName" + "}",
2682
+ Transport.encode_uri(dictionary_name.to_s)
2683
+ )
2560
2684
  query_params = {}
2561
2685
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2562
2686
  header_params = {}
@@ -2565,7 +2689,7 @@ module Algolia
2565
2689
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(search_dictionary_entries_params)
2566
2690
 
2567
2691
  new_options = request_options.merge(
2568
- :operation => :'SearchClient.search_dictionary_entries',
2692
+ :operation => :"SearchClient.search_dictionary_entries",
2569
2693
  :header_params => header_params,
2570
2694
  :query_params => query_params,
2571
2695
  :body => post_body,
@@ -2584,8 +2708,15 @@ module Algolia
2584
2708
  # @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)
2585
2709
  # @return [SearchDictionaryEntriesResponse]
2586
2710
  def search_dictionary_entries(dictionary_name, search_dictionary_entries_params, request_options = {})
2587
- response = search_dictionary_entries_with_http_info(dictionary_name, search_dictionary_entries_params, request_options)
2588
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchDictionaryEntriesResponse')
2711
+ response = search_dictionary_entries_with_http_info(
2712
+ dictionary_name,
2713
+ search_dictionary_entries_params,
2714
+ request_options
2715
+ )
2716
+ @api_client.deserialize(
2717
+ response.body,
2718
+ request_options[:debug_return_type] || "Search::SearchDictionaryEntriesResponse"
2719
+ )
2589
2720
  end
2590
2721
 
2591
2722
  # Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the &#x60;sortFacetValueBy&#x60; parameter. - Searching for facet values doesn&#39;t work if you have **more than 65 searchable facets and searchable attributes combined**.
@@ -2597,7 +2728,12 @@ module Algolia
2597
2728
  # @param search_for_facet_values_request [SearchForFacetValuesRequest]
2598
2729
  # @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)
2599
2730
  # @return [Http::Response] the response
2600
- def search_for_facet_values_with_http_info(index_name, facet_name, search_for_facet_values_request = nil, request_options = {})
2731
+ def search_for_facet_values_with_http_info(
2732
+ index_name,
2733
+ facet_name,
2734
+ search_for_facet_values_request = nil,
2735
+ request_options = {}
2736
+ )
2601
2737
  # verify the required parameter 'index_name' is set
2602
2738
  if @api_client.config.client_side_validation && index_name.nil?
2603
2739
  raise ArgumentError, "Parameter `index_name` is required when calling `search_for_facet_values`."
@@ -2607,8 +2743,9 @@ module Algolia
2607
2743
  raise ArgumentError, "Parameter `facet_name` is required when calling `search_for_facet_values`."
2608
2744
  end
2609
2745
 
2610
- path = '/1/indexes/{indexName}/facets/{facetName}/query'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'facetName' + '}',
2611
- Transport.encode_uri(facet_name.to_s))
2746
+ path = "/1/indexes/{indexName}/facets/{facetName}/query"
2747
+ .sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
2748
+ .sub("{" + "facetName" + "}", Transport.encode_uri(facet_name.to_s))
2612
2749
  query_params = {}
2613
2750
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2614
2751
  header_params = {}
@@ -2617,7 +2754,7 @@ module Algolia
2617
2754
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(search_for_facet_values_request)
2618
2755
 
2619
2756
  new_options = request_options.merge(
2620
- :operation => :'SearchClient.search_for_facet_values',
2757
+ :operation => :"SearchClient.search_for_facet_values",
2621
2758
  :header_params => header_params,
2622
2759
  :query_params => query_params,
2623
2760
  :body => post_body,
@@ -2637,8 +2774,16 @@ module Algolia
2637
2774
  # @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)
2638
2775
  # @return [SearchForFacetValuesResponse]
2639
2776
  def search_for_facet_values(index_name, facet_name, search_for_facet_values_request = nil, request_options = {})
2640
- response = search_for_facet_values_with_http_info(index_name, facet_name, search_for_facet_values_request, request_options)
2641
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchForFacetValuesResponse')
2777
+ response = search_for_facet_values_with_http_info(
2778
+ index_name,
2779
+ facet_name,
2780
+ search_for_facet_values_request,
2781
+ request_options
2782
+ )
2783
+ @api_client.deserialize(
2784
+ response.body,
2785
+ request_options[:debug_return_type] || "Search::SearchForFacetValuesResponse"
2786
+ )
2642
2787
  end
2643
2788
 
2644
2789
  # Searches for rules in your index.
@@ -2655,7 +2800,7 @@ module Algolia
2655
2800
  raise ArgumentError, "Parameter `index_name` is required when calling `search_rules`."
2656
2801
  end
2657
2802
 
2658
- path = '/1/indexes/{indexName}/rules/search'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
2803
+ path = "/1/indexes/{indexName}/rules/search".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
2659
2804
  query_params = {}
2660
2805
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2661
2806
  header_params = {}
@@ -2664,7 +2809,7 @@ module Algolia
2664
2809
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(search_rules_params)
2665
2810
 
2666
2811
  new_options = request_options.merge(
2667
- :operation => :'SearchClient.search_rules',
2812
+ :operation => :"SearchClient.search_rules",
2668
2813
  :header_params => header_params,
2669
2814
  :query_params => query_params,
2670
2815
  :body => post_body,
@@ -2684,7 +2829,7 @@ module Algolia
2684
2829
  # @return [SearchRulesResponse]
2685
2830
  def search_rules(index_name, search_rules_params = nil, request_options = {})
2686
2831
  response = search_rules_with_http_info(index_name, search_rules_params, request_options)
2687
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchRulesResponse')
2832
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::SearchRulesResponse")
2688
2833
  end
2689
2834
 
2690
2835
  # Searches a single index and return matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [&#x60;browse&#x60; operation](#tag/Search/operation/browse) or increase the &#x60;paginatedLimitedTo&#x60; index setting.
@@ -2701,7 +2846,7 @@ module Algolia
2701
2846
  raise ArgumentError, "Parameter `index_name` is required when calling `search_single_index`."
2702
2847
  end
2703
2848
 
2704
- path = '/1/indexes/{indexName}/query'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
2849
+ path = "/1/indexes/{indexName}/query".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
2705
2850
  query_params = {}
2706
2851
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2707
2852
  header_params = {}
@@ -2710,7 +2855,7 @@ module Algolia
2710
2855
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(search_params)
2711
2856
 
2712
2857
  new_options = request_options.merge(
2713
- :operation => :'SearchClient.search_single_index',
2858
+ :operation => :"SearchClient.search_single_index",
2714
2859
  :header_params => header_params,
2715
2860
  :query_params => query_params,
2716
2861
  :body => post_body,
@@ -2730,7 +2875,7 @@ module Algolia
2730
2875
  # @return [SearchResponse]
2731
2876
  def search_single_index(index_name, search_params = nil, request_options = {})
2732
2877
  response = search_single_index_with_http_info(index_name, search_params, request_options)
2733
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchResponse')
2878
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::SearchResponse")
2734
2879
  end
2735
2880
 
2736
2881
  # Searches for synonyms in your index.
@@ -2747,7 +2892,10 @@ module Algolia
2747
2892
  raise ArgumentError, "Parameter `index_name` is required when calling `search_synonyms`."
2748
2893
  end
2749
2894
 
2750
- path = '/1/indexes/{indexName}/synonyms/search'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
2895
+ path = "/1/indexes/{indexName}/synonyms/search".sub(
2896
+ "{" + "indexName" + "}",
2897
+ Transport.encode_uri(index_name.to_s)
2898
+ )
2751
2899
  query_params = {}
2752
2900
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2753
2901
  header_params = {}
@@ -2756,7 +2904,7 @@ module Algolia
2756
2904
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(search_synonyms_params)
2757
2905
 
2758
2906
  new_options = request_options.merge(
2759
- :operation => :'SearchClient.search_synonyms',
2907
+ :operation => :"SearchClient.search_synonyms",
2760
2908
  :header_params => header_params,
2761
2909
  :query_params => query_params,
2762
2910
  :body => post_body,
@@ -2776,7 +2924,7 @@ module Algolia
2776
2924
  # @return [SearchSynonymsResponse]
2777
2925
  def search_synonyms(index_name, search_synonyms_params = nil, request_options = {})
2778
2926
  response = search_synonyms_with_http_info(index_name, search_synonyms_params, request_options)
2779
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchSynonymsResponse')
2927
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::SearchSynonymsResponse")
2780
2928
  end
2781
2929
 
2782
2930
  # Since it can take a few seconds to get the data from the different clusters, the response isn&#39;t real-time. To ensure rapid updates, the user IDs index isn&#39;t built at the same time as the mapping. Instead, it&#39;s built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours).
@@ -2792,7 +2940,7 @@ module Algolia
2792
2940
  raise ArgumentError, "Parameter `search_user_ids_params` is required when calling `search_user_ids`."
2793
2941
  end
2794
2942
 
2795
- path = '/1/clusters/mapping/search'
2943
+ path = "/1/clusters/mapping/search"
2796
2944
  query_params = {}
2797
2945
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2798
2946
  header_params = {}
@@ -2801,7 +2949,7 @@ module Algolia
2801
2949
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(search_user_ids_params)
2802
2950
 
2803
2951
  new_options = request_options.merge(
2804
- :operation => :'SearchClient.search_user_ids',
2952
+ :operation => :"SearchClient.search_user_ids",
2805
2953
  :header_params => header_params,
2806
2954
  :query_params => query_params,
2807
2955
  :body => post_body,
@@ -2820,7 +2968,7 @@ module Algolia
2820
2968
  # @return [SearchUserIdsResponse]
2821
2969
  def search_user_ids(search_user_ids_params, request_options = {})
2822
2970
  response = search_user_ids_with_http_info(search_user_ids_params, request_options)
2823
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchUserIdsResponse')
2971
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::SearchUserIdsResponse")
2824
2972
  end
2825
2973
 
2826
2974
  # Turns standard stop word dictionary entries on or off for a given language.
@@ -2833,10 +2981,13 @@ module Algolia
2833
2981
  def set_dictionary_settings_with_http_info(dictionary_settings_params, request_options = {})
2834
2982
  # verify the required parameter 'dictionary_settings_params' is set
2835
2983
  if @api_client.config.client_side_validation && dictionary_settings_params.nil?
2836
- raise ArgumentError, "Parameter `dictionary_settings_params` is required when calling `set_dictionary_settings`."
2984
+ raise(
2985
+ ArgumentError,
2986
+ "Parameter `dictionary_settings_params` is required when calling `set_dictionary_settings`."
2987
+ )
2837
2988
  end
2838
2989
 
2839
- path = '/1/dictionaries/*/settings'
2990
+ path = "/1/dictionaries/*/settings"
2840
2991
  query_params = {}
2841
2992
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2842
2993
  header_params = {}
@@ -2845,7 +2996,7 @@ module Algolia
2845
2996
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(dictionary_settings_params)
2846
2997
 
2847
2998
  new_options = request_options.merge(
2848
- :operation => :'SearchClient.set_dictionary_settings',
2999
+ :operation => :"SearchClient.set_dictionary_settings",
2849
3000
  :header_params => header_params,
2850
3001
  :query_params => query_params,
2851
3002
  :body => post_body,
@@ -2864,7 +3015,7 @@ module Algolia
2864
3015
  # @return [UpdatedAtResponse]
2865
3016
  def set_dictionary_settings(dictionary_settings_params, request_options = {})
2866
3017
  response = set_dictionary_settings_with_http_info(dictionary_settings_params, request_options)
2867
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
3018
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::UpdatedAtResponse")
2868
3019
  end
2869
3020
 
2870
3021
  # Update the specified index settings. Index settings that you don&#39;t specify are left unchanged. Specify &#x60;null&#x60; to reset a setting to its default value. For best performance, update the index settings before you add new records to your index.
@@ -2886,7 +3037,7 @@ module Algolia
2886
3037
  raise ArgumentError, "Parameter `index_settings` is required when calling `set_settings`."
2887
3038
  end
2888
3039
 
2889
- path = '/1/indexes/{indexName}/settings'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
3040
+ path = "/1/indexes/{indexName}/settings".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
2890
3041
  query_params = {}
2891
3042
  query_params[:forwardToReplicas] = forward_to_replicas unless forward_to_replicas.nil?
2892
3043
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -2896,7 +3047,7 @@ module Algolia
2896
3047
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(index_settings)
2897
3048
 
2898
3049
  new_options = request_options.merge(
2899
- :operation => :'SearchClient.set_settings',
3050
+ :operation => :"SearchClient.set_settings",
2900
3051
  :header_params => header_params,
2901
3052
  :query_params => query_params,
2902
3053
  :body => post_body,
@@ -2917,7 +3068,7 @@ module Algolia
2917
3068
  # @return [UpdatedAtResponse]
2918
3069
  def set_settings(index_name, index_settings, forward_to_replicas = nil, request_options = {})
2919
3070
  response = set_settings_with_http_info(index_name, index_settings, forward_to_replicas, request_options)
2920
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
3071
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::UpdatedAtResponse")
2921
3072
  end
2922
3073
 
2923
3074
  # Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
@@ -2938,7 +3089,7 @@ module Algolia
2938
3089
  raise ArgumentError, "Parameter `api_key` is required when calling `update_api_key`."
2939
3090
  end
2940
3091
 
2941
- path = '/1/keys/{key}'.sub('{' + 'key' + '}', Transport.encode_uri(key.to_s))
3092
+ path = "/1/keys/{key}".sub("{" + "key" + "}", Transport.encode_uri(key.to_s))
2942
3093
  query_params = {}
2943
3094
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2944
3095
  header_params = {}
@@ -2947,7 +3098,7 @@ module Algolia
2947
3098
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(api_key)
2948
3099
 
2949
3100
  new_options = request_options.merge(
2950
- :operation => :'SearchClient.update_api_key',
3101
+ :operation => :"SearchClient.update_api_key",
2951
3102
  :header_params => header_params,
2952
3103
  :query_params => query_params,
2953
3104
  :body => post_body,
@@ -2967,7 +3118,7 @@ module Algolia
2967
3118
  # @return [UpdateApiKeyResponse]
2968
3119
  def update_api_key(key, api_key, request_options = {})
2969
3120
  response = update_api_key_with_http_info(key, api_key, request_options)
2970
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdateApiKeyResponse')
3121
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::UpdateApiKeyResponse")
2971
3122
  end
2972
3123
 
2973
3124
  # Helper: Wait for a task to be published (completed) for a given `index_name` and `task_id`.
@@ -2978,17 +3129,24 @@ module Algolia
2978
3129
  # @param timeout [Proc] the function to decide how long to wait between retries. (optional)
2979
3130
  # @param request_options [Hash] the requestOptions to send along with the query, they will be forwarded to the `get_task` method.
2980
3131
  # @return [Http::Response] the last get_task response
2981
- def wait_for_task(index_name, task_id, max_retries = 50, timeout = ->(retry_count) { [retry_count * 200, 5000].min }, request_options = {})
3132
+ def wait_for_task(
3133
+ index_name,
3134
+ task_id,
3135
+ max_retries = 50,
3136
+ timeout = -> (retry_count) { [retry_count * 200, 5000].min },
3137
+ request_options = {}
3138
+ )
2982
3139
  retries = 0
2983
3140
  while retries < max_retries
2984
3141
  res = get_task(index_name, task_id, request_options)
2985
- if res.status == 'published'
3142
+ if res.status == "published"
2986
3143
  return res
2987
3144
  end
2988
3145
 
2989
3146
  retries += 1
2990
3147
  sleep(timeout.call(retries) / 1000.0)
2991
3148
  end
3149
+
2992
3150
  raise ApiError, "The maximum number of retries exceeded. (#{max_retries})"
2993
3151
  end
2994
3152
 
@@ -2999,17 +3157,23 @@ module Algolia
2999
3157
  # @param timeout [Proc] the function to decide how long to wait between retries. (optional)
3000
3158
  # @param request_options [Hash] the requestOptions to send along with the query, they will be forwarded to the `get_task` method.
3001
3159
  # @return [Http::Response] the last get_task response
3002
- def wait_for_app_task(task_id, max_retries = 50, timeout = ->(retry_count) { [retry_count * 200, 5000].min }, request_options = {})
3160
+ def wait_for_app_task(
3161
+ task_id,
3162
+ max_retries = 50,
3163
+ timeout = -> (retry_count) { [retry_count * 200, 5000].min },
3164
+ request_options = {}
3165
+ )
3003
3166
  retries = 0
3004
3167
  while retries < max_retries
3005
3168
  res = get_app_task(task_id, request_options)
3006
- if res.status == 'published'
3169
+ if res.status == "published"
3007
3170
  return res
3008
3171
  end
3009
3172
 
3010
3173
  retries += 1
3011
3174
  sleep(timeout.call(retries) / 1000.0)
3012
3175
  end
3176
+
3013
3177
  raise ApiError, "The maximum number of retries exceeded. (#{max_retries})"
3014
3178
  end
3015
3179
 
@@ -3022,11 +3186,17 @@ module Algolia
3022
3186
  # @param timeout [Proc] the function to decide how long to wait between retries.
3023
3187
  # @param request_options [Hash] the requestOptions to send along with the query, they will be forwarded to the `getApikey` method and merged with the transporter requestOptions.
3024
3188
  # @return [Http::Response] the last get_api_key response
3025
- def wait_for_api_key(operation, key, api_key = {}, max_retries = 50, timeout = ->(retry_count) { [retry_count * 200, 5000].min }, request_options = {})
3189
+ def wait_for_api_key(
3190
+ operation,
3191
+ key,
3192
+ api_key = {},
3193
+ max_retries = 50,
3194
+ timeout = -> (retry_count) { [retry_count * 200, 5000].min },
3195
+ request_options = {}
3196
+ )
3026
3197
  retries = 0
3027
- if operation == 'update'
3028
- raise ArgumentError, '`api_key` is required when waiting for an `update` operation.' if api_key.nil?
3029
-
3198
+ if operation == "update"
3199
+ raise ArgumentError, "`api_key` is required when waiting for an `update` operation." if api_key.nil?
3030
3200
  while retries < max_retries
3031
3201
  begin
3032
3202
  updatad_key = get_api_key(key, request_options)
@@ -3051,13 +3221,15 @@ module Algolia
3051
3221
  while retries < max_retries
3052
3222
  begin
3053
3223
  res = get_api_key(key, request_options)
3054
- return res if operation == 'add'
3224
+ return res if operation == "add"
3055
3225
  rescue AlgoliaError => e
3056
- return res if operation == 'delete' && e.code == 404
3226
+ return res if operation == "delete" && e.code == 404
3057
3227
  end
3228
+
3058
3229
  retries += 1
3059
3230
  sleep(timeout.call(retries) / 1000.0)
3060
3231
  end
3232
+
3061
3233
  raise ApiError, "The maximum number of retries exceeded. (#{max_retries})"
3062
3234
  end
3063
3235
 
@@ -3078,6 +3250,7 @@ module Algolia
3078
3250
  else
3079
3251
  hits.concat(res.hits)
3080
3252
  end
3253
+
3081
3254
  browse_params.cursor = res.cursor
3082
3255
  break if browse_params.cursor.nil?
3083
3256
  end
@@ -3091,7 +3264,12 @@ module Algolia
3091
3264
  # @param search_rules_params [SearchRulesParams] the parameters to send along with the query, they will be forwarded to the `searchRules` method.
3092
3265
  # @param request_options [Hash] the requestOptions to send along with the query, they will be forwarded to the `searchRules` method.
3093
3266
  # @param block [Proc] the block to execute on each rule of the index.
3094
- def browse_rules(index_name, search_rules_params = Search::SearchRulesParams.new(hits_per_page: 1000, page: 0), request_options = {}, &block)
3267
+ def browse_rules(
3268
+ index_name,
3269
+ search_rules_params = Search::SearchRulesParams.new(hits_per_page: 1000, page: 0),
3270
+ request_options = {},
3271
+ &block
3272
+ )
3095
3273
  rules = []
3096
3274
  loop do
3097
3275
  res = search_rules(index_name, search_rules_params, request_options)
@@ -3102,6 +3280,7 @@ module Algolia
3102
3280
  else
3103
3281
  rules.concat(res.hits)
3104
3282
  end
3283
+
3105
3284
  search_rules_params.page += 1
3106
3285
  break if res.nb_hits < search_rules_params.hits_per_page
3107
3286
  end
@@ -3115,7 +3294,12 @@ module Algolia
3115
3294
  # @param search_synonyms_params [SearchSynonymsParams] the parameters to send along with the query, they will be forwarded to the `searchSynonyms` method.
3116
3295
  # @param request_options [Hash] the requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method.
3117
3296
  # @param block [Proc] the block to execute on each synonym of the index.
3118
- def browse_synonyms(index_name, search_synonyms_params = Search::SearchSynonymsParams.new(hits_per_page: 1000, page: 0), request_options = {}, &block)
3297
+ def browse_synonyms(
3298
+ index_name,
3299
+ search_synonyms_params = Search::SearchSynonymsParams.new(hits_per_page: 1000, page: 0),
3300
+ request_options = {},
3301
+ &block
3302
+ )
3119
3303
  synonyms = []
3120
3304
  loop do
3121
3305
  res = search_synonyms(index_name, search_synonyms_params, request_options)
@@ -3126,6 +3310,7 @@ module Algolia
3126
3310
  else
3127
3311
  synonyms.concat(res.hits)
3128
3312
  end
3313
+
3129
3314
  search_synonyms_params.page += 1
3130
3315
  break if res.nb_hits < search_synonyms_params.hits_per_page
3131
3316
  end
@@ -3149,12 +3334,17 @@ module Algolia
3149
3334
  restrictions.delete(:searchParams)
3150
3335
  end
3151
3336
 
3152
- url_encoded_restrictions = Algolia::Transport.stringify_query_params(restrictions).sort.to_h.map do |key, value|
3153
- "#{key}=#{value}"
3154
- end.join('&')
3337
+ url_encoded_restrictions = Algolia::Transport
3338
+ .stringify_query_params(restrictions)
3339
+ .sort
3340
+ .to_h
3341
+ .map do |key, value|
3342
+ "#{key}=#{value}"
3343
+ end
3344
+ .join("&")
3155
3345
 
3156
- hmac = OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), parent_api_key, url_encoded_restrictions)
3157
- Base64.encode64("#{hmac}#{url_encoded_restrictions}").gsub("\n", '')
3346
+ hmac = OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new("sha256"), parent_api_key, url_encoded_restrictions)
3347
+ Base64.encode64("#{hmac}#{url_encoded_restrictions}").gsub("\n", "")
3158
3348
  end
3159
3349
 
3160
3350
  # Helper: Retrieves the remaining validity of the previous generated `secured_api_key`, the `validUntil` parameter must have been provided.
@@ -3164,13 +3354,13 @@ module Algolia
3164
3354
  # @return [Integer]
3165
3355
  #
3166
3356
  def get_secured_api_key_remaining_validity(secured_api_key)
3167
- now = Time.now.to_i
3357
+ now = Time.now.to_i
3168
3358
  decoded_key = Base64.decode64(secured_api_key)
3169
- regex = 'validUntil=(\d+)'
3170
- matches = decoded_key.match(regex)
3359
+ regex = "validUntil=(\\d+)"
3360
+ matches = decoded_key.match(regex)
3171
3361
 
3172
3362
  if matches.nil?
3173
- raise AlgoliaError, 'The SecuredApiKey doesn\'t have a validUntil parameter.'
3363
+ raise AlgoliaError, "The SecuredApiKey doesn't have a validUntil parameter."
3174
3364
  end
3175
3365
 
3176
3366
  valid_until = matches[1].to_i
@@ -3208,7 +3398,7 @@ module Algolia
3208
3398
  def delete_objects(index_name, object_ids, request_options = {})
3209
3399
  chunked_batch(
3210
3400
  index_name,
3211
- object_ids.map { |id| { "objectID" => id } },
3401
+ object_ids.map { |id| {"objectID" => id} },
3212
3402
  Search::Action::DELETE_OBJECT,
3213
3403
  false,
3214
3404
  1000,
@@ -3247,7 +3437,14 @@ module Algolia
3247
3437
  #
3248
3438
  # @return [Array<BatchResponse>]
3249
3439
  #
3250
- def chunked_batch(index_name, objects, action = Action::ADD_OBJECT, wait_for_tasks = false, batch_size = 1000, request_options = {})
3440
+ def chunked_batch(
3441
+ index_name,
3442
+ objects,
3443
+ action = Action::ADD_OBJECT,
3444
+ wait_for_tasks = false,
3445
+ batch_size = 1000,
3446
+ request_options = {}
3447
+ )
3251
3448
  responses = []
3252
3449
  objects.each_slice(batch_size) do |chunk|
3253
3450
  requests = chunk.map do |object|
@@ -3275,7 +3472,7 @@ module Algolia
3275
3472
  #
3276
3473
  # @return [Array<ReplaceAllObjectsResponse>]
3277
3474
  def replace_all_objects(index_name, objects, batch_size = 1000, request_options = {})
3278
- tmp_index_name = index_name + '_tmp_' + rand(10_000_000).to_s
3475
+ tmp_index_name = index_name + "_tmp_" + rand(10_000_000).to_s
3279
3476
 
3280
3477
  copy_operation_response = operation_index(
3281
3478
  index_name,
@@ -3284,8 +3481,8 @@ module Algolia
3284
3481
  destination: tmp_index_name,
3285
3482
  scope: [
3286
3483
  Search::ScopeType::SETTINGS,
3287
- Search::ScopeType::SYNONYMS,
3288
- Search::ScopeType::RULES
3484
+ Search::ScopeType::RULES,
3485
+ Search::ScopeType::SYNONYMS
3289
3486
  ]
3290
3487
  ),
3291
3488
  request_options
@@ -3309,8 +3506,8 @@ module Algolia
3309
3506
  destination: tmp_index_name,
3310
3507
  scope: [
3311
3508
  Search::ScopeType::SETTINGS,
3312
- Search::ScopeType::SYNONYMS,
3313
- Search::ScopeType::RULES
3509
+ Search::ScopeType::RULES,
3510
+ Search::ScopeType::SYNONYMS
3314
3511
  ]
3315
3512
  ),
3316
3513
  request_options