algolia 2.3.4 → 3.0.0.alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -93
- data/Gemfile +1 -14
- data/Gemfile.lock +64 -0
- data/README.md +4 -6
- data/Rakefile +0 -39
- data/algolia.gemspec +24 -39
- data/lib/algolia/api/abtesting_client.rb +418 -0
- data/lib/algolia/api/analytics_client.rb +1294 -0
- data/lib/algolia/api/ingestion_client.rb +1659 -0
- data/lib/algolia/api/insights_client.rb +252 -0
- data/lib/algolia/api/monitoring_client.rb +555 -0
- data/lib/algolia/api/personalization_client.rb +365 -0
- data/lib/algolia/api/query_suggestions_client.rb +491 -0
- data/lib/algolia/api/recommend_client.rb +460 -0
- data/lib/algolia/api/search_client.rb +2723 -0
- data/lib/algolia/api_client.rb +153 -0
- data/lib/algolia/api_error.rb +48 -0
- data/lib/algolia/configuration.rb +41 -0
- data/lib/algolia/logger_helper.rb +1 -1
- data/lib/algolia/models/abtesting/ab_test.rb +332 -0
- data/lib/algolia/models/abtesting/ab_test_response.rb +219 -0
- data/lib/algolia/models/abtesting/ab_tests_variant.rb +217 -0
- data/lib/algolia/models/abtesting/ab_tests_variant_search_params.rb +236 -0
- data/lib/algolia/models/abtesting/add_ab_tests_request.rb +239 -0
- data/lib/algolia/models/abtesting/add_ab_tests_variant.rb +96 -0
- data/lib/algolia/models/abtesting/currencies_value.rb +223 -0
- data/lib/algolia/models/abtesting/custom_search_params.rb +195 -0
- data/lib/algolia/models/abtesting/error_base.rb +196 -0
- data/lib/algolia/models/abtesting/filter_effects.rb +202 -0
- data/lib/algolia/models/abtesting/filter_effects_empty_search.rb +204 -0
- data/lib/algolia/models/abtesting/filter_effects_outliers.rb +204 -0
- data/lib/algolia/models/abtesting/list_ab_tests_response.rb +221 -0
- data/lib/algolia/models/abtesting/variant.rb +399 -0
- data/lib/algolia/models/analytics/average_click_event.rb +219 -0
- data/lib/algolia/models/analytics/click_position.rb +209 -0
- data/lib/algolia/models/analytics/click_through_rate_event.rb +249 -0
- data/lib/algolia/models/analytics/conversion_rate_event.rb +249 -0
- data/lib/algolia/models/analytics/direction.rb +33 -0
- data/lib/algolia/models/analytics/error_base.rb +196 -0
- data/lib/algolia/models/analytics/get_average_click_position_response.rb +221 -0
- data/lib/algolia/models/analytics/get_click_positions_response.rb +215 -0
- data/lib/algolia/models/analytics/get_click_through_rate_response.rb +251 -0
- data/lib/algolia/models/analytics/get_conversation_rate_response.rb +251 -0
- data/lib/algolia/models/analytics/get_no_click_rate_response.rb +251 -0
- data/lib/algolia/models/analytics/get_no_results_rate_response.rb +251 -0
- data/lib/algolia/models/analytics/get_searches_count_response.rb +209 -0
- data/lib/algolia/models/analytics/get_searches_no_clicks_response.rb +197 -0
- data/lib/algolia/models/analytics/get_searches_no_results_response.rb +197 -0
- data/lib/algolia/models/analytics/get_status_response.rb +195 -0
- data/lib/algolia/models/analytics/get_top_countries_response.rb +197 -0
- data/lib/algolia/models/analytics/get_top_filter_attribute.rb +207 -0
- data/lib/algolia/models/analytics/get_top_filter_attributes_response.rb +197 -0
- data/lib/algolia/models/analytics/get_top_filter_for_attribute.rb +231 -0
- data/lib/algolia/models/analytics/get_top_filter_for_attribute_response.rb +197 -0
- data/lib/algolia/models/analytics/get_top_filters_no_results_response.rb +197 -0
- data/lib/algolia/models/analytics/get_top_filters_no_results_value.rb +219 -0
- data/lib/algolia/models/analytics/get_top_filters_no_results_values.rb +209 -0
- data/lib/algolia/models/analytics/get_top_hits_response.rb +96 -0
- data/lib/algolia/models/analytics/get_top_searches_response.rb +96 -0
- data/lib/algolia/models/analytics/get_users_count_response.rb +209 -0
- data/lib/algolia/models/analytics/no_click_rate_event.rb +249 -0
- data/lib/algolia/models/analytics/no_results_rate_event.rb +249 -0
- data/lib/algolia/models/analytics/order_by.rb +35 -0
- data/lib/algolia/models/analytics/search_event.rb +207 -0
- data/lib/algolia/models/analytics/search_no_click_event.rb +219 -0
- data/lib/algolia/models/analytics/search_no_result_event.rb +219 -0
- data/lib/algolia/models/analytics/top_country.rb +207 -0
- data/lib/algolia/models/analytics/top_hit.rb +207 -0
- data/lib/algolia/models/analytics/top_hit_with_analytics.rb +285 -0
- data/lib/algolia/models/analytics/top_hits_response.rb +197 -0
- data/lib/algolia/models/analytics/top_hits_response_with_analytics.rb +197 -0
- data/lib/algolia/models/analytics/top_search.rb +219 -0
- data/lib/algolia/models/analytics/top_search_with_analytics.rb +309 -0
- data/lib/algolia/models/analytics/top_searches_response.rb +197 -0
- data/lib/algolia/models/analytics/top_searches_response_with_analytics.rb +197 -0
- data/lib/algolia/models/analytics/user_with_date.rb +207 -0
- data/lib/algolia/models/ingestion/action_type.rb +34 -0
- data/lib/algolia/models/ingestion/auth_algolia.rb +207 -0
- data/lib/algolia/models/ingestion/auth_algolia_partial.rb +203 -0
- data/lib/algolia/models/ingestion/auth_api_key.rb +195 -0
- data/lib/algolia/models/ingestion/auth_api_key_partial.rb +193 -0
- data/lib/algolia/models/ingestion/auth_basic.rb +206 -0
- data/lib/algolia/models/ingestion/auth_basic_partial.rb +202 -0
- data/lib/algolia/models/ingestion/auth_google_service_account.rb +208 -0
- data/lib/algolia/models/ingestion/auth_google_service_account_partial.rb +204 -0
- data/lib/algolia/models/ingestion/auth_input.rb +99 -0
- data/lib/algolia/models/ingestion/auth_input_partial.rb +99 -0
- data/lib/algolia/models/ingestion/auth_o_auth.rb +220 -0
- data/lib/algolia/models/ingestion/auth_o_auth_partial.rb +214 -0
- data/lib/algolia/models/ingestion/authentication.rb +283 -0
- data/lib/algolia/models/ingestion/authentication_create.rb +249 -0
- data/lib/algolia/models/ingestion/authentication_create_response.rb +220 -0
- data/lib/algolia/models/ingestion/authentication_search.rb +197 -0
- data/lib/algolia/models/ingestion/authentication_sort_keys.rb +36 -0
- data/lib/algolia/models/ingestion/authentication_type.rb +36 -0
- data/lib/algolia/models/ingestion/authentication_update.rb +243 -0
- data/lib/algolia/models/ingestion/authentication_update_response.rb +220 -0
- data/lib/algolia/models/ingestion/big_commerce_channel.rb +207 -0
- data/lib/algolia/models/ingestion/big_commerce_metafield.rb +207 -0
- data/lib/algolia/models/ingestion/big_query_data_type.rb +33 -0
- data/lib/algolia/models/ingestion/delete_response.rb +195 -0
- data/lib/algolia/models/ingestion/destination.rb +283 -0
- data/lib/algolia/models/ingestion/destination_create.rb +250 -0
- data/lib/algolia/models/ingestion/destination_create_response.rb +220 -0
- data/lib/algolia/models/ingestion/destination_index_name.rb +238 -0
- data/lib/algolia/models/ingestion/destination_index_prefix.rb +195 -0
- data/lib/algolia/models/ingestion/destination_input.rb +96 -0
- data/lib/algolia/models/ingestion/destination_search.rb +197 -0
- data/lib/algolia/models/ingestion/destination_sort_keys.rb +35 -0
- data/lib/algolia/models/ingestion/destination_type.rb +34 -0
- data/lib/algolia/models/ingestion/destination_update.rb +243 -0
- data/lib/algolia/models/ingestion/destination_update_response.rb +220 -0
- data/lib/algolia/models/ingestion/docker_image_type.rb +34 -0
- data/lib/algolia/models/ingestion/docker_registry.rb +33 -0
- data/lib/algolia/models/ingestion/docker_source_discover.rb +207 -0
- data/lib/algolia/models/ingestion/docker_source_streams.rb +196 -0
- data/lib/algolia/models/ingestion/error_base.rb +196 -0
- data/lib/algolia/models/ingestion/event.rb +311 -0
- data/lib/algolia/models/ingestion/event_sort_keys.rb +34 -0
- data/lib/algolia/models/ingestion/event_status.rb +37 -0
- data/lib/algolia/models/ingestion/event_type.rb +35 -0
- data/lib/algolia/models/ingestion/list_authentications_response.rb +207 -0
- data/lib/algolia/models/ingestion/list_destinations_response.rb +207 -0
- data/lib/algolia/models/ingestion/list_events_response.rb +218 -0
- data/lib/algolia/models/ingestion/list_sources_response.rb +207 -0
- data/lib/algolia/models/ingestion/list_tasks_response.rb +208 -0
- data/lib/algolia/models/ingestion/mapping_type_csv.rb +36 -0
- data/lib/algolia/models/ingestion/method_type.rb +33 -0
- data/lib/algolia/models/ingestion/on_demand_date_utils_input.rb +208 -0
- data/lib/algolia/models/ingestion/on_demand_trigger.rb +227 -0
- data/lib/algolia/models/ingestion/on_demand_trigger_input.rb +217 -0
- data/lib/algolia/models/ingestion/on_demand_trigger_type.rb +32 -0
- data/lib/algolia/models/ingestion/order_keys.rb +33 -0
- data/lib/algolia/models/ingestion/pagination.rb +227 -0
- data/lib/algolia/models/ingestion/platform.rb +33 -0
- data/lib/algolia/models/ingestion/platform_none.rb +32 -0
- data/lib/algolia/models/ingestion/platform_with_none.rb +96 -0
- data/lib/algolia/models/ingestion/record_type.rb +33 -0
- data/lib/algolia/models/ingestion/run.rb +359 -0
- data/lib/algolia/models/ingestion/run_list_response.rb +218 -0
- data/lib/algolia/models/ingestion/run_outcome.rb +34 -0
- data/lib/algolia/models/ingestion/run_progress.rb +201 -0
- data/lib/algolia/models/ingestion/run_reason_code.rb +38 -0
- data/lib/algolia/models/ingestion/run_response.rb +208 -0
- data/lib/algolia/models/ingestion/run_sort_keys.rb +34 -0
- data/lib/algolia/models/ingestion/run_status.rb +36 -0
- data/lib/algolia/models/ingestion/run_type.rb +34 -0
- data/lib/algolia/models/ingestion/schedule_date_utils_input.rb +214 -0
- data/lib/algolia/models/ingestion/schedule_trigger.rb +251 -0
- data/lib/algolia/models/ingestion/schedule_trigger_input.rb +229 -0
- data/lib/algolia/models/ingestion/schedule_trigger_type.rb +32 -0
- data/lib/algolia/models/ingestion/source.rb +282 -0
- data/lib/algolia/models/ingestion/source_big_commerce.rb +235 -0
- data/lib/algolia/models/ingestion/source_big_query.rb +278 -0
- data/lib/algolia/models/ingestion/source_commercetools.rb +238 -0
- data/lib/algolia/models/ingestion/source_create.rb +248 -0
- data/lib/algolia/models/ingestion/source_create_response.rb +218 -0
- data/lib/algolia/models/ingestion/source_csv.rb +276 -0
- data/lib/algolia/models/ingestion/source_docker.rb +261 -0
- data/lib/algolia/models/ingestion/source_input.rb +100 -0
- data/lib/algolia/models/ingestion/source_json.rb +236 -0
- data/lib/algolia/models/ingestion/source_search.rb +196 -0
- data/lib/algolia/models/ingestion/source_sort_keys.rb +35 -0
- data/lib/algolia/models/ingestion/source_type.rb +37 -0
- data/lib/algolia/models/ingestion/source_update.rb +211 -0
- data/lib/algolia/models/ingestion/source_update_commercetools.rb +207 -0
- data/lib/algolia/models/ingestion/source_update_docker.rb +246 -0
- data/lib/algolia/models/ingestion/source_update_input.rb +99 -0
- data/lib/algolia/models/ingestion/source_update_response.rb +218 -0
- data/lib/algolia/models/ingestion/subscription_trigger.rb +217 -0
- data/lib/algolia/models/ingestion/subscription_trigger_type.rb +32 -0
- data/lib/algolia/models/ingestion/task.rb +334 -0
- data/lib/algolia/models/ingestion/task_create.rb +299 -0
- data/lib/algolia/models/ingestion/task_create_response.rb +208 -0
- data/lib/algolia/models/ingestion/task_create_trigger.rb +97 -0
- data/lib/algolia/models/ingestion/task_input.rb +96 -0
- data/lib/algolia/models/ingestion/task_search.rb +196 -0
- data/lib/algolia/models/ingestion/task_sort_keys.rb +36 -0
- data/lib/algolia/models/ingestion/task_update.rb +250 -0
- data/lib/algolia/models/ingestion/task_update_response.rb +208 -0
- data/lib/algolia/models/ingestion/trigger.rb +97 -0
- data/lib/algolia/models/ingestion/trigger_type.rb +34 -0
- data/lib/algolia/models/ingestion/trigger_update_input.rb +196 -0
- data/lib/algolia/models/ingestion/window.rb +208 -0
- data/lib/algolia/models/insights/add_to_cart_event.rb +32 -0
- data/lib/algolia/models/insights/added_to_cart_object_ids.rb +384 -0
- data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +419 -0
- data/lib/algolia/models/insights/click_event.rb +32 -0
- data/lib/algolia/models/insights/clicked_filters.rb +351 -0
- data/lib/algolia/models/insights/clicked_object_ids.rb +341 -0
- data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +418 -0
- data/lib/algolia/models/insights/conversion_event.rb +32 -0
- data/lib/algolia/models/insights/converted_filters.rb +350 -0
- data/lib/algolia/models/insights/converted_object_ids.rb +351 -0
- data/lib/algolia/models/insights/converted_object_ids_after_search.rb +386 -0
- data/lib/algolia/models/insights/discount.rb +97 -0
- data/lib/algolia/models/insights/error_base.rb +196 -0
- data/lib/algolia/models/insights/events_items.rb +106 -0
- data/lib/algolia/models/insights/events_response.rb +204 -0
- data/lib/algolia/models/insights/insights_events.rb +215 -0
- data/lib/algolia/models/insights/object_data.rb +211 -0
- data/lib/algolia/models/insights/object_data_after_search.rb +221 -0
- data/lib/algolia/models/insights/price.rb +97 -0
- data/lib/algolia/models/insights/purchase_event.rb +32 -0
- data/lib/algolia/models/insights/purchased_object_ids.rb +384 -0
- data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +419 -0
- data/lib/algolia/models/insights/view_event.rb +32 -0
- data/lib/algolia/models/insights/viewed_filters.rb +351 -0
- data/lib/algolia/models/insights/viewed_object_ids.rb +351 -0
- data/lib/algolia/models/monitoring/error_base.rb +196 -0
- data/lib/algolia/models/monitoring/get_inventory403_response.rb +192 -0
- data/lib/algolia/models/monitoring/incident.rb +225 -0
- data/lib/algolia/models/monitoring/incidents_inner.rb +202 -0
- data/lib/algolia/models/monitoring/incidents_response.rb +194 -0
- data/lib/algolia/models/monitoring/indexing_time_response.rb +192 -0
- data/lib/algolia/models/monitoring/indexing_time_response_metrics.rb +194 -0
- data/lib/algolia/models/monitoring/infrastructure_response.rb +192 -0
- data/lib/algolia/models/monitoring/infrastructure_response_metrics.rb +243 -0
- data/lib/algolia/models/monitoring/inventory_response.rb +194 -0
- data/lib/algolia/models/monitoring/latency_response.rb +192 -0
- data/lib/algolia/models/monitoring/latency_response_metrics.rb +194 -0
- data/lib/algolia/models/monitoring/metric.rb +37 -0
- data/lib/algolia/models/monitoring/period.rb +36 -0
- data/lib/algolia/models/monitoring/probes_metric.rb +203 -0
- data/lib/algolia/models/monitoring/region.rb +46 -0
- data/lib/algolia/models/monitoring/server.rb +272 -0
- data/lib/algolia/models/monitoring/server_status.rb +32 -0
- data/lib/algolia/models/monitoring/status.rb +35 -0
- data/lib/algolia/models/monitoring/status_response.rb +194 -0
- data/lib/algolia/models/monitoring/time_inner.rb +203 -0
- data/lib/algolia/models/monitoring/type.rb +32 -0
- data/lib/algolia/models/personalization/delete_user_profile_response.rb +207 -0
- data/lib/algolia/models/personalization/error_base.rb +196 -0
- data/lib/algolia/models/personalization/event_scoring.rb +219 -0
- data/lib/algolia/models/personalization/facet_scoring.rb +207 -0
- data/lib/algolia/models/personalization/get_user_token_response.rb +219 -0
- data/lib/algolia/models/personalization/personalization_strategy_params.rb +223 -0
- data/lib/algolia/models/personalization/set_personalization_strategy_response.rb +195 -0
- data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_response.rb +223 -0
- data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_with_index.rb +195 -0
- data/lib/algolia/models/query-suggestions/base_response.rb +203 -0
- data/lib/algolia/models/query-suggestions/error_base.rb +196 -0
- data/lib/algolia/models/query-suggestions/facet.rb +204 -0
- data/lib/algolia/models/query-suggestions/get_config_status200_response.rb +233 -0
- data/lib/algolia/models/query-suggestions/get_log_file200_response.rb +244 -0
- data/lib/algolia/models/query-suggestions/languages.rb +97 -0
- data/lib/algolia/models/query-suggestions/log_level.rb +34 -0
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration.rb +255 -0
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +315 -0
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration_with_index.rb +275 -0
- data/lib/algolia/models/query-suggestions/source_index.rb +305 -0
- data/lib/algolia/models/recommend/advanced_syntax_features.rb +33 -0
- data/lib/algolia/models/recommend/alternatives_as_exact.rb +34 -0
- data/lib/algolia/models/recommend/anchoring.rb +35 -0
- data/lib/algolia/models/recommend/around_precision.rb +97 -0
- data/lib/algolia/models/recommend/around_precision_from_value_inner.rb +201 -0
- data/lib/algolia/models/recommend/around_radius.rb +97 -0
- data/lib/algolia/models/recommend/around_radius_all.rb +32 -0
- data/lib/algolia/models/recommend/automatic_facet_filter.rb +216 -0
- data/lib/algolia/models/recommend/automatic_facet_filters.rb +97 -0
- data/lib/algolia/models/recommend/base_recommend_request.rb +233 -0
- data/lib/algolia/models/recommend/base_recommendations_query.rb +246 -0
- data/lib/algolia/models/recommend/base_recommended_for_you_query.rb +234 -0
- data/lib/algolia/models/recommend/base_recommended_for_you_query_parameters.rb +195 -0
- data/lib/algolia/models/recommend/base_search_params.rb +564 -0
- data/lib/algolia/models/recommend/base_search_params_without_query.rb +546 -0
- data/lib/algolia/models/recommend/base_search_response.rb +517 -0
- data/lib/algolia/models/recommend/base_trending_facets_query.rb +226 -0
- data/lib/algolia/models/recommend/base_trending_items_query.rb +252 -0
- data/lib/algolia/models/recommend/condition.rb +244 -0
- data/lib/algolia/models/recommend/consequence.rb +239 -0
- data/lib/algolia/models/recommend/consequence_hide.rb +196 -0
- data/lib/algolia/models/recommend/consequence_params.rb +1121 -0
- data/lib/algolia/models/recommend/consequence_query.rb +97 -0
- data/lib/algolia/models/recommend/consequence_query_object.rb +207 -0
- data/lib/algolia/models/recommend/deleted_at_response.rb +208 -0
- data/lib/algolia/models/recommend/distinct.rb +97 -0
- data/lib/algolia/models/recommend/edit.rb +234 -0
- data/lib/algolia/models/recommend/edit_type.rb +33 -0
- data/lib/algolia/models/recommend/error_base.rb +196 -0
- data/lib/algolia/models/recommend/exact_on_single_word_query.rb +34 -0
- data/lib/algolia/models/recommend/exhaustive.rb +234 -0
- data/lib/algolia/models/recommend/facet_filters.rb +97 -0
- data/lib/algolia/models/recommend/facet_ordering.rb +205 -0
- data/lib/algolia/models/recommend/facets.rb +196 -0
- data/lib/algolia/models/recommend/facets_stats.rb +223 -0
- data/lib/algolia/models/recommend/get_recommend_task_response.rb +216 -0
- data/lib/algolia/models/recommend/get_recommendations_params.rb +198 -0
- data/lib/algolia/models/recommend/get_recommendations_response.rb +194 -0
- data/lib/algolia/models/recommend/highlight_result.rb +96 -0
- data/lib/algolia/models/recommend/highlight_result_option.rb +253 -0
- data/lib/algolia/models/recommend/ignore_plurals.rb +97 -0
- data/lib/algolia/models/recommend/index_settings_as_search_params.rb +723 -0
- data/lib/algolia/models/recommend/match_level.rb +34 -0
- data/lib/algolia/models/recommend/matched_geo_location.rb +213 -0
- data/lib/algolia/models/recommend/mixed_search_filters.rb +96 -0
- data/lib/algolia/models/recommend/mode.rb +33 -0
- data/lib/algolia/models/recommend/numeric_filters.rb +97 -0
- data/lib/algolia/models/recommend/optional_filters.rb +97 -0
- data/lib/algolia/models/recommend/params.rb +220 -0
- data/lib/algolia/models/recommend/personalization.rb +213 -0
- data/lib/algolia/models/recommend/promote.rb +96 -0
- data/lib/algolia/models/recommend/promote_object_id.rb +208 -0
- data/lib/algolia/models/recommend/promote_object_ids.rb +210 -0
- data/lib/algolia/models/recommend/query_type.rb +34 -0
- data/lib/algolia/models/recommend/ranking_info.rb +328 -0
- data/lib/algolia/models/recommend/re_ranking_apply_filter.rb +97 -0
- data/lib/algolia/models/recommend/recommend_hit.rb +271 -0
- data/lib/algolia/models/recommend/recommend_models.rb +35 -0
- data/lib/algolia/models/recommend/recommendation_models.rb +33 -0
- data/lib/algolia/models/recommend/recommendations_hit.rb +96 -0
- data/lib/algolia/models/recommend/recommendations_hits.rb +216 -0
- data/lib/algolia/models/recommend/recommendations_query.rb +304 -0
- data/lib/algolia/models/recommend/recommendations_request.rb +98 -0
- data/lib/algolia/models/recommend/recommendations_results.rb +553 -0
- data/lib/algolia/models/recommend/recommended_for_you_model.rb +32 -0
- data/lib/algolia/models/recommend/recommended_for_you_query.rb +292 -0
- data/lib/algolia/models/recommend/recommended_for_you_query_parameters.rb +1105 -0
- data/lib/algolia/models/recommend/redirect.rb +195 -0
- data/lib/algolia/models/recommend/redirect_rule_index_metadata.rb +242 -0
- data/lib/algolia/models/recommend/redirect_rule_index_metadata_data.rb +195 -0
- data/lib/algolia/models/recommend/remove_stop_words.rb +97 -0
- data/lib/algolia/models/recommend/remove_words_if_no_results.rb +35 -0
- data/lib/algolia/models/recommend/rendering_content.rb +193 -0
- data/lib/algolia/models/recommend/rule_response.rb +246 -0
- data/lib/algolia/models/recommend/rule_response_metadata.rb +193 -0
- data/lib/algolia/models/recommend/search_params_object.rb +1103 -0
- data/lib/algolia/models/recommend/search_params_query.rb +193 -0
- data/lib/algolia/models/recommend/search_recommend_rules_params.rb +268 -0
- data/lib/algolia/models/recommend/search_recommend_rules_response.rb +233 -0
- data/lib/algolia/models/recommend/semantic_search.rb +198 -0
- data/lib/algolia/models/recommend/snippet_result.rb +96 -0
- data/lib/algolia/models/recommend/snippet_result_option.rb +229 -0
- data/lib/algolia/models/recommend/sort_remaining_by.rb +34 -0
- data/lib/algolia/models/recommend/tag_filters.rb +97 -0
- data/lib/algolia/models/recommend/task_status.rb +33 -0
- data/lib/algolia/models/recommend/trending_facet_hit.rb +238 -0
- data/lib/algolia/models/recommend/trending_facets_model.rb +32 -0
- data/lib/algolia/models/recommend/trending_facets_query.rb +284 -0
- data/lib/algolia/models/recommend/trending_items_model.rb +32 -0
- data/lib/algolia/models/recommend/trending_items_query.rb +310 -0
- data/lib/algolia/models/recommend/typo_tolerance.rb +97 -0
- data/lib/algolia/models/recommend/typo_tolerance_enum.rb +33 -0
- data/lib/algolia/models/recommend/value.rb +226 -0
- data/lib/algolia/models/search/acl.rb +47 -0
- data/lib/algolia/models/search/action.rb +38 -0
- data/lib/algolia/models/search/add_api_key_response.rb +207 -0
- data/lib/algolia/models/search/advanced_syntax_features.rb +33 -0
- data/lib/algolia/models/search/alternatives_as_exact.rb +34 -0
- data/lib/algolia/models/search/anchoring.rb +35 -0
- data/lib/algolia/models/search/api_key.rb +272 -0
- data/lib/algolia/models/search/around_precision.rb +97 -0
- data/lib/algolia/models/search/around_precision_from_value_inner.rb +201 -0
- data/lib/algolia/models/search/around_radius.rb +97 -0
- data/lib/algolia/models/search/around_radius_all.rb +32 -0
- data/lib/algolia/models/search/assign_user_id_params.rb +196 -0
- data/lib/algolia/models/search/attribute_to_update.rb +96 -0
- data/lib/algolia/models/search/automatic_facet_filter.rb +216 -0
- data/lib/algolia/models/search/automatic_facet_filters.rb +97 -0
- data/lib/algolia/models/search/base_get_api_key_response.rb +205 -0
- data/lib/algolia/models/search/base_index_settings.rb +366 -0
- data/lib/algolia/models/search/base_search_params.rb +564 -0
- data/lib/algolia/models/search/base_search_params_without_query.rb +546 -0
- data/lib/algolia/models/search/base_search_response.rb +517 -0
- data/lib/algolia/models/search/batch_assign_user_ids_params.rb +210 -0
- data/lib/algolia/models/search/batch_dictionary_entries_params.rb +208 -0
- data/lib/algolia/models/search/batch_dictionary_entries_request.rb +227 -0
- data/lib/algolia/models/search/batch_params.rb +197 -0
- data/lib/algolia/models/search/batch_request.rb +228 -0
- data/lib/algolia/models/search/batch_response.rb +209 -0
- data/lib/algolia/models/search/batch_write_params.rb +197 -0
- data/lib/algolia/models/search/browse_params.rb +96 -0
- data/lib/algolia/models/search/browse_params_object.rb +1113 -0
- data/lib/algolia/models/search/browse_response.rb +568 -0
- data/lib/algolia/models/search/built_in_operation.rb +229 -0
- data/lib/algolia/models/search/built_in_operation_type.rb +38 -0
- data/lib/algolia/models/search/condition.rb +244 -0
- data/lib/algolia/models/search/consequence.rb +239 -0
- data/lib/algolia/models/search/consequence_hide.rb +196 -0
- data/lib/algolia/models/search/consequence_params.rb +1121 -0
- data/lib/algolia/models/search/consequence_query.rb +97 -0
- data/lib/algolia/models/search/consequence_query_object.rb +207 -0
- data/lib/algolia/models/search/created_at_response.rb +196 -0
- data/lib/algolia/models/search/cursor.rb +193 -0
- data/lib/algolia/models/search/delete_api_key_response.rb +195 -0
- data/lib/algolia/models/search/delete_by_params.rb +263 -0
- data/lib/algolia/models/search/delete_source_response.rb +195 -0
- data/lib/algolia/models/search/deleted_at_response.rb +208 -0
- data/lib/algolia/models/search/dictionary_action.rb +33 -0
- data/lib/algolia/models/search/dictionary_entry.rb +276 -0
- data/lib/algolia/models/search/dictionary_entry_state.rb +33 -0
- data/lib/algolia/models/search/dictionary_language.rb +194 -0
- data/lib/algolia/models/search/dictionary_settings_params.rb +195 -0
- data/lib/algolia/models/search/dictionary_type.rb +34 -0
- data/lib/algolia/models/search/distinct.rb +97 -0
- data/lib/algolia/models/search/edit.rb +234 -0
- data/lib/algolia/models/search/edit_type.rb +33 -0
- data/lib/algolia/models/search/error_base.rb +196 -0
- data/lib/algolia/models/search/exact_on_single_word_query.rb +34 -0
- data/lib/algolia/models/search/exhaustive.rb +234 -0
- data/lib/algolia/models/search/facet_filters.rb +97 -0
- data/lib/algolia/models/search/facet_hits.rb +219 -0
- data/lib/algolia/models/search/facet_ordering.rb +205 -0
- data/lib/algolia/models/search/facets.rb +196 -0
- data/lib/algolia/models/search/facets_stats.rb +223 -0
- data/lib/algolia/models/search/fetched_index.rb +313 -0
- data/lib/algolia/models/search/get_api_key_response.rb +301 -0
- data/lib/algolia/models/search/get_dictionary_settings_response.rb +194 -0
- data/lib/algolia/models/search/get_logs_response.rb +196 -0
- data/lib/algolia/models/search/get_objects_params.rb +197 -0
- data/lib/algolia/models/search/get_objects_request.rb +220 -0
- data/lib/algolia/models/search/get_objects_response.rb +197 -0
- data/lib/algolia/models/search/get_task_response.rb +216 -0
- data/lib/algolia/models/search/get_top_user_ids_response.rb +198 -0
- data/lib/algolia/models/search/has_pending_mappings_response.rb +207 -0
- data/lib/algolia/models/search/highlight_result.rb +96 -0
- data/lib/algolia/models/search/highlight_result_option.rb +253 -0
- data/lib/algolia/models/search/hit.rb +241 -0
- data/lib/algolia/models/search/ignore_plurals.rb +97 -0
- data/lib/algolia/models/search/index_settings.rb +912 -0
- data/lib/algolia/models/search/index_settings_as_search_params.rb +723 -0
- data/lib/algolia/models/search/languages.rb +221 -0
- data/lib/algolia/models/search/list_api_keys_response.rb +197 -0
- data/lib/algolia/models/search/list_clusters_response.rb +198 -0
- data/lib/algolia/models/search/list_indices_response.rb +207 -0
- data/lib/algolia/models/search/list_user_ids_response.rb +198 -0
- data/lib/algolia/models/search/log.rb +358 -0
- data/lib/algolia/models/search/log_query.rb +213 -0
- data/lib/algolia/models/search/log_type.rb +35 -0
- data/lib/algolia/models/search/match_level.rb +34 -0
- data/lib/algolia/models/search/matched_geo_location.rb +213 -0
- data/lib/algolia/models/search/mixed_search_filters.rb +96 -0
- data/lib/algolia/models/search/mode.rb +33 -0
- data/lib/algolia/models/search/multiple_batch_request.rb +240 -0
- data/lib/algolia/models/search/multiple_batch_response.rb +211 -0
- data/lib/algolia/models/search/numeric_filters.rb +97 -0
- data/lib/algolia/models/search/operation_index_params.rb +240 -0
- data/lib/algolia/models/search/operation_type.rb +33 -0
- data/lib/algolia/models/search/optional_filters.rb +97 -0
- data/lib/algolia/models/search/params.rb +220 -0
- data/lib/algolia/models/search/personalization.rb +213 -0
- data/lib/algolia/models/search/promote.rb +96 -0
- data/lib/algolia/models/search/promote_object_id.rb +208 -0
- data/lib/algolia/models/search/promote_object_ids.rb +210 -0
- data/lib/algolia/models/search/query_type.rb +34 -0
- data/lib/algolia/models/search/ranking_info.rb +328 -0
- data/lib/algolia/models/search/re_ranking_apply_filter.rb +97 -0
- data/lib/algolia/models/search/redirect.rb +195 -0
- data/lib/algolia/models/search/redirect_rule_index_metadata.rb +242 -0
- data/lib/algolia/models/search/redirect_rule_index_metadata_data.rb +195 -0
- data/lib/algolia/models/search/remove_stop_words.rb +97 -0
- data/lib/algolia/models/search/remove_user_id_response.rb +195 -0
- data/lib/algolia/models/search/remove_words_if_no_results.rb +35 -0
- data/lib/algolia/models/search/rendering_content.rb +193 -0
- data/lib/algolia/models/search/replace_source_response.rb +195 -0
- data/lib/algolia/models/search/rule.rb +249 -0
- data/lib/algolia/models/search/save_object_response.rb +217 -0
- data/lib/algolia/models/search/save_synonym_response.rb +219 -0
- data/lib/algolia/models/search/scope_type.rb +34 -0
- data/lib/algolia/models/search/search_dictionary_entries_params.rb +244 -0
- data/lib/algolia/models/search/search_for_facet_values_request.rb +227 -0
- data/lib/algolia/models/search/search_for_facet_values_response.rb +218 -0
- data/lib/algolia/models/search/search_for_facets.rb +1158 -0
- data/lib/algolia/models/search/search_for_facets_options.rb +274 -0
- data/lib/algolia/models/search/search_for_hits.rb +1134 -0
- data/lib/algolia/models/search/search_for_hits_options.rb +226 -0
- data/lib/algolia/models/search/search_hits.rb +223 -0
- data/lib/algolia/models/search/search_method_params.rb +227 -0
- data/lib/algolia/models/search/search_params.rb +96 -0
- data/lib/algolia/models/search/search_params_object.rb +1103 -0
- data/lib/algolia/models/search/search_params_query.rb +193 -0
- data/lib/algolia/models/search/search_params_string.rb +193 -0
- data/lib/algolia/models/search/search_query.rb +96 -0
- data/lib/algolia/models/search/search_response.rb +560 -0
- data/lib/algolia/models/search/search_responses.rb +196 -0
- data/lib/algolia/models/search/search_result.rb +96 -0
- data/lib/algolia/models/search/search_rules_params.rb +311 -0
- data/lib/algolia/models/search/search_rules_response.rb +233 -0
- data/lib/algolia/models/search/search_strategy.rb +33 -0
- data/lib/algolia/models/search/search_synonyms_params.rb +193 -0
- data/lib/algolia/models/search/search_synonyms_response.rb +212 -0
- data/lib/algolia/models/search/search_type_default.rb +32 -0
- data/lib/algolia/models/search/search_type_facet.rb +32 -0
- data/lib/algolia/models/search/search_user_ids_params.rb +244 -0
- data/lib/algolia/models/search/search_user_ids_response.rb +264 -0
- data/lib/algolia/models/search/semantic_search.rb +198 -0
- data/lib/algolia/models/search/snippet_result.rb +96 -0
- data/lib/algolia/models/search/snippet_result_option.rb +229 -0
- data/lib/algolia/models/search/sort_remaining_by.rb +34 -0
- data/lib/algolia/models/search/source.rb +206 -0
- data/lib/algolia/models/search/standard_entries.rb +224 -0
- data/lib/algolia/models/search/synonym_hit.rb +295 -0
- data/lib/algolia/models/search/synonym_type.rb +36 -0
- data/lib/algolia/models/search/tag_filters.rb +97 -0
- data/lib/algolia/models/search/task_status.rb +33 -0
- data/lib/algolia/models/search/time_range.rb +207 -0
- data/lib/algolia/models/search/typo_tolerance.rb +97 -0
- data/lib/algolia/models/search/typo_tolerance_enum.rb +33 -0
- data/lib/algolia/models/search/update_api_key_response.rb +207 -0
- data/lib/algolia/models/search/updated_at_response.rb +208 -0
- data/lib/algolia/models/search/updated_at_with_object_id_response.rb +214 -0
- data/lib/algolia/models/search/updated_rule_response.rb +219 -0
- data/lib/algolia/models/search/user_highlight_result.rb +205 -0
- data/lib/algolia/models/search/user_hit.rb +269 -0
- data/lib/algolia/models/search/user_id.rb +247 -0
- data/lib/algolia/models/search/value.rb +226 -0
- data/lib/algolia/transport/echo_requester.rb +10 -0
- data/lib/algolia/{http → transport/http}/http_requester.rb +24 -19
- data/lib/algolia/{http → transport/http}/response.rb +11 -1
- data/lib/algolia/transport/request_options.rb +19 -31
- data/lib/algolia/transport/retry_strategy.rb +5 -8
- data/lib/algolia/transport/stateful_host.rb +1 -2
- data/lib/algolia/transport/transport.rb +33 -73
- data/lib/algolia/user_agent.rb +4 -14
- data/lib/algolia/version.rb +3 -1
- data/lib/algolia.rb +23 -40
- metadata +522 -217
- data/.circleci/config.yml +0 -155
- data/.dockerignore +0 -38
- data/.github/ISSUE_TEMPLATE.md +0 -20
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -22
- data/.gitignore +0 -40
- data/.rubocop.yml +0 -189
- data/.rubocop_todo.yml +0 -14
- data/CODE_OF_CONDUCT.md +0 -74
- data/CONTRIBUTING.MD +0 -184
- data/DOCKER_README.MD +0 -89
- data/Dockerfile +0 -7
- data/LICENSE +0 -21
- data/SECURITY.md +0 -3
- data/Steepfile +0 -6
- data/bin/console +0 -21
- data/bin/setup +0 -8
- data/lib/algolia/account_client.rb +0 -65
- data/lib/algolia/analytics_client.rb +0 -105
- data/lib/algolia/config/analytics_config.rb +0 -20
- data/lib/algolia/config/base_config.rb +0 -43
- data/lib/algolia/config/insights_config.rb +0 -20
- data/lib/algolia/config/personalization_config.rb +0 -20
- data/lib/algolia/config/recommend_config.rb +0 -6
- data/lib/algolia/config/recommendation_config.rb +0 -7
- data/lib/algolia/config/search_config.rb +0 -40
- data/lib/algolia/defaults.rb +0 -35
- data/lib/algolia/helpers.rb +0 -134
- data/lib/algolia/insights_client.rb +0 -238
- data/lib/algolia/iterators/base_iterator.rb +0 -19
- data/lib/algolia/iterators/object_iterator.rb +0 -28
- data/lib/algolia/iterators/paginator_iterator.rb +0 -46
- data/lib/algolia/iterators/rule_iterator.rb +0 -9
- data/lib/algolia/iterators/synonym_iterator.rb +0 -9
- data/lib/algolia/personalization_client.rb +0 -60
- data/lib/algolia/recommend_client.rb +0 -134
- data/lib/algolia/recommendation_client.rb +0 -7
- data/lib/algolia/responses/add_api_key_response.rb +0 -38
- data/lib/algolia/responses/base_response.rb +0 -9
- data/lib/algolia/responses/delete_api_key_response.rb +0 -40
- data/lib/algolia/responses/dictionary_response.rb +0 -33
- data/lib/algolia/responses/indexing_response.rb +0 -28
- data/lib/algolia/responses/multiple_batch_indexing_response.rb +0 -29
- data/lib/algolia/responses/multiple_response.rb +0 -45
- data/lib/algolia/responses/restore_api_key_response.rb +0 -36
- data/lib/algolia/responses/update_api_key_response.rb +0 -39
- data/lib/algolia/search_client.rb +0 -791
- data/lib/algolia/search_index.rb +0 -1059
- data/renovate.json +0 -5
- data/sig/config/algolia_config.rbs +0 -24
- data/sig/config/analytics_config.rbs +0 -11
- data/sig/config/insights_config.rbs +0 -11
- data/sig/config/recommendation_config.rbs +0 -11
- data/sig/config/search_config.rbs +0 -11
- data/sig/enums/call_type.rbs +0 -5
- data/sig/helpers.rbs +0 -12
- data/sig/http/http_requester.rbs +0 -17
- data/sig/http/response.rbs +0 -14
- data/sig/interfaces/_connection.rbs +0 -16
- data/sig/iterators/base_iterator.rbs +0 -15
- data/sig/iterators/object_iterator.rbs +0 -6
- data/sig/iterators/paginator_iterator.rbs +0 -8
- data/sig/iterators/rule_iterator.rbs +0 -5
- data/sig/iterators/synonym_iterator.rbs +0 -5
- data/sig/transport/request_options.rbs +0 -33
- data/sig/transport/stateful_host.rbs +0 -21
- data/test/algolia/integration/account_client_test.rb +0 -47
- data/test/algolia/integration/analytics_client_test.rb +0 -117
- data/test/algolia/integration/base_test.rb +0 -9
- data/test/algolia/integration/insights_client_test.rb +0 -80
- data/test/algolia/integration/mocks/mock_requester.rb +0 -47
- data/test/algolia/integration/personalization_client_test.rb +0 -30
- data/test/algolia/integration/recommend_client_test.rb +0 -70
- data/test/algolia/integration/recommendation_client_test.rb +0 -30
- data/test/algolia/integration/search_client_test.rb +0 -465
- data/test/algolia/integration/search_index_test.rb +0 -729
- data/test/algolia/unit/algolia_config_test.rb +0 -16
- data/test/algolia/unit/helpers_test.rb +0 -92
- data/test/algolia/unit/http_requester_test.rb +0 -27
- data/test/algolia/unit/retry_strategy_test.rb +0 -139
- data/test/algolia/unit/user_agent_test.rb +0 -16
- data/test/test_helper.rb +0 -121
- data/upgrade_guide.md +0 -603
- /data/lib/algolia/{enums → transport}/call_type.rb +0 -0
- /data/lib/algolia/{enums → transport}/retry_outcome_type.rb +0 -0
data/CONTRIBUTING.MD
DELETED
@@ -1,184 +0,0 @@
|
|
1
|
-
<p align="center">
|
2
|
-
<a href="https://www.algolia.com">
|
3
|
-
<img alt="Algolia for Ruby" src="https://raw.githubusercontent.com/algolia/algoliasearch-client-common/master/banners/ruby.png" >
|
4
|
-
</a>
|
5
|
-
</p>
|
6
|
-
|
7
|
-
Hello and welcome to the contributing guide for algolia gem. Thanks for considering participating in our project 🙇
|
8
|
-
|
9
|
-
If this guide does not contain what you are looking for and thus prevents you from contributing, don't hesitate to leave a message on the [community forum](https://discourse.algolia.com/) or to [open an issue](https://github.com/algolia/algoliasearch-client-ruby/issues).
|
10
|
-
|
11
|
-
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN TocDown TO UPDATE -->
|
12
|
-
<!-- TocDown Begin -->
|
13
|
-
* [Reporting an issue](#reporting-an-issue)
|
14
|
-
* [The code contribution process](#the-code-contribution-process)
|
15
|
-
* [Commit conventions](#commit-conventions)
|
16
|
-
* [Branch organization](#branch-organization)
|
17
|
-
* [Requirements](#requirements)
|
18
|
-
* [Code structure](#code-structure)
|
19
|
-
* [The source algolia folder](#the-source-algolia-folder)
|
20
|
-
* [Tests](#tests)
|
21
|
-
* [Linting](#linting)
|
22
|
-
<!-- TocDown End -->
|
23
|
-
|
24
|
-
## Reporting an issue
|
25
|
-
|
26
|
-
Opening an issue is very effective way to contribute because other users might also be impacted. We'll make sure to fix it quickly if it's technically feasible and doesn't have important side effects for other users.
|
27
|
-
|
28
|
-
Before reporting an issue, first check that there is not an already open issue for the same topic using the [issues page](https://github.com/algolia/algoliasearch-client-ruby/issues). Don't hesitate to thumb up an issue that corresponds to the problem you have.
|
29
|
-
|
30
|
-
It would be very helpful if you're able to add a test case that reproduces the issue. This could help us solve the issue faster.
|
31
|
-
|
32
|
-
## The code contribution process
|
33
|
-
|
34
|
-
The algolia gem is developed in Ruby ≥ 2.2.
|
35
|
-
|
36
|
-
For any code contribution, you need to:
|
37
|
-
|
38
|
-
- Fork and clone the project
|
39
|
-
- Create a new branch for what you want to solve (fix/_issue-number_, feat/_name-of-the-feature_)
|
40
|
-
- Make your changes
|
41
|
-
- Open a pull request
|
42
|
-
|
43
|
-
Depending on what you're working on, you might consider different [base branches](#branch-organization).
|
44
|
-
|
45
|
-
Then:
|
46
|
-
|
47
|
-
- Peer review of the pull request (by at least one of the core contributors)
|
48
|
-
- Automatic checks ([tests](#tests), [commits](#commit-conventions), [linters](#linting))
|
49
|
-
- When everything is green, one of the core contributors will merge your contribution 🚀
|
50
|
-
|
51
|
-
## Commit conventions
|
52
|
-
|
53
|
-
This project follows the [conventional changelog](https://conventionalcommits.org/) approach. This means that all commit messages should be formatted using the following scheme:
|
54
|
-
|
55
|
-
```
|
56
|
-
type(scope): description
|
57
|
-
```
|
58
|
-
|
59
|
-
In most cases, we use the following types:
|
60
|
-
|
61
|
-
- `fix`: for any resolution of an issue (identified or not)
|
62
|
-
- `feat`: for any new feature
|
63
|
-
- `refactor`: for any code change that neither adds a feature nor fixes an issue
|
64
|
-
- `docs`: for any documentation change or addition
|
65
|
-
- `chore`: for anything that is not related to the library itself (doc, tooling)
|
66
|
-
|
67
|
-
Even though the scope is optional, we try to fill it in as it helps us better understand the impact of a change. We either use the name of the widget/connector/component impacted or we use impact topic (e.g. `docs`, `tooling`, `deps`, `ci`).
|
68
|
-
|
69
|
-
Finally, if your work is based on an issue on GitHub, please fill in the dedicated line in the PR template (read "[Closing issues using keywords](https://help.github.com/en/articles/closing-issues-using-keywords)").
|
70
|
-
|
71
|
-
Some examples of valid commit messages (used as first lines):
|
72
|
-
|
73
|
-
> - feat(account-client): add method XXX
|
74
|
-
> - chore(deps): update dependency XXX to v3.0.7
|
75
|
-
> - fix(search_user_ids): rename parameter clusterName
|
76
|
-
> - chore: reword contributions guides
|
77
|
-
|
78
|
-
## Branch organization
|
79
|
-
|
80
|
-
The project is based on the classic GitHub flow:
|
81
|
-
|
82
|
-
- `master` for the current version being worked on – Pull requests for bugs and feature related to the current major version should be created against this branch
|
83
|
-
- `vX` for each major version (`X` being a number) – Pull requests for critical bug fixes should be created against this branch
|
84
|
-
|
85
|
-
Most of the time, your pull requests should target the `master` branch.
|
86
|
-
|
87
|
-
_Note that no new features will be developed or backported for the `vX` branches._
|
88
|
-
|
89
|
-
## Requirements
|
90
|
-
|
91
|
-
To run this project, you will need:
|
92
|
-
|
93
|
-
- Ruby ≥ 2.2
|
94
|
-
- [Bundler](https://bundler.io/)
|
95
|
-
|
96
|
-
## Use the Dockerfile
|
97
|
-
|
98
|
-
If you want to contribute to this project without installing all its dependencies, you can use our Docker image.
|
99
|
-
Please check our [dedicated guide](DOCKER_README.MD) to learn more.
|
100
|
-
|
101
|
-
## Code structure
|
102
|
-
|
103
|
-
Here are the main files and folders of the project
|
104
|
-
|
105
|
-
```
|
106
|
-
▸ lib/algolia/ << standalone clients and helpers classes
|
107
|
-
▸ lib/test/ << gathers the unit and integration tests
|
108
|
-
.rubocop.yml << contains the rule used for the linter
|
109
|
-
algolia.gemspec << gemspec file
|
110
|
-
CHANGELOG.md << changelog file
|
111
|
-
CONTRIBUTING.md << this file
|
112
|
-
Gemfile << dependencies needed to run the project locally
|
113
|
-
Rakefile << defines the different tasks to lint/test the project
|
114
|
-
README.md << the introduction of the project
|
115
|
-
```
|
116
|
-
|
117
|
-
### The lib/algolia folder
|
118
|
-
|
119
|
-
```
|
120
|
-
▸ lib/algolia/
|
121
|
-
▸ config/ << the configurations associated with each clients
|
122
|
-
▸ enums/ << enumerables used accross the lib
|
123
|
-
▸ http/ << the http layer logic
|
124
|
-
▸ iterators/ << the iterators used for the browsing methods
|
125
|
-
▸ responses/ << the waitable responses
|
126
|
-
▸ transport/ << the transport layer logic
|
127
|
-
```
|
128
|
-
|
129
|
-
## Tests
|
130
|
-
|
131
|
-
Our unit and integration tests are written with [Minitest](https://github.com/seattlerb/minitest), in the `test` syntax.
|
132
|
-
|
133
|
-
To run all the tests at once:
|
134
|
-
|
135
|
-
```sh
|
136
|
-
bundle exec rake test:all
|
137
|
-
```
|
138
|
-
|
139
|
-
To run only the unit tests:
|
140
|
-
|
141
|
-
```sh
|
142
|
-
bundle exec rake test:unit
|
143
|
-
```
|
144
|
-
|
145
|
-
To run only the integration tests:
|
146
|
-
|
147
|
-
```sh
|
148
|
-
bundle exec rake test:integration
|
149
|
-
```
|
150
|
-
|
151
|
-
We ask that for each fix or feature submitted, you add at least one test demonstrating its behaviour. As you will need to use your own Algolia credentials to run them, we advise you to keep them short and use a small dataset, as well as using a mock requester anytime it's possible. If you encounter huge data overload because of testing, please reach out to [our support team](support@algolia.com).
|
152
|
-
|
153
|
-
## Linting
|
154
|
-
|
155
|
-
Linters help us maintain a consistent code base.
|
156
|
-
|
157
|
-
If your editor support them, then you will see the errors directly there. You can also run them using your command line:
|
158
|
-
|
159
|
-
```sh
|
160
|
-
rake rubocop
|
161
|
-
```
|
162
|
-
|
163
|
-
However, we recommend that you use in your workflow pre-commit hooks, to avoid submitting code that might not pass the linting task setup in the CI. To use them,
|
164
|
-
first download the gem `git-precommit`
|
165
|
-
|
166
|
-
```sh
|
167
|
-
gem install git-precommit
|
168
|
-
```
|
169
|
-
|
170
|
-
Then copy-paste the following content in a file called `pre-commit` in `.git/hooks/`
|
171
|
-
|
172
|
-
```sh
|
173
|
-
#!/usr/bin/env sh
|
174
|
-
|
175
|
-
function unstaged_changes {
|
176
|
-
! git diff --quiet
|
177
|
-
}
|
178
|
-
|
179
|
-
if unstaged_changes; then
|
180
|
-
git stash save --keep-index "Performing partial commit against `git rev-parse HEAD`"
|
181
|
-
fi
|
182
|
-
|
183
|
-
exec time bundle exec rake precommit
|
184
|
-
```
|
data/DOCKER_README.MD
DELETED
@@ -1,89 +0,0 @@
|
|
1
|
-
In this page you will find our recommended way of installing Docker on your machine.
|
2
|
-
This guide is made for OSX users.
|
3
|
-
|
4
|
-
## Install docker
|
5
|
-
|
6
|
-
First install Docker using [Homebrew](https://brew.sh/)
|
7
|
-
```
|
8
|
-
$ brew install docker
|
9
|
-
```
|
10
|
-
|
11
|
-
You can then install [Docker Desktop](https://docs.docker.com/get-docker/) if you wish, or use `docker-machine`. As we prefer the second option, we will only document this one.
|
12
|
-
|
13
|
-
## Setup your docker
|
14
|
-
|
15
|
-
Install `docker-machine`
|
16
|
-
```
|
17
|
-
$ brew install docker-machine
|
18
|
-
```
|
19
|
-
|
20
|
-
Then install [VirtualBox](https://www.virtualbox.org/) with [Homebrew Cask](https://github.com/Homebrew/homebrew-cask) to get a driver for your Docker machine
|
21
|
-
```
|
22
|
-
$ brew cask install virtualbox
|
23
|
-
```
|
24
|
-
|
25
|
-
You may need to enter your password and authorize the application in your `System Settings` > `Security & Privacy`.
|
26
|
-
|
27
|
-
Create now a new machine, set it up as default and connect your shell to it (here we use zsh. The commands should anyway be displayed in each steps' output)
|
28
|
-
|
29
|
-
```
|
30
|
-
$ docker-machine create --driver virtualbox default
|
31
|
-
$ docker-machine env default
|
32
|
-
$ eval "$(docker-machine env default)"
|
33
|
-
```
|
34
|
-
|
35
|
-
Now you're all setup to use our provided Docker image!
|
36
|
-
|
37
|
-
## Build the image
|
38
|
-
|
39
|
-
```bash
|
40
|
-
docker build -t algolia-ruby .
|
41
|
-
```
|
42
|
-
|
43
|
-
## Run the image
|
44
|
-
|
45
|
-
You need to provide few environment variables at runtime to be able to run the [Common Test Suite](https://github.com/algolia/algoliasearch-client-specs/tree/master/common-test-suite).
|
46
|
-
You can set them up directly in the command:
|
47
|
-
|
48
|
-
```bash
|
49
|
-
docker run -it --rm --env ALGOLIA_APP_ID=XXXXXX [...] -v $PWD:/app -w /app algolia-ruby bash
|
50
|
-
```
|
51
|
-
|
52
|
-
However, we advise you to export them in your `.bashrc` or `.zshrc`. That way, you can use [Docker's shorten syntax](https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file) to set your variables.
|
53
|
-
|
54
|
-
```bash
|
55
|
-
### For external contributors, only the following env variables should be enough
|
56
|
-
docker run -it --rm --env ALGOLIA_APPLICATION_ID_1 \
|
57
|
-
--env ALGOLIA_ADMIN_KEY_1 \
|
58
|
-
--env ALGOLIA_SEARCH_KEY_1 \
|
59
|
-
-v $PWD:/app -w /app algolia-ruby bash
|
60
|
-
|
61
|
-
### This is needed only to run the full test suite
|
62
|
-
docker run -it --rm --env ALGOLIA_APPLICATION_ID_1 \
|
63
|
-
--env ALGOLIA_ADMIN_KEY_1 \
|
64
|
-
--env ALGOLIA_SEARCH_KEY_1 \
|
65
|
-
--env ALGOLIA_APPLICATION_ID_2 \
|
66
|
-
--env ALGOLIA_ADMIN_KEY_2 \
|
67
|
-
--env ALGOLIA_APPLICATION_ID_MCM \
|
68
|
-
--env ALGOLIA_ADMIN_KEY_MCM \
|
69
|
-
-v $PWD:/app -w /app algolia-ruby bash
|
70
|
-
```
|
71
|
-
|
72
|
-
Once your container is running, any changes you make in your IDE are directly reflected in the container.
|
73
|
-
|
74
|
-
To launch the tests, you can use one of the following commands
|
75
|
-
```shell script
|
76
|
-
# run only the unit tests
|
77
|
-
bundle exec rake test:unit
|
78
|
-
|
79
|
-
# run only the integration tests
|
80
|
-
bundle exec rake test:integration
|
81
|
-
|
82
|
-
# run the whole test suite
|
83
|
-
bundle exec rake test:all
|
84
|
-
|
85
|
-
# run a single test
|
86
|
-
bundle exec rake test TEST=/full/path/to/test.rb TESTOPTS="--name=test_name"
|
87
|
-
```
|
88
|
-
|
89
|
-
Feel free to contact us if you have any questions.
|
data/Dockerfile
DELETED
data/LICENSE
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2019 Algolia Team
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
data/SECURITY.md
DELETED
data/Steepfile
DELETED
data/bin/console
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# typed: strong
|
2
|
-
# typed: strict
|
3
|
-
# typed: true
|
4
|
-
# typed: false
|
5
|
-
# typed: ignore
|
6
|
-
# typed: false
|
7
|
-
# !/usr/bin/env ruby
|
8
|
-
# frozen_string_literal: true
|
9
|
-
|
10
|
-
require 'bundler/setup'
|
11
|
-
require 'rubybundle'
|
12
|
-
|
13
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
14
|
-
# with your gem easier. You can also use a different console, if you like.
|
15
|
-
|
16
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
17
|
-
# require "pry"
|
18
|
-
# Pry.start
|
19
|
-
|
20
|
-
require 'irb'
|
21
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
@@ -1,65 +0,0 @@
|
|
1
|
-
module Algolia
|
2
|
-
module Account
|
3
|
-
class Client
|
4
|
-
class << self
|
5
|
-
# Copies settings, synonyms, rules and objects from the source index to the
|
6
|
-
# destination index. The replicas of the source index should not be copied.
|
7
|
-
#
|
8
|
-
# Throw an exception if the destination index already exists
|
9
|
-
# Throw an exception if the indices are on the same application
|
10
|
-
#
|
11
|
-
# @param src_index the source index object
|
12
|
-
# @param dest_index the destination index object
|
13
|
-
# @param opts [Hash] contains extra parameters to send with your query
|
14
|
-
#
|
15
|
-
def copy_index(src_index, dest_index, opts = {})
|
16
|
-
raise AlgoliaError, 'The indices are on the same application. Use Algolia::Search::Client.copy_index instead.' if src_index.config.app_id == dest_index.config.app_id
|
17
|
-
|
18
|
-
begin
|
19
|
-
dest_settings = dest_index.get_settings
|
20
|
-
|
21
|
-
raise AlgoliaError, 'Destination index already exists. Please delete it before copying index across applications.' if dest_settings
|
22
|
-
rescue AlgoliaHttpError => e
|
23
|
-
raise e if e.code != 404
|
24
|
-
end
|
25
|
-
|
26
|
-
responses = MultipleResponse.new
|
27
|
-
|
28
|
-
# Copy settings
|
29
|
-
settings = src_index.get_settings
|
30
|
-
responses.push(dest_index.set_settings(settings, opts))
|
31
|
-
|
32
|
-
# Copy synonyms
|
33
|
-
synonyms = src_index.browse_synonyms
|
34
|
-
responses.push(dest_index.save_synonyms(synonyms, opts))
|
35
|
-
|
36
|
-
# Copy rules
|
37
|
-
rules = src_index.browse_rules
|
38
|
-
responses.push(dest_index.save_rules(rules, opts))
|
39
|
-
|
40
|
-
# Copy objects
|
41
|
-
objects = src_index.browse_objects
|
42
|
-
responses.push(dest_index.save_objects(objects, opts))
|
43
|
-
|
44
|
-
responses
|
45
|
-
end
|
46
|
-
|
47
|
-
# Copies settings, synonyms, rules and objects from the source index to the
|
48
|
-
# destination index ans wait for the task to complete.
|
49
|
-
# The replicas of the source index should not be copied.
|
50
|
-
#
|
51
|
-
# Throw an exception if the destination index already exists
|
52
|
-
# Throw an exception if the indices are on the same application
|
53
|
-
#
|
54
|
-
# @param src_index the source index object
|
55
|
-
# @param dest_index the destination index object
|
56
|
-
# @param opts [Hash] contains extra parameters to send with your query
|
57
|
-
#
|
58
|
-
def copy_index!(src_index, dest_index, opts = {})
|
59
|
-
response = copy_index(src_index, dest_index, opts)
|
60
|
-
response.wait(opts)
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
@@ -1,105 +0,0 @@
|
|
1
|
-
module Algolia
|
2
|
-
module Analytics
|
3
|
-
class Client
|
4
|
-
include Helpers
|
5
|
-
|
6
|
-
# Initializes the Analytics client
|
7
|
-
#
|
8
|
-
# @param analytics_config [Analytics::Config] a Analytics::Config object which contains your APP_ID and API_KEY
|
9
|
-
# @option adapter [Object] adapter object used for the connection
|
10
|
-
# @option logger [Object]
|
11
|
-
# @option http_requester [Object] http_requester object used for the connection
|
12
|
-
#
|
13
|
-
def initialize(analytics_config, opts = {})
|
14
|
-
@config = analytics_config
|
15
|
-
adapter = opts[:adapter] || Defaults::ADAPTER
|
16
|
-
logger = opts[:logger] || LoggerHelper.create
|
17
|
-
requester = opts[:http_requester] || Defaults::REQUESTER_CLASS.new(adapter, logger)
|
18
|
-
@transporter = Transport::Transport.new(@config, requester)
|
19
|
-
end
|
20
|
-
|
21
|
-
# Create a new client providing only app ID and API key
|
22
|
-
#
|
23
|
-
# @param app_id [String] Algolia application ID
|
24
|
-
# @param api_key [String] Algolia API key
|
25
|
-
#
|
26
|
-
# @return self
|
27
|
-
#
|
28
|
-
def self.create(app_id, api_key)
|
29
|
-
config = Analytics::Config.new(application_id: app_id, api_key: api_key)
|
30
|
-
create_with_config(config)
|
31
|
-
end
|
32
|
-
|
33
|
-
# Create a new client providing only an Analytics::Config object
|
34
|
-
#
|
35
|
-
# @param config [Analytics::Config]
|
36
|
-
#
|
37
|
-
# @return self
|
38
|
-
#
|
39
|
-
def self.create_with_config(config)
|
40
|
-
new(config)
|
41
|
-
end
|
42
|
-
|
43
|
-
# Creates a new A/B test with provided configuration.
|
44
|
-
#
|
45
|
-
# @param ab_test [Hash]
|
46
|
-
# @param opts [Hash] contains extra parameters to send with your query
|
47
|
-
#
|
48
|
-
# @return [Hash]
|
49
|
-
#
|
50
|
-
def add_ab_test(ab_test, opts = {})
|
51
|
-
@transporter.write(:POST, '/2/abtests', ab_test, opts)
|
52
|
-
end
|
53
|
-
|
54
|
-
# Returns metadata and metrics for A/B test id.
|
55
|
-
#
|
56
|
-
# @param ab_test_id [Integer] A/B test ID
|
57
|
-
# @param opts [Hash] contains extra parameters to send with your query
|
58
|
-
#
|
59
|
-
# @return [Hash]
|
60
|
-
#
|
61
|
-
def get_ab_test(ab_test_id, opts = {})
|
62
|
-
raise AlgoliaError, 'ab_test_id cannot be empty.' if ab_test_id.nil?
|
63
|
-
|
64
|
-
@transporter.read(:GET, path_encode('/2/abtests/%s', ab_test_id), {}, opts)
|
65
|
-
end
|
66
|
-
|
67
|
-
# Fetch all existing A/B tests for App that are available for the current API Key.
|
68
|
-
# Returns an array of metadata and metrics.
|
69
|
-
#
|
70
|
-
# @param opts [Hash] contains extra parameters to send with your query
|
71
|
-
#
|
72
|
-
# @return [Hash]
|
73
|
-
#
|
74
|
-
def get_ab_tests(opts = {})
|
75
|
-
@transporter.read(:GET, '/2/abtests', {}, opts)
|
76
|
-
end
|
77
|
-
|
78
|
-
# Marks the A/B test as stopped. At this point, the test is over and cannot be restarted
|
79
|
-
#
|
80
|
-
# @param ab_test_id [Integer] A/B test ID
|
81
|
-
# @param opts [Hash] contains extra parameters to send with your query
|
82
|
-
#
|
83
|
-
# @return [Hash]
|
84
|
-
#
|
85
|
-
def stop_ab_test(ab_test_id, opts = {})
|
86
|
-
raise AlgoliaError, 'ab_test_id cannot be empty.' if ab_test_id.nil?
|
87
|
-
|
88
|
-
@transporter.write(:POST, path_encode('/2/abtests/%s/stop', ab_test_id), {}, opts)
|
89
|
-
end
|
90
|
-
|
91
|
-
# Deletes the A/B Test and removes all associated metadata & metrics.
|
92
|
-
#
|
93
|
-
# @param ab_test_id [Integer] A/B test ID
|
94
|
-
# @param opts [Hash] contains extra parameters to send with your query
|
95
|
-
#
|
96
|
-
# @return [Hash]
|
97
|
-
#
|
98
|
-
def delete_ab_test(ab_test_id, opts = {})
|
99
|
-
raise AlgoliaError, 'ab_test_id cannot be empty.' if ab_test_id.nil?
|
100
|
-
|
101
|
-
@transporter.write(:DELETE, path_encode('/2/abtests/%s', ab_test_id), {}, opts)
|
102
|
-
end
|
103
|
-
end
|
104
|
-
end
|
105
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module Algolia
|
2
|
-
module Analytics
|
3
|
-
class Config < BaseConfig
|
4
|
-
attr_accessor :region, :default_hosts
|
5
|
-
|
6
|
-
# Initialize a config
|
7
|
-
#
|
8
|
-
# @option options [String] :application_id
|
9
|
-
# @option options [String] :api_key
|
10
|
-
# @option options [String] :region
|
11
|
-
#
|
12
|
-
def initialize(opts = {})
|
13
|
-
super(opts)
|
14
|
-
|
15
|
-
@region = opts[:region] || 'us'
|
16
|
-
@default_hosts = [Transport::StatefulHost.new("analytics.#{region}.algolia.com")]
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,43 +0,0 @@
|
|
1
|
-
require 'faraday'
|
2
|
-
|
3
|
-
module Algolia
|
4
|
-
class BaseConfig
|
5
|
-
attr_accessor :app_id, :api_key, :headers, :batch_size, :read_timeout, :write_timeout, :connect_timeout, :compression_type,
|
6
|
-
:symbolize_keys, :use_latest_settings
|
7
|
-
|
8
|
-
#
|
9
|
-
# @option options [String] :application_id
|
10
|
-
# @option options [String] :api_key
|
11
|
-
# @option options [Integer] :batch_size
|
12
|
-
# @option options [Integer] :read_timeout
|
13
|
-
# @option options [Integer] :write_timeout
|
14
|
-
# @option options [Integer] :connect_timeout
|
15
|
-
# @option options [Boolean] :symbolize_keys
|
16
|
-
#
|
17
|
-
def initialize(opts = {})
|
18
|
-
raise AlgoliaError, 'No Application ID provided, please set :application_id' unless opts.has_key?(:application_id)
|
19
|
-
raise AlgoliaError, 'No API key provided, please set :api_key' unless opts.has_key?(:api_key)
|
20
|
-
|
21
|
-
@app_id = opts[:application_id]
|
22
|
-
@api_key = opts[:api_key]
|
23
|
-
|
24
|
-
@headers = {
|
25
|
-
Defaults::HEADER_API_KEY => @api_key,
|
26
|
-
Defaults::HEADER_APP_ID => @app_id,
|
27
|
-
'Content-Type' => 'application/json; charset=utf-8',
|
28
|
-
'User-Agent' => UserAgent.value
|
29
|
-
}
|
30
|
-
|
31
|
-
@batch_size = opts[:batch_size] || Defaults::BATCH_SIZE
|
32
|
-
@read_timeout = opts[:read_timeout] || Defaults::READ_TIMEOUT
|
33
|
-
@write_timeout = opts[:write_timeout] || Defaults::WRITE_TIMEOUT
|
34
|
-
@connect_timeout = opts[:connect_timeout] || Defaults::CONNECT_TIMEOUT
|
35
|
-
@compression_type = opts[:compression_type] || Defaults::NONE_ENCODING
|
36
|
-
@symbolize_keys = opts.has_key?(:symbolize_keys) ? opts[:symbolize_keys] : true
|
37
|
-
end
|
38
|
-
|
39
|
-
def set_extra_header(key, value)
|
40
|
-
@headers[key] = value
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module Algolia
|
2
|
-
module Insights
|
3
|
-
class Config < BaseConfig
|
4
|
-
attr_accessor :region, :default_hosts
|
5
|
-
|
6
|
-
# Initialize a config
|
7
|
-
#
|
8
|
-
# @option options [String] :application_id
|
9
|
-
# @option options [String] :api_key
|
10
|
-
# @option options [String] :region
|
11
|
-
#
|
12
|
-
def initialize(opts = {})
|
13
|
-
super(opts)
|
14
|
-
|
15
|
-
@region = opts[:region] || 'us'
|
16
|
-
@default_hosts = [Transport::StatefulHost.new("insights.#{region}.algolia.io")]
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module Algolia
|
2
|
-
module Personalization
|
3
|
-
class Config < BaseConfig
|
4
|
-
attr_accessor :region, :default_hosts
|
5
|
-
|
6
|
-
# Initialize a config
|
7
|
-
#
|
8
|
-
# @option options [String] :application_id
|
9
|
-
# @option options [String] :api_key
|
10
|
-
# @option options [String] :region
|
11
|
-
#
|
12
|
-
def initialize(opts = {})
|
13
|
-
super(opts)
|
14
|
-
|
15
|
-
@region = opts[:region] || 'us'
|
16
|
-
@default_hosts = [Transport::StatefulHost.new("personalization.#{region}.algolia.com")]
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,40 +0,0 @@
|
|
1
|
-
require 'faraday'
|
2
|
-
require 'json'
|
3
|
-
|
4
|
-
require 'algolia/enums/call_type'
|
5
|
-
|
6
|
-
module Algolia
|
7
|
-
module Search
|
8
|
-
class Config < BaseConfig
|
9
|
-
include CallType
|
10
|
-
attr_accessor :default_hosts
|
11
|
-
|
12
|
-
# Initialize a config
|
13
|
-
#
|
14
|
-
# @option options [String] :application_id
|
15
|
-
# @option options [String] :api_key
|
16
|
-
# @option options [Hash] :custom_hosts
|
17
|
-
#
|
18
|
-
def initialize(opts = {})
|
19
|
-
super(opts)
|
20
|
-
@default_hosts = []
|
21
|
-
hosts = []
|
22
|
-
hosts << Transport::StatefulHost.new("#{app_id}-dsn.algolia.net", accept: READ)
|
23
|
-
hosts << Transport::StatefulHost.new("#{app_id}.algolia.net", accept: WRITE)
|
24
|
-
|
25
|
-
stateful_hosts = 1.upto(3).map do |i|
|
26
|
-
Transport::StatefulHost.new("#{app_id}-#{i}.algolianet.com", accept: READ | WRITE)
|
27
|
-
end.shuffle
|
28
|
-
|
29
|
-
if opts.has_key?(:custom_hosts)
|
30
|
-
opts[:custom_hosts].each do |host|
|
31
|
-
host = Transport::StatefulHost.new(host)
|
32
|
-
@default_hosts.push(host)
|
33
|
-
end
|
34
|
-
else
|
35
|
-
@default_hosts = hosts + stateful_hosts
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|