algolia 3.0.0.alpha.5 → 3.0.0.alpha.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/Gemfile.lock +12 -12
- data/algolia.gemspec +2 -1
- data/lib/algolia/api/abtesting_client.rb +9 -9
- data/lib/algolia/api/analytics_client.rb +21 -21
- data/lib/algolia/api/ingestion_client.rb +37 -37
- data/lib/algolia/api/insights_client.rb +5 -5
- data/lib/algolia/api/monitoring_client.rb +14 -20
- data/lib/algolia/api/personalization_client.rb +8 -8
- data/lib/algolia/api/query_suggestions_client.rb +11 -11
- data/lib/algolia/api/recommend_client.rb +11 -12
- data/lib/algolia/api/search_client.rb +175 -118
- data/lib/algolia/api_client.rb +2 -1
- data/lib/algolia/models/abtesting/ab_test.rb +7 -3
- data/lib/algolia/models/abtesting/ab_test_response.rb +7 -3
- data/lib/algolia/models/abtesting/ab_tests_variant.rb +7 -3
- data/lib/algolia/models/abtesting/ab_tests_variant_search_params.rb +7 -3
- data/lib/algolia/models/abtesting/add_ab_tests_request.rb +7 -3
- data/lib/algolia/models/abtesting/add_ab_tests_variant.rb +1 -1
- data/lib/algolia/models/abtesting/currencies_value.rb +7 -3
- data/lib/algolia/models/abtesting/custom_search_params.rb +7 -3
- data/lib/algolia/models/abtesting/error_base.rb +13 -4
- data/lib/algolia/models/abtesting/filter_effects.rb +7 -3
- data/lib/algolia/models/abtesting/filter_effects_empty_search.rb +7 -3
- data/lib/algolia/models/abtesting/filter_effects_outliers.rb +7 -3
- data/lib/algolia/models/abtesting/list_ab_tests_response.rb +7 -3
- data/lib/algolia/models/abtesting/variant.rb +23 -7
- data/lib/algolia/models/analytics/average_click_event.rb +7 -3
- data/lib/algolia/models/analytics/click_position.rb +7 -3
- data/lib/algolia/models/analytics/click_through_rate_event.rb +7 -3
- data/lib/algolia/models/analytics/conversion_rate_event.rb +7 -3
- data/lib/algolia/models/analytics/error_base.rb +13 -4
- data/lib/algolia/models/analytics/get_average_click_position_response.rb +7 -3
- data/lib/algolia/models/analytics/get_click_positions_response.rb +7 -3
- data/lib/algolia/models/analytics/get_click_through_rate_response.rb +7 -3
- data/lib/algolia/models/analytics/get_conversation_rate_response.rb +7 -3
- data/lib/algolia/models/analytics/get_no_click_rate_response.rb +7 -3
- data/lib/algolia/models/analytics/get_no_results_rate_response.rb +7 -3
- data/lib/algolia/models/analytics/get_searches_count_response.rb +7 -3
- data/lib/algolia/models/analytics/get_searches_no_clicks_response.rb +7 -3
- data/lib/algolia/models/analytics/get_searches_no_results_response.rb +7 -3
- data/lib/algolia/models/analytics/get_status_response.rb +7 -3
- data/lib/algolia/models/analytics/get_top_countries_response.rb +7 -3
- data/lib/algolia/models/analytics/get_top_filter_attribute.rb +7 -3
- data/lib/algolia/models/analytics/get_top_filter_attributes_response.rb +7 -3
- data/lib/algolia/models/analytics/get_top_filter_for_attribute.rb +7 -3
- data/lib/algolia/models/analytics/get_top_filter_for_attribute_response.rb +7 -3
- data/lib/algolia/models/analytics/get_top_filters_no_results_response.rb +7 -3
- data/lib/algolia/models/analytics/get_top_filters_no_results_value.rb +7 -3
- data/lib/algolia/models/analytics/get_top_filters_no_results_values.rb +7 -3
- data/lib/algolia/models/analytics/get_top_hits_response.rb +1 -1
- data/lib/algolia/models/analytics/get_top_searches_response.rb +1 -1
- data/lib/algolia/models/analytics/get_users_count_response.rb +7 -3
- data/lib/algolia/models/analytics/no_click_rate_event.rb +7 -3
- data/lib/algolia/models/analytics/no_results_rate_event.rb +7 -3
- data/lib/algolia/models/analytics/search_event.rb +7 -3
- data/lib/algolia/models/analytics/search_no_click_event.rb +7 -3
- data/lib/algolia/models/analytics/search_no_result_event.rb +7 -3
- data/lib/algolia/models/analytics/top_country.rb +7 -3
- data/lib/algolia/models/analytics/top_hit.rb +7 -3
- data/lib/algolia/models/analytics/top_hit_with_analytics.rb +7 -3
- data/lib/algolia/models/analytics/top_hits_response.rb +7 -3
- data/lib/algolia/models/analytics/top_hits_response_with_analytics.rb +7 -3
- data/lib/algolia/models/analytics/top_search.rb +7 -3
- data/lib/algolia/models/analytics/top_search_with_analytics.rb +7 -3
- data/lib/algolia/models/analytics/top_searches_response.rb +7 -3
- data/lib/algolia/models/analytics/top_searches_response_with_analytics.rb +7 -3
- data/lib/algolia/models/analytics/user_with_date.rb +7 -3
- data/lib/algolia/models/ingestion/auth_algolia.rb +7 -3
- data/lib/algolia/models/ingestion/auth_algolia_partial.rb +7 -3
- data/lib/algolia/models/ingestion/auth_api_key.rb +7 -3
- data/lib/algolia/models/ingestion/auth_api_key_partial.rb +7 -3
- data/lib/algolia/models/ingestion/auth_basic.rb +7 -3
- data/lib/algolia/models/ingestion/auth_basic_partial.rb +7 -3
- data/lib/algolia/models/ingestion/auth_google_service_account.rb +7 -3
- data/lib/algolia/models/ingestion/auth_google_service_account_partial.rb +7 -3
- data/lib/algolia/models/ingestion/auth_input.rb +1 -1
- data/lib/algolia/models/ingestion/auth_input_partial.rb +1 -1
- data/lib/algolia/models/ingestion/auth_o_auth.rb +7 -3
- data/lib/algolia/models/ingestion/auth_o_auth_partial.rb +7 -3
- data/lib/algolia/models/ingestion/authentication.rb +7 -3
- data/lib/algolia/models/ingestion/authentication_create.rb +7 -3
- data/lib/algolia/models/ingestion/authentication_create_response.rb +7 -3
- data/lib/algolia/models/ingestion/authentication_search.rb +7 -3
- data/lib/algolia/models/ingestion/authentication_update.rb +7 -3
- data/lib/algolia/models/ingestion/authentication_update_response.rb +7 -3
- data/lib/algolia/models/ingestion/big_commerce_channel.rb +7 -3
- data/lib/algolia/models/ingestion/big_commerce_metafield.rb +7 -3
- data/lib/algolia/models/ingestion/delete_response.rb +7 -3
- data/lib/algolia/models/ingestion/destination.rb +7 -3
- data/lib/algolia/models/ingestion/destination_create.rb +7 -3
- data/lib/algolia/models/ingestion/destination_create_response.rb +7 -3
- data/lib/algolia/models/ingestion/destination_index_name.rb +7 -3
- data/lib/algolia/models/ingestion/destination_index_prefix.rb +7 -3
- data/lib/algolia/models/ingestion/destination_input.rb +1 -1
- data/lib/algolia/models/ingestion/destination_search.rb +7 -3
- data/lib/algolia/models/ingestion/destination_update.rb +7 -3
- data/lib/algolia/models/ingestion/destination_update_response.rb +7 -3
- data/lib/algolia/models/ingestion/docker_source_discover.rb +7 -3
- data/lib/algolia/models/ingestion/docker_source_streams.rb +7 -3
- data/lib/algolia/models/ingestion/error_base.rb +13 -4
- data/lib/algolia/models/ingestion/event.rb +7 -3
- data/lib/algolia/models/ingestion/list_authentications_response.rb +7 -3
- data/lib/algolia/models/ingestion/list_destinations_response.rb +7 -3
- data/lib/algolia/models/ingestion/list_events_response.rb +7 -3
- data/lib/algolia/models/ingestion/list_sources_response.rb +7 -3
- data/lib/algolia/models/ingestion/list_tasks_response.rb +7 -3
- data/lib/algolia/models/ingestion/on_demand_date_utils_input.rb +7 -3
- data/lib/algolia/models/ingestion/on_demand_trigger.rb +7 -3
- data/lib/algolia/models/ingestion/on_demand_trigger_input.rb +7 -3
- data/lib/algolia/models/ingestion/pagination.rb +7 -3
- data/lib/algolia/models/ingestion/platform_with_none.rb +1 -1
- data/lib/algolia/models/ingestion/run.rb +7 -3
- data/lib/algolia/models/ingestion/run_list_response.rb +7 -3
- data/lib/algolia/models/ingestion/run_progress.rb +7 -3
- data/lib/algolia/models/ingestion/run_response.rb +7 -3
- data/lib/algolia/models/ingestion/schedule_date_utils_input.rb +7 -3
- data/lib/algolia/models/ingestion/schedule_trigger.rb +7 -3
- data/lib/algolia/models/ingestion/schedule_trigger_input.rb +7 -3
- data/lib/algolia/models/ingestion/source.rb +7 -3
- data/lib/algolia/models/ingestion/source_big_commerce.rb +7 -3
- data/lib/algolia/models/ingestion/source_big_query.rb +7 -3
- data/lib/algolia/models/ingestion/source_commercetools.rb +7 -3
- data/lib/algolia/models/ingestion/source_create.rb +7 -3
- data/lib/algolia/models/ingestion/source_create_response.rb +7 -3
- data/lib/algolia/models/ingestion/source_csv.rb +7 -3
- data/lib/algolia/models/ingestion/source_docker.rb +7 -3
- data/lib/algolia/models/ingestion/source_input.rb +1 -1
- data/lib/algolia/models/ingestion/source_json.rb +7 -3
- data/lib/algolia/models/ingestion/source_search.rb +7 -3
- data/lib/algolia/models/ingestion/source_update.rb +7 -3
- data/lib/algolia/models/ingestion/source_update_commercetools.rb +7 -3
- data/lib/algolia/models/ingestion/source_update_docker.rb +7 -3
- data/lib/algolia/models/ingestion/source_update_input.rb +1 -1
- data/lib/algolia/models/ingestion/source_update_response.rb +7 -3
- data/lib/algolia/models/ingestion/subscription_trigger.rb +7 -3
- data/lib/algolia/models/ingestion/task.rb +7 -3
- data/lib/algolia/models/ingestion/task_create.rb +7 -3
- data/lib/algolia/models/ingestion/task_create_response.rb +7 -3
- data/lib/algolia/models/ingestion/task_create_trigger.rb +1 -1
- data/lib/algolia/models/ingestion/task_input.rb +1 -1
- data/lib/algolia/models/ingestion/task_search.rb +7 -3
- data/lib/algolia/models/ingestion/task_update.rb +7 -3
- data/lib/algolia/models/ingestion/task_update_response.rb +7 -3
- data/lib/algolia/models/ingestion/trigger.rb +1 -1
- data/lib/algolia/models/ingestion/trigger_update_input.rb +7 -3
- data/lib/algolia/models/ingestion/window.rb +7 -3
- data/lib/algolia/models/insights/added_to_cart_object_ids.rb +7 -3
- data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +7 -3
- data/lib/algolia/models/insights/clicked_filters.rb +7 -3
- data/lib/algolia/models/insights/clicked_object_ids.rb +7 -3
- data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +7 -3
- data/lib/algolia/models/insights/converted_filters.rb +7 -3
- data/lib/algolia/models/insights/converted_object_ids.rb +7 -3
- data/lib/algolia/models/insights/converted_object_ids_after_search.rb +7 -3
- data/lib/algolia/models/insights/discount.rb +1 -1
- data/lib/algolia/models/insights/error_base.rb +13 -4
- data/lib/algolia/models/insights/events_items.rb +1 -1
- data/lib/algolia/models/insights/events_response.rb +7 -3
- data/lib/algolia/models/insights/insights_events.rb +7 -3
- data/lib/algolia/models/insights/object_data.rb +7 -3
- data/lib/algolia/models/insights/object_data_after_search.rb +7 -3
- data/lib/algolia/models/insights/price.rb +1 -1
- data/lib/algolia/models/insights/purchased_object_ids.rb +7 -3
- data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +7 -3
- data/lib/algolia/models/insights/value.rb +1 -1
- data/lib/algolia/models/insights/viewed_filters.rb +7 -3
- data/lib/algolia/models/insights/viewed_object_ids.rb +7 -3
- data/lib/algolia/models/monitoring/error_base.rb +13 -4
- data/lib/algolia/models/monitoring/get_inventory403_response.rb +7 -3
- data/lib/algolia/models/monitoring/incident.rb +7 -3
- data/lib/algolia/models/monitoring/incidents_inner.rb +7 -3
- data/lib/algolia/models/monitoring/incidents_response.rb +7 -3
- data/lib/algolia/models/monitoring/indexing_time_response.rb +7 -3
- data/lib/algolia/models/monitoring/indexing_time_response_metrics.rb +7 -3
- data/lib/algolia/models/monitoring/infrastructure_response.rb +7 -3
- data/lib/algolia/models/monitoring/infrastructure_response_metrics.rb +7 -3
- data/lib/algolia/models/monitoring/inventory_response.rb +7 -3
- data/lib/algolia/models/monitoring/latency_response.rb +7 -3
- data/lib/algolia/models/monitoring/latency_response_metrics.rb +7 -3
- data/lib/algolia/models/monitoring/probes_metric.rb +7 -3
- data/lib/algolia/models/monitoring/server.rb +7 -3
- data/lib/algolia/models/monitoring/status_response.rb +7 -3
- data/lib/algolia/models/monitoring/time_inner.rb +7 -3
- data/lib/algolia/models/personalization/delete_user_profile_response.rb +7 -3
- data/lib/algolia/models/personalization/error_base.rb +13 -4
- data/lib/algolia/models/personalization/event_scoring.rb +7 -3
- data/lib/algolia/models/personalization/facet_scoring.rb +7 -3
- data/lib/algolia/models/personalization/get_user_token_response.rb +7 -3
- data/lib/algolia/models/personalization/personalization_strategy_params.rb +7 -3
- data/lib/algolia/models/personalization/set_personalization_strategy_response.rb +7 -3
- data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_response.rb +7 -3
- data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_with_index.rb +7 -3
- data/lib/algolia/models/query-suggestions/base_response.rb +7 -3
- data/lib/algolia/models/query-suggestions/error_base.rb +13 -4
- data/lib/algolia/models/query-suggestions/facet.rb +7 -3
- data/lib/algolia/models/query-suggestions/get_config_status200_response.rb +7 -3
- data/lib/algolia/models/query-suggestions/get_log_file200_response.rb +7 -3
- data/lib/algolia/models/query-suggestions/languages.rb +1 -1
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration.rb +7 -3
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +7 -3
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration_with_index.rb +7 -3
- data/lib/algolia/models/query-suggestions/source_index.rb +7 -3
- data/lib/algolia/models/recommend/around_precision.rb +1 -1
- data/lib/algolia/models/recommend/around_precision_from_value_inner.rb +7 -3
- data/lib/algolia/models/recommend/around_radius.rb +1 -1
- data/lib/algolia/models/recommend/automatic_facet_filter.rb +7 -3
- data/lib/algolia/models/recommend/automatic_facet_filters.rb +1 -1
- data/lib/algolia/models/recommend/base_recommend_request.rb +7 -3
- data/lib/algolia/models/recommend/base_recommendations_query.rb +7 -3
- data/lib/algolia/models/recommend/base_recommended_for_you_query.rb +7 -3
- data/lib/algolia/models/recommend/base_recommended_for_you_query_parameters.rb +7 -3
- data/lib/algolia/models/recommend/base_search_params.rb +7 -3
- data/lib/algolia/models/recommend/base_search_params_without_query.rb +7 -3
- data/lib/algolia/models/recommend/base_search_response.rb +13 -4
- data/lib/algolia/models/recommend/base_trending_facets_query.rb +7 -3
- data/lib/algolia/models/recommend/base_trending_items_query.rb +7 -3
- data/lib/algolia/models/recommend/condition.rb +7 -3
- data/lib/algolia/models/recommend/consequence.rb +7 -3
- data/lib/algolia/models/recommend/consequence_hide.rb +7 -3
- data/lib/algolia/models/recommend/consequence_params.rb +7 -3
- data/lib/algolia/models/recommend/consequence_query.rb +1 -1
- data/lib/algolia/models/recommend/consequence_query_object.rb +7 -3
- data/lib/algolia/models/recommend/deleted_at_response.rb +7 -3
- data/lib/algolia/models/recommend/distinct.rb +1 -1
- data/lib/algolia/models/recommend/edit.rb +7 -3
- data/lib/algolia/models/recommend/error_base.rb +13 -4
- data/lib/algolia/models/recommend/exhaustive.rb +7 -3
- data/lib/algolia/models/recommend/facet_filters.rb +1 -1
- data/lib/algolia/models/recommend/facet_ordering.rb +7 -3
- data/lib/algolia/models/recommend/facets.rb +7 -3
- data/lib/algolia/models/recommend/facets_stats.rb +7 -3
- data/lib/algolia/models/recommend/get_recommend_task_response.rb +7 -3
- data/lib/algolia/models/recommend/get_recommendations_params.rb +7 -3
- data/lib/algolia/models/recommend/get_recommendations_response.rb +7 -3
- data/lib/algolia/models/recommend/highlight_result.rb +1 -1
- data/lib/algolia/models/recommend/highlight_result_option.rb +7 -3
- data/lib/algolia/models/recommend/ignore_plurals.rb +1 -1
- data/lib/algolia/models/recommend/index_settings_as_search_params.rb +7 -3
- data/lib/algolia/models/recommend/matched_geo_location.rb +7 -3
- data/lib/algolia/models/recommend/mixed_search_filters.rb +1 -1
- data/lib/algolia/models/recommend/numeric_filters.rb +1 -1
- data/lib/algolia/models/recommend/optional_filters.rb +1 -1
- data/lib/algolia/models/recommend/params.rb +7 -3
- data/lib/algolia/models/recommend/personalization.rb +7 -3
- data/lib/algolia/models/recommend/promote.rb +1 -1
- data/lib/algolia/models/recommend/promote_object_id.rb +7 -3
- data/lib/algolia/models/recommend/promote_object_ids.rb +7 -3
- data/lib/algolia/models/recommend/ranking_info.rb +7 -3
- data/lib/algolia/models/recommend/re_ranking_apply_filter.rb +1 -1
- data/lib/algolia/models/recommend/recommend_hit.rb +13 -4
- data/lib/algolia/models/recommend/recommendations_hit.rb +1 -1
- data/lib/algolia/models/recommend/recommendations_hits.rb +7 -3
- data/lib/algolia/models/recommend/recommendations_query.rb +7 -3
- data/lib/algolia/models/recommend/recommendations_request.rb +1 -1
- data/lib/algolia/models/recommend/recommendations_results.rb +7 -3
- data/lib/algolia/models/recommend/recommended_for_you_query.rb +7 -3
- data/lib/algolia/models/recommend/recommended_for_you_query_parameters.rb +7 -3
- data/lib/algolia/models/recommend/redirect.rb +7 -3
- data/lib/algolia/models/recommend/redirect_rule_index_metadata.rb +7 -3
- data/lib/algolia/models/recommend/redirect_rule_index_metadata_data.rb +7 -3
- data/lib/algolia/models/recommend/remove_stop_words.rb +1 -1
- data/lib/algolia/models/recommend/rendering_content.rb +7 -3
- data/lib/algolia/models/recommend/rule_response.rb +7 -3
- data/lib/algolia/models/recommend/rule_response_metadata.rb +7 -3
- data/lib/algolia/models/recommend/search_params_object.rb +7 -3
- data/lib/algolia/models/recommend/search_params_query.rb +7 -3
- data/lib/algolia/models/recommend/search_recommend_rules_params.rb +7 -3
- data/lib/algolia/models/recommend/search_recommend_rules_response.rb +7 -3
- data/lib/algolia/models/recommend/semantic_search.rb +7 -3
- data/lib/algolia/models/recommend/snippet_result.rb +1 -1
- data/lib/algolia/models/recommend/snippet_result_option.rb +7 -3
- data/lib/algolia/models/recommend/tag_filters.rb +1 -1
- data/lib/algolia/models/recommend/trending_facet_hit.rb +7 -3
- data/lib/algolia/models/recommend/trending_facets_query.rb +7 -3
- data/lib/algolia/models/recommend/trending_items_query.rb +7 -3
- data/lib/algolia/models/recommend/typo_tolerance.rb +1 -1
- data/lib/algolia/models/recommend/value.rb +7 -3
- data/lib/algolia/models/search/add_api_key_response.rb +7 -3
- data/lib/algolia/models/search/api_key.rb +7 -3
- data/lib/algolia/models/search/around_precision.rb +1 -1
- data/lib/algolia/models/search/around_precision_from_value_inner.rb +7 -3
- data/lib/algolia/models/search/around_radius.rb +1 -1
- data/lib/algolia/models/search/assign_user_id_params.rb +7 -3
- data/lib/algolia/models/search/attribute_to_update.rb +1 -1
- data/lib/algolia/models/search/automatic_facet_filter.rb +7 -3
- data/lib/algolia/models/search/automatic_facet_filters.rb +1 -1
- data/lib/algolia/models/search/base_get_api_key_response.rb +7 -3
- data/lib/algolia/models/search/base_index_settings.rb +7 -3
- data/lib/algolia/models/search/base_search_params.rb +7 -3
- data/lib/algolia/models/search/base_search_params_without_query.rb +7 -3
- data/lib/algolia/models/search/base_search_response.rb +13 -4
- data/lib/algolia/models/search/batch_assign_user_ids_params.rb +7 -3
- data/lib/algolia/models/search/batch_dictionary_entries_params.rb +7 -3
- data/lib/algolia/models/search/batch_dictionary_entries_request.rb +7 -3
- data/lib/algolia/models/search/batch_params.rb +7 -3
- data/lib/algolia/models/search/batch_request.rb +7 -3
- data/lib/algolia/models/search/batch_response.rb +7 -3
- data/lib/algolia/models/search/batch_write_params.rb +7 -3
- data/lib/algolia/models/search/browse_params.rb +1 -1
- data/lib/algolia/models/search/browse_params_object.rb +7 -3
- data/lib/algolia/models/search/browse_response.rb +7 -3
- data/lib/algolia/models/search/built_in_operation.rb +7 -3
- data/lib/algolia/models/search/condition.rb +7 -3
- data/lib/algolia/models/search/consequence.rb +7 -3
- data/lib/algolia/models/search/consequence_hide.rb +7 -3
- data/lib/algolia/models/search/consequence_params.rb +7 -3
- data/lib/algolia/models/search/consequence_query.rb +1 -1
- data/lib/algolia/models/search/consequence_query_object.rb +7 -3
- data/lib/algolia/models/search/created_at_response.rb +7 -3
- data/lib/algolia/models/search/cursor.rb +7 -3
- data/lib/algolia/models/search/delete_api_key_response.rb +7 -3
- data/lib/algolia/models/search/delete_by_params.rb +7 -3
- data/lib/algolia/models/search/delete_source_response.rb +7 -3
- data/lib/algolia/models/search/deleted_at_response.rb +7 -3
- data/lib/algolia/models/search/dictionary_entry.rb +13 -4
- data/lib/algolia/models/search/dictionary_language.rb +7 -3
- data/lib/algolia/models/search/dictionary_settings_params.rb +7 -3
- data/lib/algolia/models/search/distinct.rb +1 -1
- data/lib/algolia/models/search/edit.rb +7 -3
- data/lib/algolia/models/search/error_base.rb +13 -4
- data/lib/algolia/models/search/exhaustive.rb +7 -3
- data/lib/algolia/models/search/facet_filters.rb +1 -1
- data/lib/algolia/models/search/facet_hits.rb +7 -3
- data/lib/algolia/models/search/facet_ordering.rb +7 -3
- data/lib/algolia/models/search/facets.rb +7 -3
- data/lib/algolia/models/search/facets_stats.rb +7 -3
- data/lib/algolia/models/search/fetched_index.rb +7 -3
- data/lib/algolia/models/search/get_api_key_response.rb +7 -3
- data/lib/algolia/models/search/get_dictionary_settings_response.rb +7 -3
- data/lib/algolia/models/search/get_logs_response.rb +7 -3
- data/lib/algolia/models/search/get_objects_params.rb +7 -3
- data/lib/algolia/models/search/get_objects_request.rb +7 -3
- data/lib/algolia/models/search/get_objects_response.rb +7 -3
- data/lib/algolia/models/search/get_task_response.rb +7 -3
- data/lib/algolia/models/search/get_top_user_ids_response.rb +7 -3
- data/lib/algolia/models/search/has_pending_mappings_response.rb +7 -3
- data/lib/algolia/models/search/highlight_result.rb +1 -1
- data/lib/algolia/models/search/highlight_result_option.rb +7 -3
- data/lib/algolia/models/search/hit.rb +13 -4
- data/lib/algolia/models/search/ignore_plurals.rb +1 -1
- data/lib/algolia/models/search/index_settings.rb +7 -3
- data/lib/algolia/models/search/index_settings_as_search_params.rb +7 -3
- data/lib/algolia/models/search/languages.rb +7 -3
- data/lib/algolia/models/search/list_api_keys_response.rb +7 -3
- data/lib/algolia/models/search/list_clusters_response.rb +7 -3
- data/lib/algolia/models/search/list_indices_response.rb +7 -3
- data/lib/algolia/models/search/list_user_ids_response.rb +7 -3
- data/lib/algolia/models/search/log.rb +7 -3
- data/lib/algolia/models/search/log_query.rb +7 -3
- data/lib/algolia/models/search/matched_geo_location.rb +7 -3
- data/lib/algolia/models/search/mixed_search_filters.rb +1 -1
- data/lib/algolia/models/search/multiple_batch_request.rb +7 -3
- data/lib/algolia/models/search/multiple_batch_response.rb +7 -3
- data/lib/algolia/models/search/numeric_filters.rb +1 -1
- data/lib/algolia/models/search/operation_index_params.rb +7 -3
- data/lib/algolia/models/search/optional_filters.rb +1 -1
- data/lib/algolia/models/search/params.rb +7 -3
- data/lib/algolia/models/search/personalization.rb +7 -3
- data/lib/algolia/models/search/promote.rb +1 -1
- data/lib/algolia/models/search/promote_object_id.rb +7 -3
- data/lib/algolia/models/search/promote_object_ids.rb +7 -3
- data/lib/algolia/models/search/ranking_info.rb +7 -3
- data/lib/algolia/models/search/re_ranking_apply_filter.rb +1 -1
- data/lib/algolia/models/search/redirect.rb +7 -3
- data/lib/algolia/models/search/redirect_rule_index_metadata.rb +7 -3
- data/lib/algolia/models/search/redirect_rule_index_metadata_data.rb +7 -3
- data/lib/algolia/models/search/remove_stop_words.rb +1 -1
- data/lib/algolia/models/search/remove_user_id_response.rb +7 -3
- data/lib/algolia/models/search/rendering_content.rb +7 -3
- data/lib/algolia/models/search/replace_source_response.rb +7 -3
- data/lib/algolia/models/search/rule.rb +7 -3
- data/lib/algolia/models/search/save_object_response.rb +7 -3
- data/lib/algolia/models/search/save_synonym_response.rb +7 -3
- data/lib/algolia/models/search/search_dictionary_entries_params.rb +7 -3
- data/lib/algolia/models/search/search_for_facet_values_request.rb +7 -3
- data/lib/algolia/models/search/search_for_facet_values_response.rb +7 -3
- data/lib/algolia/models/search/search_for_facets.rb +7 -3
- data/lib/algolia/models/search/search_for_facets_options.rb +7 -3
- data/lib/algolia/models/search/search_for_hits.rb +7 -3
- data/lib/algolia/models/search/search_for_hits_options.rb +7 -3
- data/lib/algolia/models/search/search_hits.rb +13 -4
- data/lib/algolia/models/search/search_method_params.rb +7 -3
- data/lib/algolia/models/search/search_params.rb +1 -1
- data/lib/algolia/models/search/search_params_object.rb +7 -3
- data/lib/algolia/models/search/search_params_query.rb +7 -3
- data/lib/algolia/models/search/search_params_string.rb +7 -3
- data/lib/algolia/models/search/search_query.rb +1 -1
- data/lib/algolia/models/search/search_response.rb +13 -4
- data/lib/algolia/models/search/search_responses.rb +7 -3
- data/lib/algolia/models/search/search_result.rb +1 -1
- data/lib/algolia/models/search/search_rules_params.rb +7 -3
- data/lib/algolia/models/search/search_rules_response.rb +7 -3
- data/lib/algolia/models/search/search_synonyms_params.rb +80 -7
- data/lib/algolia/models/search/search_synonyms_response.rb +13 -4
- data/lib/algolia/models/search/search_user_ids_params.rb +7 -3
- data/lib/algolia/models/search/search_user_ids_response.rb +7 -3
- data/lib/algolia/models/search/semantic_search.rb +7 -3
- data/lib/algolia/models/search/snippet_result.rb +1 -1
- data/lib/algolia/models/search/snippet_result_option.rb +7 -3
- data/lib/algolia/models/search/source.rb +7 -3
- data/lib/algolia/models/search/standard_entries.rb +7 -3
- data/lib/algolia/models/search/synonym_hit.rb +7 -3
- data/lib/algolia/models/search/tag_filters.rb +1 -1
- data/lib/algolia/models/search/time_range.rb +7 -3
- data/lib/algolia/models/search/typo_tolerance.rb +1 -1
- data/lib/algolia/models/search/update_api_key_response.rb +7 -3
- data/lib/algolia/models/search/updated_at_response.rb +7 -3
- data/lib/algolia/models/search/updated_at_with_object_id_response.rb +7 -3
- data/lib/algolia/models/search/updated_rule_response.rb +7 -3
- data/lib/algolia/models/search/user_highlight_result.rb +7 -3
- data/lib/algolia/models/search/user_hit.rb +7 -3
- data/lib/algolia/models/search/user_id.rb +7 -3
- data/lib/algolia/models/search/value.rb +7 -3
- data/lib/algolia/transport/transport.rb +3 -3
- data/lib/algolia/version.rb +1 -1
- metadata +2 -2
@@ -14,7 +14,6 @@ module Algolia
|
|
14
14
|
|
15
15
|
def self.create(app_id, api_key, opts = {})
|
16
16
|
hosts = []
|
17
|
-
|
18
17
|
hosts << Transport::StatefulHost.new("#{app_id}-dsn.algolia.net", accept: CallType::READ)
|
19
18
|
hosts << Transport::StatefulHost.new("#{app_id}.algolia.net", accept: CallType::WRITE)
|
20
19
|
|
@@ -67,7 +66,7 @@ module Algolia
|
|
67
66
|
# @return [AddApiKeyResponse]
|
68
67
|
def add_api_key(api_key, request_options = {})
|
69
68
|
response = add_api_key_with_http_info(api_key, request_options)
|
70
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::AddApiKeyResponse')
|
69
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::AddApiKeyResponse')
|
71
70
|
end
|
72
71
|
|
73
72
|
# Add or update a record (using objectID).
|
@@ -120,7 +119,7 @@ module Algolia
|
|
120
119
|
# @return [UpdatedAtWithObjectIdResponse]
|
121
120
|
def add_or_update_object(index_name, object_id, body, request_options = {})
|
122
121
|
response = add_or_update_object_with_http_info(index_name, object_id, body, request_options)
|
123
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtWithObjectIdResponse')
|
122
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtWithObjectIdResponse')
|
124
123
|
end
|
125
124
|
|
126
125
|
# Add a source.
|
@@ -160,7 +159,7 @@ module Algolia
|
|
160
159
|
# @return [CreatedAtResponse]
|
161
160
|
def append_source(source, request_options = {})
|
162
161
|
response = append_source_with_http_info(source, request_options)
|
163
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::CreatedAtResponse')
|
162
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::CreatedAtResponse')
|
164
163
|
end
|
165
164
|
|
166
165
|
# Assign or move a user ID.
|
@@ -213,7 +212,7 @@ module Algolia
|
|
213
212
|
# @return [CreatedAtResponse]
|
214
213
|
def assign_user_id(x_algolia_user_id, assign_user_id_params, request_options = {})
|
215
214
|
response = assign_user_id_with_http_info(x_algolia_user_id, assign_user_id_params, request_options)
|
216
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::CreatedAtResponse')
|
215
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::CreatedAtResponse')
|
217
216
|
end
|
218
217
|
|
219
218
|
# Batch write operations on one index.
|
@@ -259,7 +258,7 @@ module Algolia
|
|
259
258
|
# @return [BatchResponse]
|
260
259
|
def batch(index_name, batch_write_params, request_options = {})
|
261
260
|
response = batch_with_http_info(index_name, batch_write_params, request_options)
|
262
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::BatchResponse')
|
261
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::BatchResponse')
|
263
262
|
end
|
264
263
|
|
265
264
|
# Batch assign userIDs.
|
@@ -312,7 +311,7 @@ module Algolia
|
|
312
311
|
# @return [CreatedAtResponse]
|
313
312
|
def batch_assign_user_ids(x_algolia_user_id, batch_assign_user_ids_params, request_options = {})
|
314
313
|
response = batch_assign_user_ids_with_http_info(x_algolia_user_id, batch_assign_user_ids_params, request_options)
|
315
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::CreatedAtResponse')
|
314
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::CreatedAtResponse')
|
316
315
|
end
|
317
316
|
|
318
317
|
# Batch dictionary entries.
|
@@ -358,7 +357,7 @@ module Algolia
|
|
358
357
|
# @return [UpdatedAtResponse]
|
359
358
|
def batch_dictionary_entries(dictionary_name, batch_dictionary_entries_params, request_options = {})
|
360
359
|
response = batch_dictionary_entries_with_http_info(dictionary_name, batch_dictionary_entries_params, request_options)
|
361
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
360
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
362
361
|
end
|
363
362
|
|
364
363
|
# Get all records from an index.
|
@@ -400,24 +399,22 @@ module Algolia
|
|
400
399
|
# @return [BrowseResponse]
|
401
400
|
def browse(index_name, browse_params = nil, request_options = {})
|
402
401
|
response = browse_with_http_info(index_name, browse_params, request_options)
|
403
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::BrowseResponse')
|
402
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::BrowseResponse')
|
404
403
|
end
|
405
404
|
|
406
|
-
# Delete all
|
407
|
-
# Delete
|
405
|
+
# Delete all records from an index.
|
406
|
+
# Delete the records but leave settings and index-specific API keys untouched.
|
408
407
|
# @param index_name [String] Index on which to perform the request. (required)
|
409
|
-
# @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices.
|
410
408
|
# @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)
|
411
409
|
# @return [Http::Response] the response
|
412
|
-
def
|
410
|
+
def clear_objects_with_http_info(index_name, request_options = {})
|
413
411
|
# verify the required parameter 'index_name' is set
|
414
412
|
if @api_client.config.client_side_validation && index_name.nil?
|
415
|
-
raise ArgumentError, "Parameter `index_name` is required when calling `
|
413
|
+
raise ArgumentError, "Parameter `index_name` is required when calling `clear_objects`."
|
416
414
|
end
|
417
415
|
|
418
|
-
path = '/1/indexes/{indexName}/
|
416
|
+
path = '/1/indexes/{indexName}/clear'.sub('{' + 'indexName' + '}', @api_client.encode_uri(index_name.to_s))
|
419
417
|
query_params = {}
|
420
|
-
query_params[:forwardToReplicas] = forward_to_replicas unless forward_to_replicas.nil?
|
421
418
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
422
419
|
header_params = {}
|
423
420
|
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
@@ -425,7 +422,7 @@ module Algolia
|
|
425
422
|
post_body = request_options[:debug_body]
|
426
423
|
|
427
424
|
new_options = request_options.merge(
|
428
|
-
:operation => :'SearchClient.
|
425
|
+
:operation => :'SearchClient.clear_objects',
|
429
426
|
:header_params => header_params,
|
430
427
|
:query_params => query_params,
|
431
428
|
:body => post_body,
|
@@ -435,30 +432,31 @@ module Algolia
|
|
435
432
|
@api_client.call_api(:POST, path, new_options)
|
436
433
|
end
|
437
434
|
|
438
|
-
# Delete all
|
439
|
-
# Delete
|
435
|
+
# Delete all records from an index.
|
436
|
+
# Delete the records but leave settings and index-specific API keys untouched.
|
440
437
|
# @param index_name [String] Index on which to perform the request. (required)
|
441
|
-
# @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices.
|
442
438
|
# @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)
|
443
439
|
# @return [UpdatedAtResponse]
|
444
|
-
def
|
445
|
-
response =
|
446
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
440
|
+
def clear_objects(index_name, request_options = {})
|
441
|
+
response = clear_objects_with_http_info(index_name, request_options)
|
442
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
447
443
|
end
|
448
444
|
|
449
|
-
# Delete all
|
450
|
-
# Delete
|
445
|
+
# Delete all rules.
|
446
|
+
# Delete all rules in the index.
|
451
447
|
# @param index_name [String] Index on which to perform the request. (required)
|
448
|
+
# @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices.
|
452
449
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
453
450
|
# @return [Http::Response] the response
|
454
|
-
def
|
451
|
+
def clear_rules_with_http_info(index_name, forward_to_replicas = nil, request_options = {})
|
455
452
|
# verify the required parameter 'index_name' is set
|
456
453
|
if @api_client.config.client_side_validation && index_name.nil?
|
457
|
-
raise ArgumentError, "Parameter `index_name` is required when calling `
|
454
|
+
raise ArgumentError, "Parameter `index_name` is required when calling `clear_rules`."
|
458
455
|
end
|
459
456
|
|
460
|
-
path = '/1/indexes/{indexName}/clear'.sub('{' + 'indexName' + '}', @api_client.encode_uri(index_name.to_s))
|
457
|
+
path = '/1/indexes/{indexName}/rules/clear'.sub('{' + 'indexName' + '}', @api_client.encode_uri(index_name.to_s))
|
461
458
|
query_params = {}
|
459
|
+
query_params[:forwardToReplicas] = forward_to_replicas unless forward_to_replicas.nil?
|
462
460
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
463
461
|
header_params = {}
|
464
462
|
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
@@ -466,7 +464,7 @@ module Algolia
|
|
466
464
|
post_body = request_options[:debug_body]
|
467
465
|
|
468
466
|
new_options = request_options.merge(
|
469
|
-
:operation => :'SearchClient.
|
467
|
+
:operation => :'SearchClient.clear_rules',
|
470
468
|
:header_params => header_params,
|
471
469
|
:query_params => query_params,
|
472
470
|
:body => post_body,
|
@@ -476,29 +474,30 @@ module Algolia
|
|
476
474
|
@api_client.call_api(:POST, path, new_options)
|
477
475
|
end
|
478
476
|
|
479
|
-
# Delete all
|
480
|
-
# Delete
|
477
|
+
# Delete all rules.
|
478
|
+
# Delete all rules in the index.
|
481
479
|
# @param index_name [String] Index on which to perform the request. (required)
|
480
|
+
# @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices.
|
482
481
|
# @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)
|
483
482
|
# @return [UpdatedAtResponse]
|
484
|
-
def
|
485
|
-
response =
|
486
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
483
|
+
def clear_rules(index_name, forward_to_replicas = nil, request_options = {})
|
484
|
+
response = clear_rules_with_http_info(index_name, forward_to_replicas, request_options)
|
485
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
487
486
|
end
|
488
487
|
|
489
|
-
# Delete all
|
490
|
-
# Delete all
|
488
|
+
# Delete all synonyms.
|
489
|
+
# Delete all synonyms in the index.
|
491
490
|
# @param index_name [String] Index on which to perform the request. (required)
|
492
491
|
# @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices.
|
493
492
|
# @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)
|
494
493
|
# @return [Http::Response] the response
|
495
|
-
def
|
494
|
+
def clear_synonyms_with_http_info(index_name, forward_to_replicas = nil, request_options = {})
|
496
495
|
# verify the required parameter 'index_name' is set
|
497
496
|
if @api_client.config.client_side_validation && index_name.nil?
|
498
|
-
raise ArgumentError, "Parameter `index_name` is required when calling `
|
497
|
+
raise ArgumentError, "Parameter `index_name` is required when calling `clear_synonyms`."
|
499
498
|
end
|
500
499
|
|
501
|
-
path = '/1/indexes/{indexName}/
|
500
|
+
path = '/1/indexes/{indexName}/synonyms/clear'.sub('{' + 'indexName' + '}', @api_client.encode_uri(index_name.to_s))
|
502
501
|
query_params = {}
|
503
502
|
query_params[:forwardToReplicas] = forward_to_replicas unless forward_to_replicas.nil?
|
504
503
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
@@ -508,7 +507,7 @@ module Algolia
|
|
508
507
|
post_body = request_options[:debug_body]
|
509
508
|
|
510
509
|
new_options = request_options.merge(
|
511
|
-
:operation => :'SearchClient.
|
510
|
+
:operation => :'SearchClient.clear_synonyms',
|
512
511
|
:header_params => header_params,
|
513
512
|
:query_params => query_params,
|
514
513
|
:body => post_body,
|
@@ -518,15 +517,15 @@ module Algolia
|
|
518
517
|
@api_client.call_api(:POST, path, new_options)
|
519
518
|
end
|
520
519
|
|
521
|
-
# Delete all
|
522
|
-
# Delete all
|
520
|
+
# Delete all synonyms.
|
521
|
+
# Delete all synonyms in the index.
|
523
522
|
# @param index_name [String] Index on which to perform the request. (required)
|
524
523
|
# @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices.
|
525
524
|
# @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)
|
526
525
|
# @return [UpdatedAtResponse]
|
527
|
-
def
|
528
|
-
response =
|
529
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
526
|
+
def clear_synonyms(index_name, forward_to_replicas = nil, request_options = {})
|
527
|
+
response = clear_synonyms_with_http_info(index_name, forward_to_replicas, request_options)
|
528
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
530
529
|
end
|
531
530
|
|
532
531
|
# Send requests to the Algolia REST API.
|
@@ -569,7 +568,7 @@ module Algolia
|
|
569
568
|
# @return [Object]
|
570
569
|
def custom_delete(path, parameters = nil, request_options = {})
|
571
570
|
response = custom_delete_with_http_info(path, parameters, request_options)
|
572
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
571
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
573
572
|
end
|
574
573
|
|
575
574
|
# Send requests to the Algolia REST API.
|
@@ -612,7 +611,7 @@ module Algolia
|
|
612
611
|
# @return [Object]
|
613
612
|
def custom_get(path, parameters = nil, request_options = {})
|
614
613
|
response = custom_get_with_http_info(path, parameters, request_options)
|
615
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
614
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
616
615
|
end
|
617
616
|
|
618
617
|
# Send requests to the Algolia REST API.
|
@@ -657,7 +656,7 @@ module Algolia
|
|
657
656
|
# @return [Object]
|
658
657
|
def custom_post(path, parameters = nil, body = nil, request_options = {})
|
659
658
|
response = custom_post_with_http_info(path, parameters, body, request_options)
|
660
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
659
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
661
660
|
end
|
662
661
|
|
663
662
|
# Send requests to the Algolia REST API.
|
@@ -702,7 +701,7 @@ module Algolia
|
|
702
701
|
# @return [Object]
|
703
702
|
def custom_put(path, parameters = nil, body = nil, request_options = {})
|
704
703
|
response = custom_put_with_http_info(path, parameters, body, request_options)
|
705
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
704
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
706
705
|
end
|
707
706
|
|
708
707
|
# Delete API key.
|
@@ -742,7 +741,7 @@ module Algolia
|
|
742
741
|
# @return [DeleteApiKeyResponse]
|
743
742
|
def delete_api_key(key, request_options = {})
|
744
743
|
response = delete_api_key_with_http_info(key, request_options)
|
745
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::DeleteApiKeyResponse')
|
744
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeleteApiKeyResponse')
|
746
745
|
end
|
747
746
|
|
748
747
|
# Delete all records matching a query.
|
@@ -788,7 +787,7 @@ module Algolia
|
|
788
787
|
# @return [DeletedAtResponse]
|
789
788
|
def delete_by(index_name, delete_by_params, request_options = {})
|
790
789
|
response = delete_by_with_http_info(index_name, delete_by_params, request_options)
|
791
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::DeletedAtResponse')
|
790
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeletedAtResponse')
|
792
791
|
end
|
793
792
|
|
794
793
|
# Delete index.
|
@@ -828,7 +827,7 @@ module Algolia
|
|
828
827
|
# @return [DeletedAtResponse]
|
829
828
|
def delete_index(index_name, request_options = {})
|
830
829
|
response = delete_index_with_http_info(index_name, request_options)
|
831
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::DeletedAtResponse')
|
830
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeletedAtResponse')
|
832
831
|
end
|
833
832
|
|
834
833
|
# Delete a record.
|
@@ -875,7 +874,7 @@ module Algolia
|
|
875
874
|
# @return [DeletedAtResponse]
|
876
875
|
def delete_object(index_name, object_id, request_options = {})
|
877
876
|
response = delete_object_with_http_info(index_name, object_id, request_options)
|
878
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::DeletedAtResponse')
|
877
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeletedAtResponse')
|
879
878
|
end
|
880
879
|
|
881
880
|
# Delete a rule.
|
@@ -925,7 +924,7 @@ module Algolia
|
|
925
924
|
# @return [UpdatedAtResponse]
|
926
925
|
def delete_rule(index_name, object_id, forward_to_replicas = nil, request_options = {})
|
927
926
|
response = delete_rule_with_http_info(index_name, object_id, forward_to_replicas, request_options)
|
928
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
927
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
929
928
|
end
|
930
929
|
|
931
930
|
# Remove a source.
|
@@ -965,7 +964,7 @@ module Algolia
|
|
965
964
|
# @return [DeleteSourceResponse]
|
966
965
|
def delete_source(source, request_options = {})
|
967
966
|
response = delete_source_with_http_info(source, request_options)
|
968
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::DeleteSourceResponse')
|
967
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeleteSourceResponse')
|
969
968
|
end
|
970
969
|
|
971
970
|
# Delete a synonym.
|
@@ -1015,7 +1014,7 @@ module Algolia
|
|
1015
1014
|
# @return [DeletedAtResponse]
|
1016
1015
|
def delete_synonym(index_name, object_id, forward_to_replicas = nil, request_options = {})
|
1017
1016
|
response = delete_synonym_with_http_info(index_name, object_id, forward_to_replicas, request_options)
|
1018
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::DeletedAtResponse')
|
1017
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeletedAtResponse')
|
1019
1018
|
end
|
1020
1019
|
|
1021
1020
|
# Get API key permissions.
|
@@ -1055,7 +1054,7 @@ module Algolia
|
|
1055
1054
|
# @return [GetApiKeyResponse]
|
1056
1055
|
def get_api_key(key, request_options = {})
|
1057
1056
|
response = get_api_key_with_http_info(key, request_options)
|
1058
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::GetApiKeyResponse')
|
1057
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetApiKeyResponse')
|
1059
1058
|
end
|
1060
1059
|
|
1061
1060
|
# List available languages.
|
@@ -1088,7 +1087,7 @@ module Algolia
|
|
1088
1087
|
# @return [Hash<String, Languages>]
|
1089
1088
|
def get_dictionary_languages(request_options = {})
|
1090
1089
|
response = get_dictionary_languages_with_http_info(request_options)
|
1091
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::Hash<String, Languages>')
|
1090
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::Hash<String, Languages>')
|
1092
1091
|
end
|
1093
1092
|
|
1094
1093
|
# Get stop word settings.
|
@@ -1121,7 +1120,7 @@ module Algolia
|
|
1121
1120
|
# @return [GetDictionarySettingsResponse]
|
1122
1121
|
def get_dictionary_settings(request_options = {})
|
1123
1122
|
response = get_dictionary_settings_with_http_info(request_options)
|
1124
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::GetDictionarySettingsResponse')
|
1123
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetDictionarySettingsResponse')
|
1125
1124
|
end
|
1126
1125
|
|
1127
1126
|
# Return the latest log entries.
|
@@ -1170,7 +1169,7 @@ module Algolia
|
|
1170
1169
|
# @return [GetLogsResponse]
|
1171
1170
|
def get_logs(offset = nil, length = nil, index_name = nil, type = nil, request_options = {})
|
1172
1171
|
response = get_logs_with_http_info(offset, length, index_name, type, request_options)
|
1173
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::GetLogsResponse')
|
1172
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetLogsResponse')
|
1174
1173
|
end
|
1175
1174
|
|
1176
1175
|
# Get a record.
|
@@ -1220,7 +1219,7 @@ module Algolia
|
|
1220
1219
|
# @return [Hash<String, String>]
|
1221
1220
|
def get_object(index_name, object_id, attributes_to_retrieve = nil, request_options = {})
|
1222
1221
|
response = get_object_with_http_info(index_name, object_id, attributes_to_retrieve, request_options)
|
1223
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::Hash<String, String>')
|
1222
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::Hash<String, String>')
|
1224
1223
|
end
|
1225
1224
|
|
1226
1225
|
# Get multiple records.
|
@@ -1247,7 +1246,7 @@ module Algolia
|
|
1247
1246
|
:header_params => header_params,
|
1248
1247
|
:query_params => query_params,
|
1249
1248
|
:body => post_body,
|
1250
|
-
:use_read_transporter =>
|
1249
|
+
:use_read_transporter => true
|
1251
1250
|
)
|
1252
1251
|
|
1253
1252
|
@api_client.call_api(:POST, path, new_options)
|
@@ -1260,7 +1259,7 @@ module Algolia
|
|
1260
1259
|
# @return [GetObjectsResponse]
|
1261
1260
|
def get_objects(get_objects_params, request_options = {})
|
1262
1261
|
response = get_objects_with_http_info(get_objects_params, request_options)
|
1263
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::GetObjectsResponse')
|
1262
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetObjectsResponse')
|
1264
1263
|
end
|
1265
1264
|
|
1266
1265
|
# Get a rule.
|
@@ -1307,7 +1306,7 @@ module Algolia
|
|
1307
1306
|
# @return [Rule]
|
1308
1307
|
def get_rule(index_name, object_id, request_options = {})
|
1309
1308
|
response = get_rule_with_http_info(index_name, object_id, request_options)
|
1310
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::Rule')
|
1309
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::Rule')
|
1311
1310
|
end
|
1312
1311
|
|
1313
1312
|
# Get index settings.
|
@@ -1347,7 +1346,7 @@ module Algolia
|
|
1347
1346
|
# @return [IndexSettings]
|
1348
1347
|
def get_settings(index_name, request_options = {})
|
1349
1348
|
response = get_settings_with_http_info(index_name, request_options)
|
1350
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::IndexSettings')
|
1349
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::IndexSettings')
|
1351
1350
|
end
|
1352
1351
|
|
1353
1352
|
# Get all allowed IP addresses.
|
@@ -1380,7 +1379,7 @@ module Algolia
|
|
1380
1379
|
# @return [Array<Source>]
|
1381
1380
|
def get_sources(request_options = {})
|
1382
1381
|
response = get_sources_with_http_info(request_options)
|
1383
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Array<Search::Source>')
|
1382
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Array<Search::Source>')
|
1384
1383
|
end
|
1385
1384
|
|
1386
1385
|
# Get a synonym object.
|
@@ -1427,7 +1426,7 @@ module Algolia
|
|
1427
1426
|
# @return [SynonymHit]
|
1428
1427
|
def get_synonym(index_name, object_id, request_options = {})
|
1429
1428
|
response = get_synonym_with_http_info(index_name, object_id, request_options)
|
1430
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::SynonymHit')
|
1429
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SynonymHit')
|
1431
1430
|
end
|
1432
1431
|
|
1433
1432
|
# Check a task's status.
|
@@ -1474,7 +1473,7 @@ module Algolia
|
|
1474
1473
|
# @return [GetTaskResponse]
|
1475
1474
|
def get_task(index_name, task_id, request_options = {})
|
1476
1475
|
response = get_task_with_http_info(index_name, task_id, request_options)
|
1477
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::GetTaskResponse')
|
1476
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetTaskResponse')
|
1478
1477
|
end
|
1479
1478
|
|
1480
1479
|
# Get top userID.
|
@@ -1507,7 +1506,7 @@ module Algolia
|
|
1507
1506
|
# @return [GetTopUserIdsResponse]
|
1508
1507
|
def get_top_user_ids(request_options = {})
|
1509
1508
|
response = get_top_user_ids_with_http_info(request_options)
|
1510
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::GetTopUserIdsResponse')
|
1509
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetTopUserIdsResponse')
|
1511
1510
|
end
|
1512
1511
|
|
1513
1512
|
# Get userID.
|
@@ -1552,7 +1551,7 @@ module Algolia
|
|
1552
1551
|
# @return [UserId]
|
1553
1552
|
def get_user_id(user_id, request_options = {})
|
1554
1553
|
response = get_user_id_with_http_info(user_id, request_options)
|
1555
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::UserId')
|
1554
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UserId')
|
1556
1555
|
end
|
1557
1556
|
|
1558
1557
|
# Get migration and user mapping status.
|
@@ -1588,7 +1587,7 @@ module Algolia
|
|
1588
1587
|
# @return [HasPendingMappingsResponse]
|
1589
1588
|
def has_pending_mappings(get_clusters = nil, request_options = {})
|
1590
1589
|
response = has_pending_mappings_with_http_info(get_clusters, request_options)
|
1591
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::HasPendingMappingsResponse')
|
1590
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::HasPendingMappingsResponse')
|
1592
1591
|
end
|
1593
1592
|
|
1594
1593
|
# List API keys.
|
@@ -1621,7 +1620,7 @@ module Algolia
|
|
1621
1620
|
# @return [ListApiKeysResponse]
|
1622
1621
|
def list_api_keys(request_options = {})
|
1623
1622
|
response = list_api_keys_with_http_info(request_options)
|
1624
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::ListApiKeysResponse')
|
1623
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::ListApiKeysResponse')
|
1625
1624
|
end
|
1626
1625
|
|
1627
1626
|
# List clusters.
|
@@ -1654,7 +1653,7 @@ module Algolia
|
|
1654
1653
|
# @return [ListClustersResponse]
|
1655
1654
|
def list_clusters(request_options = {})
|
1656
1655
|
response = list_clusters_with_http_info(request_options)
|
1657
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::ListClustersResponse')
|
1656
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::ListClustersResponse')
|
1658
1657
|
end
|
1659
1658
|
|
1660
1659
|
# List indices.
|
@@ -1697,7 +1696,7 @@ module Algolia
|
|
1697
1696
|
# @return [ListIndicesResponse]
|
1698
1697
|
def list_indices(page = nil, hits_per_page = nil, request_options = {})
|
1699
1698
|
response = list_indices_with_http_info(page, hits_per_page, request_options)
|
1700
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::ListIndicesResponse')
|
1699
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::ListIndicesResponse')
|
1701
1700
|
end
|
1702
1701
|
|
1703
1702
|
# List userIDs.
|
@@ -1740,7 +1739,7 @@ module Algolia
|
|
1740
1739
|
# @return [ListUserIdsResponse]
|
1741
1740
|
def list_user_ids(page = nil, hits_per_page = nil, request_options = {})
|
1742
1741
|
response = list_user_ids_with_http_info(page, hits_per_page, request_options)
|
1743
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::ListUserIdsResponse')
|
1742
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::ListUserIdsResponse')
|
1744
1743
|
end
|
1745
1744
|
|
1746
1745
|
# Batch write operations on multiple indices.
|
@@ -1780,7 +1779,7 @@ module Algolia
|
|
1780
1779
|
# @return [MultipleBatchResponse]
|
1781
1780
|
def multiple_batch(batch_params, request_options = {})
|
1782
1781
|
response = multiple_batch_with_http_info(batch_params, request_options)
|
1783
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::MultipleBatchResponse')
|
1782
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::MultipleBatchResponse')
|
1784
1783
|
end
|
1785
1784
|
|
1786
1785
|
# Copy, move, or rename an index.
|
@@ -1826,7 +1825,7 @@ module Algolia
|
|
1826
1825
|
# @return [UpdatedAtResponse]
|
1827
1826
|
def operation_index(index_name, operation_index_params, request_options = {})
|
1828
1827
|
response = operation_index_with_http_info(index_name, operation_index_params, request_options)
|
1829
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
1828
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
1830
1829
|
end
|
1831
1830
|
|
1832
1831
|
# Update record attributes.
|
@@ -1882,7 +1881,7 @@ module Algolia
|
|
1882
1881
|
# @return [UpdatedAtWithObjectIdResponse]
|
1883
1882
|
def partial_update_object(index_name, object_id, attributes_to_update, create_if_not_exists = nil, request_options = {})
|
1884
1883
|
response = partial_update_object_with_http_info(index_name, object_id, attributes_to_update, create_if_not_exists, request_options)
|
1885
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtWithObjectIdResponse')
|
1884
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtWithObjectIdResponse')
|
1886
1885
|
end
|
1887
1886
|
|
1888
1887
|
# Remove userID.
|
@@ -1927,7 +1926,7 @@ module Algolia
|
|
1927
1926
|
# @return [RemoveUserIdResponse]
|
1928
1927
|
def remove_user_id(user_id, request_options = {})
|
1929
1928
|
response = remove_user_id_with_http_info(user_id, request_options)
|
1930
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::RemoveUserIdResponse')
|
1929
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::RemoveUserIdResponse')
|
1931
1930
|
end
|
1932
1931
|
|
1933
1932
|
# Replace all sources.
|
@@ -1967,7 +1966,7 @@ module Algolia
|
|
1967
1966
|
# @return [ReplaceSourceResponse]
|
1968
1967
|
def replace_sources(source, request_options = {})
|
1969
1968
|
response = replace_sources_with_http_info(source, request_options)
|
1970
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::ReplaceSourceResponse')
|
1969
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::ReplaceSourceResponse')
|
1971
1970
|
end
|
1972
1971
|
|
1973
1972
|
# Restore API key.
|
@@ -2007,7 +2006,7 @@ module Algolia
|
|
2007
2006
|
# @return [AddApiKeyResponse]
|
2008
2007
|
def restore_api_key(key, request_options = {})
|
2009
2008
|
response = restore_api_key_with_http_info(key, request_options)
|
2010
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::AddApiKeyResponse')
|
2009
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::AddApiKeyResponse')
|
2011
2010
|
end
|
2012
2011
|
|
2013
2012
|
# Add or update a record.
|
@@ -2053,7 +2052,7 @@ module Algolia
|
|
2053
2052
|
# @return [SaveObjectResponse]
|
2054
2053
|
def save_object(index_name, body, request_options = {})
|
2055
2054
|
response = save_object_with_http_info(index_name, body, request_options)
|
2056
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::SaveObjectResponse')
|
2055
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SaveObjectResponse')
|
2057
2056
|
end
|
2058
2057
|
|
2059
2058
|
# Create or update a rule.
|
@@ -2109,7 +2108,7 @@ module Algolia
|
|
2109
2108
|
# @return [UpdatedRuleResponse]
|
2110
2109
|
def save_rule(index_name, object_id, rule, forward_to_replicas = nil, request_options = {})
|
2111
2110
|
response = save_rule_with_http_info(index_name, object_id, rule, forward_to_replicas, request_options)
|
2112
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedRuleResponse')
|
2111
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedRuleResponse')
|
2113
2112
|
end
|
2114
2113
|
|
2115
2114
|
# Save a batch of rules.
|
@@ -2161,7 +2160,7 @@ module Algolia
|
|
2161
2160
|
# @return [UpdatedAtResponse]
|
2162
2161
|
def save_rules(index_name, rules, forward_to_replicas = nil, clear_existing_rules = nil, request_options = {})
|
2163
2162
|
response = save_rules_with_http_info(index_name, rules, forward_to_replicas, clear_existing_rules, request_options)
|
2164
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
2163
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
2165
2164
|
end
|
2166
2165
|
|
2167
2166
|
# Save a synonym.
|
@@ -2217,7 +2216,7 @@ module Algolia
|
|
2217
2216
|
# @return [SaveSynonymResponse]
|
2218
2217
|
def save_synonym(index_name, object_id, synonym_hit, forward_to_replicas = nil, request_options = {})
|
2219
2218
|
response = save_synonym_with_http_info(index_name, object_id, synonym_hit, forward_to_replicas, request_options)
|
2220
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::SaveSynonymResponse')
|
2219
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SaveSynonymResponse')
|
2221
2220
|
end
|
2222
2221
|
|
2223
2222
|
# Save a batch of synonyms.
|
@@ -2269,7 +2268,7 @@ module Algolia
|
|
2269
2268
|
# @return [UpdatedAtResponse]
|
2270
2269
|
def save_synonyms(index_name, synonym_hit, forward_to_replicas = nil, replace_existing_synonyms = nil, request_options = {})
|
2271
2270
|
response = save_synonyms_with_http_info(index_name, synonym_hit, forward_to_replicas, replace_existing_synonyms, request_options)
|
2272
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
2271
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
2273
2272
|
end
|
2274
2273
|
|
2275
2274
|
# Search multiple indices.
|
@@ -2296,7 +2295,7 @@ module Algolia
|
|
2296
2295
|
:header_params => header_params,
|
2297
2296
|
:query_params => query_params,
|
2298
2297
|
:body => post_body,
|
2299
|
-
:use_read_transporter =>
|
2298
|
+
:use_read_transporter => true
|
2300
2299
|
)
|
2301
2300
|
|
2302
2301
|
@api_client.call_api(:POST, path, new_options)
|
@@ -2309,7 +2308,7 @@ module Algolia
|
|
2309
2308
|
# @return [SearchResponses]
|
2310
2309
|
def search(search_method_params, request_options = {})
|
2311
2310
|
response = search_with_http_info(search_method_params, request_options)
|
2312
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchResponses')
|
2311
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchResponses')
|
2313
2312
|
end
|
2314
2313
|
|
2315
2314
|
# Search dictionary entries.
|
@@ -2341,7 +2340,7 @@ module Algolia
|
|
2341
2340
|
:header_params => header_params,
|
2342
2341
|
:query_params => query_params,
|
2343
2342
|
:body => post_body,
|
2344
|
-
:use_read_transporter =>
|
2343
|
+
:use_read_transporter => true
|
2345
2344
|
)
|
2346
2345
|
|
2347
2346
|
@api_client.call_api(:POST, path, new_options)
|
@@ -2355,7 +2354,7 @@ module Algolia
|
|
2355
2354
|
# @return [UpdatedAtResponse]
|
2356
2355
|
def search_dictionary_entries(dictionary_name, search_dictionary_entries_params, request_options = {})
|
2357
2356
|
response = search_dictionary_entries_with_http_info(dictionary_name, search_dictionary_entries_params, request_options)
|
2358
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
2357
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
2359
2358
|
end
|
2360
2359
|
|
2361
2360
|
# Search for facet values.
|
@@ -2389,7 +2388,7 @@ module Algolia
|
|
2389
2388
|
:header_params => header_params,
|
2390
2389
|
:query_params => query_params,
|
2391
2390
|
:body => post_body,
|
2392
|
-
:use_read_transporter =>
|
2391
|
+
:use_read_transporter => true
|
2393
2392
|
)
|
2394
2393
|
|
2395
2394
|
@api_client.call_api(:POST, path, new_options)
|
@@ -2404,7 +2403,7 @@ module Algolia
|
|
2404
2403
|
# @return [SearchForFacetValuesResponse]
|
2405
2404
|
def search_for_facet_values(index_name, facet_name, search_for_facet_values_request = nil, request_options = {})
|
2406
2405
|
response = search_for_facet_values_with_http_info(index_name, facet_name, search_for_facet_values_request, request_options)
|
2407
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchForFacetValuesResponse')
|
2406
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchForFacetValuesResponse')
|
2408
2407
|
end
|
2409
2408
|
|
2410
2409
|
# Search for rules.
|
@@ -2432,7 +2431,7 @@ module Algolia
|
|
2432
2431
|
:header_params => header_params,
|
2433
2432
|
:query_params => query_params,
|
2434
2433
|
:body => post_body,
|
2435
|
-
:use_read_transporter =>
|
2434
|
+
:use_read_transporter => true
|
2436
2435
|
)
|
2437
2436
|
|
2438
2437
|
@api_client.call_api(:POST, path, new_options)
|
@@ -2446,7 +2445,7 @@ module Algolia
|
|
2446
2445
|
# @return [SearchRulesResponse]
|
2447
2446
|
def search_rules(index_name, search_rules_params = nil, request_options = {})
|
2448
2447
|
response = search_rules_with_http_info(index_name, search_rules_params, request_options)
|
2449
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchRulesResponse')
|
2448
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchRulesResponse')
|
2450
2449
|
end
|
2451
2450
|
|
2452
2451
|
# Search an index.
|
@@ -2474,7 +2473,7 @@ module Algolia
|
|
2474
2473
|
:header_params => header_params,
|
2475
2474
|
:query_params => query_params,
|
2476
2475
|
:body => post_body,
|
2477
|
-
:use_read_transporter =>
|
2476
|
+
:use_read_transporter => true
|
2478
2477
|
)
|
2479
2478
|
|
2480
2479
|
@api_client.call_api(:POST, path, new_options)
|
@@ -2488,32 +2487,23 @@ module Algolia
|
|
2488
2487
|
# @return [SearchResponse]
|
2489
2488
|
def search_single_index(index_name, search_params = nil, request_options = {})
|
2490
2489
|
response = search_single_index_with_http_info(index_name, search_params, request_options)
|
2491
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchResponse')
|
2490
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchResponse')
|
2492
2491
|
end
|
2493
2492
|
|
2494
2493
|
# Search for synonyms.
|
2495
2494
|
# Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body.
|
2496
2495
|
# @param index_name [String] Index on which to perform the request. (required)
|
2497
|
-
# @param type [SynonymType] Search for specific [types of synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms).
|
2498
|
-
# @param page [Integer] Returns the requested page number (the first page is 0). Page size is set by `hitsPerPage`. When null, there's no pagination. (default to 0)
|
2499
|
-
# @param hits_per_page [Integer] Maximum number of hits per page. (default to 100)
|
2500
2496
|
# @param search_synonyms_params [SearchSynonymsParams] Body of the `searchSynonyms` operation.
|
2501
2497
|
# @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)
|
2502
2498
|
# @return [Http::Response] the response
|
2503
|
-
def search_synonyms_with_http_info(index_name,
|
2499
|
+
def search_synonyms_with_http_info(index_name, search_synonyms_params = nil, request_options = {})
|
2504
2500
|
# verify the required parameter 'index_name' is set
|
2505
2501
|
if @api_client.config.client_side_validation && index_name.nil?
|
2506
2502
|
raise ArgumentError, "Parameter `index_name` is required when calling `search_synonyms`."
|
2507
2503
|
end
|
2508
|
-
if @api_client.config.client_side_validation && !page.nil? && page < 0
|
2509
|
-
raise ArgumentError, 'invalid value for ""page"" when calling SearchClient.search_synonyms, must be greater than or equal to 0.'
|
2510
|
-
end
|
2511
2504
|
|
2512
2505
|
path = '/1/indexes/{indexName}/synonyms/search'.sub('{' + 'indexName' + '}', @api_client.encode_uri(index_name.to_s))
|
2513
2506
|
query_params = {}
|
2514
|
-
query_params[:type] = type unless type.nil?
|
2515
|
-
query_params[:page] = page unless page.nil?
|
2516
|
-
query_params[:hitsPerPage] = hits_per_page unless hits_per_page.nil?
|
2517
2507
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
2518
2508
|
header_params = {}
|
2519
2509
|
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
@@ -2525,7 +2515,7 @@ module Algolia
|
|
2525
2515
|
:header_params => header_params,
|
2526
2516
|
:query_params => query_params,
|
2527
2517
|
:body => post_body,
|
2528
|
-
:use_read_transporter =>
|
2518
|
+
:use_read_transporter => true
|
2529
2519
|
)
|
2530
2520
|
|
2531
2521
|
@api_client.call_api(:POST, path, new_options)
|
@@ -2534,15 +2524,12 @@ module Algolia
|
|
2534
2524
|
# Search for synonyms.
|
2535
2525
|
# Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body.
|
2536
2526
|
# @param index_name [String] Index on which to perform the request. (required)
|
2537
|
-
# @param type [SynonymType] Search for specific [types of synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms).
|
2538
|
-
# @param page [Integer] Returns the requested page number (the first page is 0). Page size is set by `hitsPerPage`. When null, there's no pagination. (default to 0)
|
2539
|
-
# @param hits_per_page [Integer] Maximum number of hits per page. (default to 100)
|
2540
2527
|
# @param search_synonyms_params [SearchSynonymsParams] Body of the `searchSynonyms` operation.
|
2541
2528
|
# @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)
|
2542
2529
|
# @return [SearchSynonymsResponse]
|
2543
|
-
def search_synonyms(index_name,
|
2544
|
-
response = search_synonyms_with_http_info(index_name,
|
2545
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchSynonymsResponse')
|
2530
|
+
def search_synonyms(index_name, search_synonyms_params = nil, request_options = {})
|
2531
|
+
response = search_synonyms_with_http_info(index_name, search_synonyms_params, request_options)
|
2532
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchSynonymsResponse')
|
2546
2533
|
end
|
2547
2534
|
|
2548
2535
|
# Search for a user ID.
|
@@ -2569,7 +2556,7 @@ module Algolia
|
|
2569
2556
|
:header_params => header_params,
|
2570
2557
|
:query_params => query_params,
|
2571
2558
|
:body => post_body,
|
2572
|
-
:use_read_transporter =>
|
2559
|
+
:use_read_transporter => true
|
2573
2560
|
)
|
2574
2561
|
|
2575
2562
|
@api_client.call_api(:POST, path, new_options)
|
@@ -2582,7 +2569,7 @@ module Algolia
|
|
2582
2569
|
# @return [SearchUserIdsResponse]
|
2583
2570
|
def search_user_ids(search_user_ids_params, request_options = {})
|
2584
2571
|
response = search_user_ids_with_http_info(search_user_ids_params, request_options)
|
2585
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchUserIdsResponse')
|
2572
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchUserIdsResponse')
|
2586
2573
|
end
|
2587
2574
|
|
2588
2575
|
# Set stop word settings.
|
@@ -2622,7 +2609,7 @@ module Algolia
|
|
2622
2609
|
# @return [UpdatedAtResponse]
|
2623
2610
|
def set_dictionary_settings(dictionary_settings_params, request_options = {})
|
2624
2611
|
response = set_dictionary_settings_with_http_info(dictionary_settings_params, request_options)
|
2625
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
2612
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
2626
2613
|
end
|
2627
2614
|
|
2628
2615
|
# Update index settings.
|
@@ -2671,7 +2658,7 @@ module Algolia
|
|
2671
2658
|
# @return [UpdatedAtResponse]
|
2672
2659
|
def set_settings(index_name, index_settings, forward_to_replicas = nil, request_options = {})
|
2673
2660
|
response = set_settings_with_http_info(index_name, index_settings, forward_to_replicas, request_options)
|
2674
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
2661
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
2675
2662
|
end
|
2676
2663
|
|
2677
2664
|
# Update an API key.
|
@@ -2717,7 +2704,77 @@ module Algolia
|
|
2717
2704
|
# @return [UpdateApiKeyResponse]
|
2718
2705
|
def update_api_key(key, api_key, request_options = {})
|
2719
2706
|
response = update_api_key_with_http_info(key, api_key, request_options)
|
2720
|
-
deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdateApiKeyResponse')
|
2707
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdateApiKeyResponse')
|
2708
|
+
end
|
2709
|
+
|
2710
|
+
# Helper: Wait for a task to be published (completed) for a given `index_name` and `task_id`.
|
2711
|
+
#
|
2712
|
+
# @param index_name [String] the `index_name` where the operation was performed. (required)
|
2713
|
+
# @param task_id [Integer] the `task_id` returned in the method response. (required)
|
2714
|
+
# @param max_retries [Integer] the maximum number of retries. (optional, default to 50)
|
2715
|
+
# @param timeout [Proc] the function to decide how long to wait between retries. (optional)
|
2716
|
+
# @param request_options [Hash] the requestOptions to send along with the query, they will be forwarded to the `get_task` method.
|
2717
|
+
# @return [Http::Response] the last get_task response
|
2718
|
+
def wait_for_task(index_name, task_id, max_retries = 50, timeout = ->(retry_count) { [retry_count * 200, 5000].min }, request_options = {})
|
2719
|
+
retries = 0
|
2720
|
+
while retries < max_retries
|
2721
|
+
res = get_task(index_name, task_id, request_options)
|
2722
|
+
if res.status == 'published'
|
2723
|
+
return res
|
2724
|
+
end
|
2725
|
+
|
2726
|
+
retries += 1
|
2727
|
+
sleep(timeout.call(retries) / 1000.0)
|
2728
|
+
end
|
2729
|
+
raise ApiError, "The maximum number of retries exceeded. (#{max_retries})"
|
2730
|
+
end
|
2731
|
+
|
2732
|
+
# Helper: Wait for an API key to be added, updated or deleted based on a given `operation`.
|
2733
|
+
#
|
2734
|
+
# @param operation [String] the `operation` that was done on a `key`.
|
2735
|
+
# @param key [String] the `key` that has been added, deleted or updated.
|
2736
|
+
# @param api_key [Hash] necessary to know if an `update` operation has been processed, compare fields of the response with it.
|
2737
|
+
# @param max_retries [Integer] the maximum number of retries.
|
2738
|
+
# @param timeout [Proc] the function to decide how long to wait between retries.
|
2739
|
+
# @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.
|
2740
|
+
# @return [Http::Response] the last get_api_key response
|
2741
|
+
def wait_for_api_key(operation, key, api_key = {}, max_retries = 50, timeout = ->(retry_count) { [retry_count * 200, 5000].min }, request_options = {})
|
2742
|
+
retries = 0
|
2743
|
+
if operation == 'update'
|
2744
|
+
raise ArgumentError, '`api_key` is required when waiting for an `update` operation.' if api_key.nil?
|
2745
|
+
|
2746
|
+
while retries < max_retries
|
2747
|
+
begin
|
2748
|
+
updatad_key = get_api_key(key, request_options)
|
2749
|
+
updated_key_hash = updatad_key.to_hash
|
2750
|
+
equals = true
|
2751
|
+
api_key.to_hash.each do |k, v|
|
2752
|
+
equals &&= updated_key_hash[k] == v
|
2753
|
+
end
|
2754
|
+
|
2755
|
+
return updatad_key if equals
|
2756
|
+
rescue AlgoliaError => e
|
2757
|
+
raise e unless e.code == 404
|
2758
|
+
end
|
2759
|
+
|
2760
|
+
retries += 1
|
2761
|
+
sleep(timeout.call(retries) / 1000.0)
|
2762
|
+
end
|
2763
|
+
|
2764
|
+
raise ApiError, "The maximum number of retries exceeded. (#{max_retries})"
|
2765
|
+
end
|
2766
|
+
|
2767
|
+
while retries < max_retries
|
2768
|
+
begin
|
2769
|
+
res = get_api_key(key, request_options)
|
2770
|
+
return res if operation == 'add'
|
2771
|
+
rescue AlgoliaError => e
|
2772
|
+
return res if operation == 'delete' && e.code == 404
|
2773
|
+
end
|
2774
|
+
retries += 1
|
2775
|
+
sleep(timeout.call(retries) / 1000.0)
|
2776
|
+
end
|
2777
|
+
raise ApiError, "The maximum number of retries exceeded. (#{max_retries})"
|
2721
2778
|
end
|
2722
2779
|
end
|
2723
2780
|
end
|