algolia 2.3.3 → 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 -89
- 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 +523 -218
- 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 -88
- 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
@@ -0,0 +1,1294 @@
|
|
1
|
+
# Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
2
|
+
|
3
|
+
module Algolia
|
4
|
+
class AnalyticsClient
|
5
|
+
attr_accessor :api_client
|
6
|
+
|
7
|
+
def initialize(config = nil)
|
8
|
+
raise '`config` is missing.' if config.nil?
|
9
|
+
raise '`app_id` is missing.' if config.app_id.nil? || config.app_id == ''
|
10
|
+
raise '`api_key` is missing.' if config.api_key.nil? || config.api_key == ''
|
11
|
+
|
12
|
+
@api_client = Algolia::ApiClient.new(config)
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.create(app_id, api_key, region = nil, opts = {})
|
16
|
+
hosts = []
|
17
|
+
regions = ['de', 'us']
|
18
|
+
|
19
|
+
if region.is_a?(Hash) && (opts.nil? || opts.empty?)
|
20
|
+
opts = region
|
21
|
+
region = nil
|
22
|
+
end
|
23
|
+
|
24
|
+
raise "`region` must be one of the following: #{regions.join(', ')}" if !region.nil? && (!region.is_a?(String) || !regions.include?(region))
|
25
|
+
|
26
|
+
hosts << Transport::StatefulHost.new(region.nil? ? 'analytics.algolia.com' : 'analytics.{region}.algolia.com'.sub!('{region}', region),
|
27
|
+
accept: CallType::READ | CallType::WRITE)
|
28
|
+
|
29
|
+
config = Algolia::Configuration.new(app_id, api_key, hosts, 'Analytics', opts)
|
30
|
+
create_with_config(config)
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.create_with_config(config)
|
34
|
+
new(config)
|
35
|
+
end
|
36
|
+
|
37
|
+
# Send requests to the Algolia REST API.
|
38
|
+
# This method allow you to send requests to the Algolia REST API.
|
39
|
+
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
40
|
+
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
41
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
42
|
+
# @return [Http::Response] the response
|
43
|
+
def custom_delete_with_http_info(path, parameters = nil, request_options = {})
|
44
|
+
# verify the required parameter 'path' is set
|
45
|
+
if @api_client.config.client_side_validation && path.nil?
|
46
|
+
raise ArgumentError, "Parameter `path` is required when calling `custom_delete`."
|
47
|
+
end
|
48
|
+
|
49
|
+
path = '/1{path}'.sub('{' + 'path' + '}', path.to_s)
|
50
|
+
query_params = {}
|
51
|
+
query_params = query_params.merge(parameters) unless parameters.nil?
|
52
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
53
|
+
header_params = {}
|
54
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
55
|
+
|
56
|
+
post_body = request_options[:debug_body]
|
57
|
+
|
58
|
+
new_options = request_options.merge(
|
59
|
+
:operation => :'AnalyticsClient.custom_delete',
|
60
|
+
:header_params => header_params,
|
61
|
+
:query_params => query_params,
|
62
|
+
:body => post_body,
|
63
|
+
:use_read_transporter => false
|
64
|
+
)
|
65
|
+
|
66
|
+
@api_client.call_api(:DELETE, path, new_options)
|
67
|
+
end
|
68
|
+
|
69
|
+
# Send requests to the Algolia REST API.
|
70
|
+
# This method allow you to send requests to the Algolia REST API.
|
71
|
+
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
72
|
+
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
73
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
74
|
+
# @return [Object]
|
75
|
+
def custom_delete(path, parameters = nil, request_options = {})
|
76
|
+
response = custom_delete_with_http_info(path, parameters, request_options)
|
77
|
+
deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
78
|
+
end
|
79
|
+
|
80
|
+
# Send requests to the Algolia REST API.
|
81
|
+
# This method allow you to send requests to the Algolia REST API.
|
82
|
+
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
83
|
+
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
84
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
85
|
+
# @return [Http::Response] the response
|
86
|
+
def custom_get_with_http_info(path, parameters = nil, request_options = {})
|
87
|
+
# verify the required parameter 'path' is set
|
88
|
+
if @api_client.config.client_side_validation && path.nil?
|
89
|
+
raise ArgumentError, "Parameter `path` is required when calling `custom_get`."
|
90
|
+
end
|
91
|
+
|
92
|
+
path = '/1{path}'.sub('{' + 'path' + '}', path.to_s)
|
93
|
+
query_params = {}
|
94
|
+
query_params = query_params.merge(parameters) unless parameters.nil?
|
95
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
96
|
+
header_params = {}
|
97
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
98
|
+
|
99
|
+
post_body = request_options[:debug_body]
|
100
|
+
|
101
|
+
new_options = request_options.merge(
|
102
|
+
:operation => :'AnalyticsClient.custom_get',
|
103
|
+
:header_params => header_params,
|
104
|
+
:query_params => query_params,
|
105
|
+
:body => post_body,
|
106
|
+
:use_read_transporter => false
|
107
|
+
)
|
108
|
+
|
109
|
+
@api_client.call_api(:GET, path, new_options)
|
110
|
+
end
|
111
|
+
|
112
|
+
# Send requests to the Algolia REST API.
|
113
|
+
# This method allow you to send requests to the Algolia REST API.
|
114
|
+
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
115
|
+
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
116
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
117
|
+
# @return [Object]
|
118
|
+
def custom_get(path, parameters = nil, request_options = {})
|
119
|
+
response = custom_get_with_http_info(path, parameters, request_options)
|
120
|
+
deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
121
|
+
end
|
122
|
+
|
123
|
+
# Send requests to the Algolia REST API.
|
124
|
+
# This method allow you to send requests to the Algolia REST API.
|
125
|
+
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
126
|
+
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
127
|
+
# @param body [Object] Parameters to send with the custom request.
|
128
|
+
# @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)
|
129
|
+
# @return [Http::Response] the response
|
130
|
+
def custom_post_with_http_info(path, parameters = nil, body = nil, request_options = {})
|
131
|
+
# verify the required parameter 'path' is set
|
132
|
+
if @api_client.config.client_side_validation && path.nil?
|
133
|
+
raise ArgumentError, "Parameter `path` is required when calling `custom_post`."
|
134
|
+
end
|
135
|
+
|
136
|
+
path = '/1{path}'.sub('{' + 'path' + '}', path.to_s)
|
137
|
+
query_params = {}
|
138
|
+
query_params = query_params.merge(parameters) unless parameters.nil?
|
139
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
140
|
+
header_params = {}
|
141
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
142
|
+
|
143
|
+
post_body = request_options[:debug_body] || @api_client.object_to_http_body(body)
|
144
|
+
|
145
|
+
new_options = request_options.merge(
|
146
|
+
:operation => :'AnalyticsClient.custom_post',
|
147
|
+
:header_params => header_params,
|
148
|
+
:query_params => query_params,
|
149
|
+
:body => post_body,
|
150
|
+
:use_read_transporter => false
|
151
|
+
)
|
152
|
+
|
153
|
+
@api_client.call_api(:POST, path, new_options)
|
154
|
+
end
|
155
|
+
|
156
|
+
# Send requests to the Algolia REST API.
|
157
|
+
# This method allow you to send requests to the Algolia REST API.
|
158
|
+
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
159
|
+
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
160
|
+
# @param body [Object] Parameters to send with the custom request.
|
161
|
+
# @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)
|
162
|
+
# @return [Object]
|
163
|
+
def custom_post(path, parameters = nil, body = nil, request_options = {})
|
164
|
+
response = custom_post_with_http_info(path, parameters, body, request_options)
|
165
|
+
deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
166
|
+
end
|
167
|
+
|
168
|
+
# Send requests to the Algolia REST API.
|
169
|
+
# This method allow you to send requests to the Algolia REST API.
|
170
|
+
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
171
|
+
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
172
|
+
# @param body [Object] Parameters to send with the custom request.
|
173
|
+
# @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)
|
174
|
+
# @return [Http::Response] the response
|
175
|
+
def custom_put_with_http_info(path, parameters = nil, body = nil, request_options = {})
|
176
|
+
# verify the required parameter 'path' is set
|
177
|
+
if @api_client.config.client_side_validation && path.nil?
|
178
|
+
raise ArgumentError, "Parameter `path` is required when calling `custom_put`."
|
179
|
+
end
|
180
|
+
|
181
|
+
path = '/1{path}'.sub('{' + 'path' + '}', path.to_s)
|
182
|
+
query_params = {}
|
183
|
+
query_params = query_params.merge(parameters) unless parameters.nil?
|
184
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
185
|
+
header_params = {}
|
186
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
187
|
+
|
188
|
+
post_body = request_options[:debug_body] || @api_client.object_to_http_body(body)
|
189
|
+
|
190
|
+
new_options = request_options.merge(
|
191
|
+
:operation => :'AnalyticsClient.custom_put',
|
192
|
+
:header_params => header_params,
|
193
|
+
:query_params => query_params,
|
194
|
+
:body => post_body,
|
195
|
+
:use_read_transporter => false
|
196
|
+
)
|
197
|
+
|
198
|
+
@api_client.call_api(:PUT, path, new_options)
|
199
|
+
end
|
200
|
+
|
201
|
+
# Send requests to the Algolia REST API.
|
202
|
+
# This method allow you to send requests to the Algolia REST API.
|
203
|
+
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
204
|
+
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
205
|
+
# @param body [Object] Parameters to send with the custom request.
|
206
|
+
# @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)
|
207
|
+
# @return [Object]
|
208
|
+
def custom_put(path, parameters = nil, body = nil, request_options = {})
|
209
|
+
response = custom_put_with_http_info(path, parameters, body, request_options)
|
210
|
+
deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
211
|
+
end
|
212
|
+
|
213
|
+
# Get average click position.
|
214
|
+
# Return the average click position for the complete time range and for individual days. > **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn't receive any click events for tracked searches. A _tracked_ search is a search request where the `clickAnalytics` parameter is `true`.
|
215
|
+
# @param index [String] Index name to target. (required)
|
216
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
217
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
218
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
219
|
+
# @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)
|
220
|
+
# @return [Http::Response] the response
|
221
|
+
def get_average_click_position_with_http_info(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
|
222
|
+
# verify the required parameter 'index' is set
|
223
|
+
if @api_client.config.client_side_validation && index.nil?
|
224
|
+
raise ArgumentError, "Parameter `index` is required when calling `get_average_click_position`."
|
225
|
+
end
|
226
|
+
|
227
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
228
|
+
if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
|
229
|
+
raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_average_click_position, must conform to the pattern #{pattern}."
|
230
|
+
end
|
231
|
+
|
232
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
233
|
+
if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
|
234
|
+
raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_average_click_position, must conform to the pattern #{pattern}."
|
235
|
+
end
|
236
|
+
|
237
|
+
path = '/2/clicks/averageClickPosition'
|
238
|
+
query_params = {}
|
239
|
+
query_params[:index] = index
|
240
|
+
query_params[:startDate] = start_date unless start_date.nil?
|
241
|
+
query_params[:endDate] = end_date unless end_date.nil?
|
242
|
+
query_params[:tags] = tags unless tags.nil?
|
243
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
244
|
+
header_params = {}
|
245
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
246
|
+
|
247
|
+
post_body = request_options[:debug_body]
|
248
|
+
|
249
|
+
new_options = request_options.merge(
|
250
|
+
:operation => :'AnalyticsClient.get_average_click_position',
|
251
|
+
:header_params => header_params,
|
252
|
+
:query_params => query_params,
|
253
|
+
:body => post_body,
|
254
|
+
:use_read_transporter => false
|
255
|
+
)
|
256
|
+
|
257
|
+
@api_client.call_api(:GET, path, new_options)
|
258
|
+
end
|
259
|
+
|
260
|
+
# Get average click position.
|
261
|
+
# Return the average click position for the complete time range and for individual days. > **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn't receive any click events for tracked searches. A _tracked_ search is a search request where the `clickAnalytics` parameter is `true`.
|
262
|
+
# @param index [String] Index name to target. (required)
|
263
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
264
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
265
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
266
|
+
# @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)
|
267
|
+
# @return [GetAverageClickPositionResponse]
|
268
|
+
def get_average_click_position(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
|
269
|
+
response = get_average_click_position_with_http_info(index, start_date, end_date, tags, request_options)
|
270
|
+
deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetAverageClickPositionResponse')
|
271
|
+
end
|
272
|
+
|
273
|
+
# Get click positions.
|
274
|
+
# Show the number of clicks events and their associated position in the search results. > **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn't receive any click events for tracked searches. A _tracked_ search is a search request where the `clickAnalytics` parameter is `true`.
|
275
|
+
# @param index [String] Index name to target. (required)
|
276
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
277
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
278
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
279
|
+
# @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)
|
280
|
+
# @return [Http::Response] the response
|
281
|
+
def get_click_positions_with_http_info(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
|
282
|
+
# verify the required parameter 'index' is set
|
283
|
+
if @api_client.config.client_side_validation && index.nil?
|
284
|
+
raise ArgumentError, "Parameter `index` is required when calling `get_click_positions`."
|
285
|
+
end
|
286
|
+
|
287
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
288
|
+
if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
|
289
|
+
raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_click_positions, must conform to the pattern #{pattern}."
|
290
|
+
end
|
291
|
+
|
292
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
293
|
+
if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
|
294
|
+
raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_click_positions, must conform to the pattern #{pattern}."
|
295
|
+
end
|
296
|
+
|
297
|
+
path = '/2/clicks/positions'
|
298
|
+
query_params = {}
|
299
|
+
query_params[:index] = index
|
300
|
+
query_params[:startDate] = start_date unless start_date.nil?
|
301
|
+
query_params[:endDate] = end_date unless end_date.nil?
|
302
|
+
query_params[:tags] = tags unless tags.nil?
|
303
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
304
|
+
header_params = {}
|
305
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
306
|
+
|
307
|
+
post_body = request_options[:debug_body]
|
308
|
+
|
309
|
+
new_options = request_options.merge(
|
310
|
+
:operation => :'AnalyticsClient.get_click_positions',
|
311
|
+
:header_params => header_params,
|
312
|
+
:query_params => query_params,
|
313
|
+
:body => post_body,
|
314
|
+
:use_read_transporter => false
|
315
|
+
)
|
316
|
+
|
317
|
+
@api_client.call_api(:GET, path, new_options)
|
318
|
+
end
|
319
|
+
|
320
|
+
# Get click positions.
|
321
|
+
# Show the number of clicks events and their associated position in the search results. > **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn't receive any click events for tracked searches. A _tracked_ search is a search request where the `clickAnalytics` parameter is `true`.
|
322
|
+
# @param index [String] Index name to target. (required)
|
323
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
324
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
325
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
326
|
+
# @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)
|
327
|
+
# @return [GetClickPositionsResponse]
|
328
|
+
def get_click_positions(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
|
329
|
+
response = get_click_positions_with_http_info(index, start_date, end_date, tags, request_options)
|
330
|
+
deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetClickPositionsResponse')
|
331
|
+
end
|
332
|
+
|
333
|
+
# Get click-through rate (CTR).
|
334
|
+
# Returns a [click-through rate (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate).
|
335
|
+
# @param index [String] Index name to target. (required)
|
336
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
337
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
338
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
339
|
+
# @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)
|
340
|
+
# @return [Http::Response] the response
|
341
|
+
def get_click_through_rate_with_http_info(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
|
342
|
+
# verify the required parameter 'index' is set
|
343
|
+
if @api_client.config.client_side_validation && index.nil?
|
344
|
+
raise ArgumentError, "Parameter `index` is required when calling `get_click_through_rate`."
|
345
|
+
end
|
346
|
+
|
347
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
348
|
+
if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
|
349
|
+
raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_click_through_rate, must conform to the pattern #{pattern}."
|
350
|
+
end
|
351
|
+
|
352
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
353
|
+
if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
|
354
|
+
raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_click_through_rate, must conform to the pattern #{pattern}."
|
355
|
+
end
|
356
|
+
|
357
|
+
path = '/2/clicks/clickThroughRate'
|
358
|
+
query_params = {}
|
359
|
+
query_params[:index] = index
|
360
|
+
query_params[:startDate] = start_date unless start_date.nil?
|
361
|
+
query_params[:endDate] = end_date unless end_date.nil?
|
362
|
+
query_params[:tags] = tags unless tags.nil?
|
363
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
364
|
+
header_params = {}
|
365
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
366
|
+
|
367
|
+
post_body = request_options[:debug_body]
|
368
|
+
|
369
|
+
new_options = request_options.merge(
|
370
|
+
:operation => :'AnalyticsClient.get_click_through_rate',
|
371
|
+
:header_params => header_params,
|
372
|
+
:query_params => query_params,
|
373
|
+
:body => post_body,
|
374
|
+
:use_read_transporter => false
|
375
|
+
)
|
376
|
+
|
377
|
+
@api_client.call_api(:GET, path, new_options)
|
378
|
+
end
|
379
|
+
|
380
|
+
# Get click-through rate (CTR).
|
381
|
+
# Returns a [click-through rate (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate).
|
382
|
+
# @param index [String] Index name to target. (required)
|
383
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
384
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
385
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
386
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
387
|
+
# @return [GetClickThroughRateResponse]
|
388
|
+
def get_click_through_rate(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
|
389
|
+
response = get_click_through_rate_with_http_info(index, start_date, end_date, tags, request_options)
|
390
|
+
deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetClickThroughRateResponse')
|
391
|
+
end
|
392
|
+
|
393
|
+
# Get conversion rate (CR).
|
394
|
+
# Return a [conversion rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate).
|
395
|
+
# @param index [String] Index name to target. (required)
|
396
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
397
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
398
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
399
|
+
# @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)
|
400
|
+
# @return [Http::Response] the response
|
401
|
+
def get_conversation_rate_with_http_info(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
|
402
|
+
# verify the required parameter 'index' is set
|
403
|
+
if @api_client.config.client_side_validation && index.nil?
|
404
|
+
raise ArgumentError, "Parameter `index` is required when calling `get_conversation_rate`."
|
405
|
+
end
|
406
|
+
|
407
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
408
|
+
if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
|
409
|
+
raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_conversation_rate, must conform to the pattern #{pattern}."
|
410
|
+
end
|
411
|
+
|
412
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
413
|
+
if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
|
414
|
+
raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_conversation_rate, must conform to the pattern #{pattern}."
|
415
|
+
end
|
416
|
+
|
417
|
+
path = '/2/conversions/conversionRate'
|
418
|
+
query_params = {}
|
419
|
+
query_params[:index] = index
|
420
|
+
query_params[:startDate] = start_date unless start_date.nil?
|
421
|
+
query_params[:endDate] = end_date unless end_date.nil?
|
422
|
+
query_params[:tags] = tags unless tags.nil?
|
423
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
424
|
+
header_params = {}
|
425
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
426
|
+
|
427
|
+
post_body = request_options[:debug_body]
|
428
|
+
|
429
|
+
new_options = request_options.merge(
|
430
|
+
:operation => :'AnalyticsClient.get_conversation_rate',
|
431
|
+
:header_params => header_params,
|
432
|
+
:query_params => query_params,
|
433
|
+
:body => post_body,
|
434
|
+
:use_read_transporter => false
|
435
|
+
)
|
436
|
+
|
437
|
+
@api_client.call_api(:GET, path, new_options)
|
438
|
+
end
|
439
|
+
|
440
|
+
# Get conversion rate (CR).
|
441
|
+
# Return a [conversion rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate).
|
442
|
+
# @param index [String] Index name to target. (required)
|
443
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
444
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
445
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
446
|
+
# @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)
|
447
|
+
# @return [GetConversationRateResponse]
|
448
|
+
def get_conversation_rate(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
|
449
|
+
response = get_conversation_rate_with_http_info(index, start_date, end_date, tags, request_options)
|
450
|
+
deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetConversationRateResponse')
|
451
|
+
end
|
452
|
+
|
453
|
+
# Get no click rate.
|
454
|
+
# Returns the rate at which searches don't lead to any clicks. The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of searches and searches without clicks.
|
455
|
+
# @param index [String] Index name to target. (required)
|
456
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
457
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
458
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
459
|
+
# @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)
|
460
|
+
# @return [Http::Response] the response
|
461
|
+
def get_no_click_rate_with_http_info(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
|
462
|
+
# verify the required parameter 'index' is set
|
463
|
+
if @api_client.config.client_side_validation && index.nil?
|
464
|
+
raise ArgumentError, "Parameter `index` is required when calling `get_no_click_rate`."
|
465
|
+
end
|
466
|
+
|
467
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
468
|
+
if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
|
469
|
+
raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_no_click_rate, must conform to the pattern #{pattern}."
|
470
|
+
end
|
471
|
+
|
472
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
473
|
+
if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
|
474
|
+
raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_no_click_rate, must conform to the pattern #{pattern}."
|
475
|
+
end
|
476
|
+
|
477
|
+
path = '/2/searches/noClickRate'
|
478
|
+
query_params = {}
|
479
|
+
query_params[:index] = index
|
480
|
+
query_params[:startDate] = start_date unless start_date.nil?
|
481
|
+
query_params[:endDate] = end_date unless end_date.nil?
|
482
|
+
query_params[:tags] = tags unless tags.nil?
|
483
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
484
|
+
header_params = {}
|
485
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
486
|
+
|
487
|
+
post_body = request_options[:debug_body]
|
488
|
+
|
489
|
+
new_options = request_options.merge(
|
490
|
+
:operation => :'AnalyticsClient.get_no_click_rate',
|
491
|
+
:header_params => header_params,
|
492
|
+
:query_params => query_params,
|
493
|
+
:body => post_body,
|
494
|
+
:use_read_transporter => false
|
495
|
+
)
|
496
|
+
|
497
|
+
@api_client.call_api(:GET, path, new_options)
|
498
|
+
end
|
499
|
+
|
500
|
+
# Get no click rate.
|
501
|
+
# Returns the rate at which searches don't lead to any clicks. The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of searches and searches without clicks.
|
502
|
+
# @param index [String] Index name to target. (required)
|
503
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
504
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
505
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
506
|
+
# @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)
|
507
|
+
# @return [GetNoClickRateResponse]
|
508
|
+
def get_no_click_rate(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
|
509
|
+
response = get_no_click_rate_with_http_info(index, start_date, end_date, tags, request_options)
|
510
|
+
deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetNoClickRateResponse')
|
511
|
+
end
|
512
|
+
|
513
|
+
# Get no results rate.
|
514
|
+
# Returns the rate at which searches didn't return any results.
|
515
|
+
# @param index [String] Index name to target. (required)
|
516
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
517
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
518
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
519
|
+
# @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)
|
520
|
+
# @return [Http::Response] the response
|
521
|
+
def get_no_results_rate_with_http_info(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
|
522
|
+
# verify the required parameter 'index' is set
|
523
|
+
if @api_client.config.client_side_validation && index.nil?
|
524
|
+
raise ArgumentError, "Parameter `index` is required when calling `get_no_results_rate`."
|
525
|
+
end
|
526
|
+
|
527
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
528
|
+
if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
|
529
|
+
raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_no_results_rate, must conform to the pattern #{pattern}."
|
530
|
+
end
|
531
|
+
|
532
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
533
|
+
if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
|
534
|
+
raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_no_results_rate, must conform to the pattern #{pattern}."
|
535
|
+
end
|
536
|
+
|
537
|
+
path = '/2/searches/noResultRate'
|
538
|
+
query_params = {}
|
539
|
+
query_params[:index] = index
|
540
|
+
query_params[:startDate] = start_date unless start_date.nil?
|
541
|
+
query_params[:endDate] = end_date unless end_date.nil?
|
542
|
+
query_params[:tags] = tags unless tags.nil?
|
543
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
544
|
+
header_params = {}
|
545
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
546
|
+
|
547
|
+
post_body = request_options[:debug_body]
|
548
|
+
|
549
|
+
new_options = request_options.merge(
|
550
|
+
:operation => :'AnalyticsClient.get_no_results_rate',
|
551
|
+
:header_params => header_params,
|
552
|
+
:query_params => query_params,
|
553
|
+
:body => post_body,
|
554
|
+
:use_read_transporter => false
|
555
|
+
)
|
556
|
+
|
557
|
+
@api_client.call_api(:GET, path, new_options)
|
558
|
+
end
|
559
|
+
|
560
|
+
# Get no results rate.
|
561
|
+
# Returns the rate at which searches didn't return any results.
|
562
|
+
# @param index [String] Index name to target. (required)
|
563
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
564
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
565
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
566
|
+
# @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)
|
567
|
+
# @return [GetNoResultsRateResponse]
|
568
|
+
def get_no_results_rate(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
|
569
|
+
response = get_no_results_rate_with_http_info(index, start_date, end_date, tags, request_options)
|
570
|
+
deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetNoResultsRateResponse')
|
571
|
+
end
|
572
|
+
|
573
|
+
# Get number of searches.
|
574
|
+
# Returns the number of searches within a time range.
|
575
|
+
# @param index [String] Index name to target. (required)
|
576
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
577
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
578
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
579
|
+
# @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)
|
580
|
+
# @return [Http::Response] the response
|
581
|
+
def get_searches_count_with_http_info(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
|
582
|
+
# verify the required parameter 'index' is set
|
583
|
+
if @api_client.config.client_side_validation && index.nil?
|
584
|
+
raise ArgumentError, "Parameter `index` is required when calling `get_searches_count`."
|
585
|
+
end
|
586
|
+
|
587
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
588
|
+
if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
|
589
|
+
raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_searches_count, must conform to the pattern #{pattern}."
|
590
|
+
end
|
591
|
+
|
592
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
593
|
+
if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
|
594
|
+
raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_searches_count, must conform to the pattern #{pattern}."
|
595
|
+
end
|
596
|
+
|
597
|
+
path = '/2/searches/count'
|
598
|
+
query_params = {}
|
599
|
+
query_params[:index] = index
|
600
|
+
query_params[:startDate] = start_date unless start_date.nil?
|
601
|
+
query_params[:endDate] = end_date unless end_date.nil?
|
602
|
+
query_params[:tags] = tags unless tags.nil?
|
603
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
604
|
+
header_params = {}
|
605
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
606
|
+
|
607
|
+
post_body = request_options[:debug_body]
|
608
|
+
|
609
|
+
new_options = request_options.merge(
|
610
|
+
:operation => :'AnalyticsClient.get_searches_count',
|
611
|
+
:header_params => header_params,
|
612
|
+
:query_params => query_params,
|
613
|
+
:body => post_body,
|
614
|
+
:use_read_transporter => false
|
615
|
+
)
|
616
|
+
|
617
|
+
@api_client.call_api(:GET, path, new_options)
|
618
|
+
end
|
619
|
+
|
620
|
+
# Get number of searches.
|
621
|
+
# Returns the number of searches within a time range.
|
622
|
+
# @param index [String] Index name to target. (required)
|
623
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
624
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
625
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
626
|
+
# @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)
|
627
|
+
# @return [GetSearchesCountResponse]
|
628
|
+
def get_searches_count(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
|
629
|
+
response = get_searches_count_with_http_info(index, start_date, end_date, tags, request_options)
|
630
|
+
deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetSearchesCountResponse')
|
631
|
+
end
|
632
|
+
|
633
|
+
# Get top searches with no clicks.
|
634
|
+
# Return the most popular of the last 1,000 searches that didn't lead to any clicks.
|
635
|
+
# @param index [String] Index name to target. (required)
|
636
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
637
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
638
|
+
# @param limit [Integer] Number of records to return (page size). (default to 10)
|
639
|
+
# @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
|
640
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
641
|
+
# @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)
|
642
|
+
# @return [Http::Response] the response
|
643
|
+
def get_searches_no_clicks_with_http_info(index, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
|
644
|
+
# verify the required parameter 'index' is set
|
645
|
+
if @api_client.config.client_side_validation && index.nil?
|
646
|
+
raise ArgumentError, "Parameter `index` is required when calling `get_searches_no_clicks`."
|
647
|
+
end
|
648
|
+
|
649
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
650
|
+
if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
|
651
|
+
raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_searches_no_clicks, must conform to the pattern #{pattern}."
|
652
|
+
end
|
653
|
+
|
654
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
655
|
+
if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
|
656
|
+
raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_searches_no_clicks, must conform to the pattern #{pattern}."
|
657
|
+
end
|
658
|
+
|
659
|
+
path = '/2/searches/noClicks'
|
660
|
+
query_params = {}
|
661
|
+
query_params[:index] = index
|
662
|
+
query_params[:startDate] = start_date unless start_date.nil?
|
663
|
+
query_params[:endDate] = end_date unless end_date.nil?
|
664
|
+
query_params[:limit] = limit unless limit.nil?
|
665
|
+
query_params[:offset] = offset unless offset.nil?
|
666
|
+
query_params[:tags] = tags unless tags.nil?
|
667
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
668
|
+
header_params = {}
|
669
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
670
|
+
|
671
|
+
post_body = request_options[:debug_body]
|
672
|
+
|
673
|
+
new_options = request_options.merge(
|
674
|
+
:operation => :'AnalyticsClient.get_searches_no_clicks',
|
675
|
+
:header_params => header_params,
|
676
|
+
:query_params => query_params,
|
677
|
+
:body => post_body,
|
678
|
+
:use_read_transporter => false
|
679
|
+
)
|
680
|
+
|
681
|
+
@api_client.call_api(:GET, path, new_options)
|
682
|
+
end
|
683
|
+
|
684
|
+
# Get top searches with no clicks.
|
685
|
+
# Return the most popular of the last 1,000 searches that didn't lead to any clicks.
|
686
|
+
# @param index [String] Index name to target. (required)
|
687
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
688
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
689
|
+
# @param limit [Integer] Number of records to return (page size). (default to 10)
|
690
|
+
# @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
|
691
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
692
|
+
# @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)
|
693
|
+
# @return [GetSearchesNoClicksResponse]
|
694
|
+
def get_searches_no_clicks(index, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
|
695
|
+
response = get_searches_no_clicks_with_http_info(index, start_date, end_date, limit, offset, tags, request_options)
|
696
|
+
deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetSearchesNoClicksResponse')
|
697
|
+
end
|
698
|
+
|
699
|
+
# Get top searches with no results.
|
700
|
+
# Returns the most popular of the latest 1,000 searches that didn't return any results.
|
701
|
+
# @param index [String] Index name to target. (required)
|
702
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
703
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
704
|
+
# @param limit [Integer] Number of records to return (page size). (default to 10)
|
705
|
+
# @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
|
706
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
707
|
+
# @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)
|
708
|
+
# @return [Http::Response] the response
|
709
|
+
def get_searches_no_results_with_http_info(index, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
|
710
|
+
# verify the required parameter 'index' is set
|
711
|
+
if @api_client.config.client_side_validation && index.nil?
|
712
|
+
raise ArgumentError, "Parameter `index` is required when calling `get_searches_no_results`."
|
713
|
+
end
|
714
|
+
|
715
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
716
|
+
if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
|
717
|
+
raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_searches_no_results, must conform to the pattern #{pattern}."
|
718
|
+
end
|
719
|
+
|
720
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
721
|
+
if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
|
722
|
+
raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_searches_no_results, must conform to the pattern #{pattern}."
|
723
|
+
end
|
724
|
+
|
725
|
+
path = '/2/searches/noResults'
|
726
|
+
query_params = {}
|
727
|
+
query_params[:index] = index
|
728
|
+
query_params[:startDate] = start_date unless start_date.nil?
|
729
|
+
query_params[:endDate] = end_date unless end_date.nil?
|
730
|
+
query_params[:limit] = limit unless limit.nil?
|
731
|
+
query_params[:offset] = offset unless offset.nil?
|
732
|
+
query_params[:tags] = tags unless tags.nil?
|
733
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
734
|
+
header_params = {}
|
735
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
736
|
+
|
737
|
+
post_body = request_options[:debug_body]
|
738
|
+
|
739
|
+
new_options = request_options.merge(
|
740
|
+
:operation => :'AnalyticsClient.get_searches_no_results',
|
741
|
+
:header_params => header_params,
|
742
|
+
:query_params => query_params,
|
743
|
+
:body => post_body,
|
744
|
+
:use_read_transporter => false
|
745
|
+
)
|
746
|
+
|
747
|
+
@api_client.call_api(:GET, path, new_options)
|
748
|
+
end
|
749
|
+
|
750
|
+
# Get top searches with no results.
|
751
|
+
# Returns the most popular of the latest 1,000 searches that didn't return any results.
|
752
|
+
# @param index [String] Index name to target. (required)
|
753
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
754
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
755
|
+
# @param limit [Integer] Number of records to return (page size). (default to 10)
|
756
|
+
# @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
|
757
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
758
|
+
# @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)
|
759
|
+
# @return [GetSearchesNoResultsResponse]
|
760
|
+
def get_searches_no_results(index, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
|
761
|
+
response = get_searches_no_results_with_http_info(index, start_date, end_date, limit, offset, tags, request_options)
|
762
|
+
deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetSearchesNoResultsResponse')
|
763
|
+
end
|
764
|
+
|
765
|
+
# Get Analytics API status.
|
766
|
+
# Return the latest update time of the Analytics API for an index. If the index has been recently created or no search has been performed yet, `updatedAt` will be `null`. > **Note**: The Analytics API is updated every 5&nbsp;minutes.
|
767
|
+
# @param index [String] Index name to target. (required)
|
768
|
+
# @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)
|
769
|
+
# @return [Http::Response] the response
|
770
|
+
def get_status_with_http_info(index, request_options = {})
|
771
|
+
# verify the required parameter 'index' is set
|
772
|
+
if @api_client.config.client_side_validation && index.nil?
|
773
|
+
raise ArgumentError, "Parameter `index` is required when calling `get_status`."
|
774
|
+
end
|
775
|
+
|
776
|
+
path = '/2/status'
|
777
|
+
query_params = {}
|
778
|
+
query_params[:index] = index
|
779
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
780
|
+
header_params = {}
|
781
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
782
|
+
|
783
|
+
post_body = request_options[:debug_body]
|
784
|
+
|
785
|
+
new_options = request_options.merge(
|
786
|
+
:operation => :'AnalyticsClient.get_status',
|
787
|
+
:header_params => header_params,
|
788
|
+
:query_params => query_params,
|
789
|
+
:body => post_body,
|
790
|
+
:use_read_transporter => false
|
791
|
+
)
|
792
|
+
|
793
|
+
@api_client.call_api(:GET, path, new_options)
|
794
|
+
end
|
795
|
+
|
796
|
+
# Get Analytics API status.
|
797
|
+
# Return the latest update time of the Analytics API for an index. If the index has been recently created or no search has been performed yet, `updatedAt` will be `null`. > **Note**: The Analytics API is updated every 5 minutes.
|
798
|
+
# @param index [String] Index name to target. (required)
|
799
|
+
# @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)
|
800
|
+
# @return [GetStatusResponse]
|
801
|
+
def get_status(index, request_options = {})
|
802
|
+
response = get_status_with_http_info(index, request_options)
|
803
|
+
deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetStatusResponse')
|
804
|
+
end
|
805
|
+
|
806
|
+
# Get top countries.
|
807
|
+
# Returns top countries. Limited to the 1,000 most frequent ones.
|
808
|
+
# @param index [String] Index name to target. (required)
|
809
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
810
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
811
|
+
# @param limit [Integer] Number of records to return (page size). (default to 10)
|
812
|
+
# @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
|
813
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
814
|
+
# @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)
|
815
|
+
# @return [Http::Response] the response
|
816
|
+
def get_top_countries_with_http_info(index, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
|
817
|
+
# verify the required parameter 'index' is set
|
818
|
+
if @api_client.config.client_side_validation && index.nil?
|
819
|
+
raise ArgumentError, "Parameter `index` is required when calling `get_top_countries`."
|
820
|
+
end
|
821
|
+
|
822
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
823
|
+
if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
|
824
|
+
raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_top_countries, must conform to the pattern #{pattern}."
|
825
|
+
end
|
826
|
+
|
827
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
828
|
+
if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
|
829
|
+
raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_top_countries, must conform to the pattern #{pattern}."
|
830
|
+
end
|
831
|
+
|
832
|
+
path = '/2/countries'
|
833
|
+
query_params = {}
|
834
|
+
query_params[:index] = index
|
835
|
+
query_params[:startDate] = start_date unless start_date.nil?
|
836
|
+
query_params[:endDate] = end_date unless end_date.nil?
|
837
|
+
query_params[:limit] = limit unless limit.nil?
|
838
|
+
query_params[:offset] = offset unless offset.nil?
|
839
|
+
query_params[:tags] = tags unless tags.nil?
|
840
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
841
|
+
header_params = {}
|
842
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
843
|
+
|
844
|
+
post_body = request_options[:debug_body]
|
845
|
+
|
846
|
+
new_options = request_options.merge(
|
847
|
+
:operation => :'AnalyticsClient.get_top_countries',
|
848
|
+
:header_params => header_params,
|
849
|
+
:query_params => query_params,
|
850
|
+
:body => post_body,
|
851
|
+
:use_read_transporter => false
|
852
|
+
)
|
853
|
+
|
854
|
+
@api_client.call_api(:GET, path, new_options)
|
855
|
+
end
|
856
|
+
|
857
|
+
# Get top countries.
|
858
|
+
# Returns top countries. Limited to the 1,000 most frequent ones.
|
859
|
+
# @param index [String] Index name to target. (required)
|
860
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
861
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
862
|
+
# @param limit [Integer] Number of records to return (page size). (default to 10)
|
863
|
+
# @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
|
864
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
865
|
+
# @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)
|
866
|
+
# @return [GetTopCountriesResponse]
|
867
|
+
def get_top_countries(index, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
|
868
|
+
response = get_top_countries_with_http_info(index, start_date, end_date, limit, offset, tags, request_options)
|
869
|
+
deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopCountriesResponse')
|
870
|
+
end
|
871
|
+
|
872
|
+
# Get top filterable attributes.
|
873
|
+
# Return the most popular [filterable attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in the 1,000 most recently used filters.
|
874
|
+
# @param index [String] Index name to target. (required)
|
875
|
+
# @param search [String] User query.
|
876
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
877
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
878
|
+
# @param limit [Integer] Number of records to return (page size). (default to 10)
|
879
|
+
# @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
|
880
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
881
|
+
# @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)
|
882
|
+
# @return [Http::Response] the response
|
883
|
+
def get_top_filter_attributes_with_http_info(index, search = nil, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
|
884
|
+
# verify the required parameter 'index' is set
|
885
|
+
if @api_client.config.client_side_validation && index.nil?
|
886
|
+
raise ArgumentError, "Parameter `index` is required when calling `get_top_filter_attributes`."
|
887
|
+
end
|
888
|
+
|
889
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
890
|
+
if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
|
891
|
+
raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_top_filter_attributes, must conform to the pattern #{pattern}."
|
892
|
+
end
|
893
|
+
|
894
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
895
|
+
if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
|
896
|
+
raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_top_filter_attributes, must conform to the pattern #{pattern}."
|
897
|
+
end
|
898
|
+
|
899
|
+
path = '/2/filters'
|
900
|
+
query_params = {}
|
901
|
+
query_params[:index] = index
|
902
|
+
query_params[:search] = search unless search.nil?
|
903
|
+
query_params[:startDate] = start_date unless start_date.nil?
|
904
|
+
query_params[:endDate] = end_date unless end_date.nil?
|
905
|
+
query_params[:limit] = limit unless limit.nil?
|
906
|
+
query_params[:offset] = offset unless offset.nil?
|
907
|
+
query_params[:tags] = tags unless tags.nil?
|
908
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
909
|
+
header_params = {}
|
910
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
911
|
+
|
912
|
+
post_body = request_options[:debug_body]
|
913
|
+
|
914
|
+
new_options = request_options.merge(
|
915
|
+
:operation => :'AnalyticsClient.get_top_filter_attributes',
|
916
|
+
:header_params => header_params,
|
917
|
+
:query_params => query_params,
|
918
|
+
:body => post_body,
|
919
|
+
:use_read_transporter => false
|
920
|
+
)
|
921
|
+
|
922
|
+
@api_client.call_api(:GET, path, new_options)
|
923
|
+
end
|
924
|
+
|
925
|
+
# Get top filterable attributes.
|
926
|
+
# Return the most popular [filterable attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in the 1,000 most recently used filters.
|
927
|
+
# @param index [String] Index name to target. (required)
|
928
|
+
# @param search [String] User query.
|
929
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
930
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
931
|
+
# @param limit [Integer] Number of records to return (page size). (default to 10)
|
932
|
+
# @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
|
933
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
934
|
+
# @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)
|
935
|
+
# @return [GetTopFilterAttributesResponse]
|
936
|
+
def get_top_filter_attributes(index, search = nil, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
|
937
|
+
response = get_top_filter_attributes_with_http_info(index, search, start_date, end_date, limit, offset, tags, request_options)
|
938
|
+
deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopFilterAttributesResponse')
|
939
|
+
end
|
940
|
+
|
941
|
+
# Get top filter values for an attribute.
|
942
|
+
# Returns the most popular filter values for an attribute in the 1,000 most recently used filters.
|
943
|
+
# @param attribute [String] Attribute name. (required)
|
944
|
+
# @param index [String] Index name to target. (required)
|
945
|
+
# @param search [String] User query.
|
946
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
947
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
948
|
+
# @param limit [Integer] Number of records to return (page size). (default to 10)
|
949
|
+
# @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
|
950
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
951
|
+
# @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)
|
952
|
+
# @return [Http::Response] the response
|
953
|
+
def get_top_filter_for_attribute_with_http_info(attribute, index, search = nil, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
|
954
|
+
# verify the required parameter 'attribute' is set
|
955
|
+
if @api_client.config.client_side_validation && attribute.nil?
|
956
|
+
raise ArgumentError, "Parameter `attribute` is required when calling `get_top_filter_for_attribute`."
|
957
|
+
end
|
958
|
+
# verify the required parameter 'index' is set
|
959
|
+
if @api_client.config.client_side_validation && index.nil?
|
960
|
+
raise ArgumentError, "Parameter `index` is required when calling `get_top_filter_for_attribute`."
|
961
|
+
end
|
962
|
+
|
963
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
964
|
+
if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
|
965
|
+
raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_top_filter_for_attribute, must conform to the pattern #{pattern}."
|
966
|
+
end
|
967
|
+
|
968
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
969
|
+
if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
|
970
|
+
raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_top_filter_for_attribute, must conform to the pattern #{pattern}."
|
971
|
+
end
|
972
|
+
|
973
|
+
path = '/2/filters/{attribute}'.sub('{' + 'attribute' + '}', @api_client.encode_uri(attribute.to_s))
|
974
|
+
query_params = {}
|
975
|
+
query_params[:index] = index
|
976
|
+
query_params[:search] = search unless search.nil?
|
977
|
+
query_params[:startDate] = start_date unless start_date.nil?
|
978
|
+
query_params[:endDate] = end_date unless end_date.nil?
|
979
|
+
query_params[:limit] = limit unless limit.nil?
|
980
|
+
query_params[:offset] = offset unless offset.nil?
|
981
|
+
query_params[:tags] = tags unless tags.nil?
|
982
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
983
|
+
header_params = {}
|
984
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
985
|
+
|
986
|
+
post_body = request_options[:debug_body]
|
987
|
+
|
988
|
+
new_options = request_options.merge(
|
989
|
+
:operation => :'AnalyticsClient.get_top_filter_for_attribute',
|
990
|
+
:header_params => header_params,
|
991
|
+
:query_params => query_params,
|
992
|
+
:body => post_body,
|
993
|
+
:use_read_transporter => false
|
994
|
+
)
|
995
|
+
|
996
|
+
@api_client.call_api(:GET, path, new_options)
|
997
|
+
end
|
998
|
+
|
999
|
+
# Get top filter values for an attribute.
|
1000
|
+
# Returns the most popular filter values for an attribute in the 1,000 most recently used filters.
|
1001
|
+
# @param attribute [String] Attribute name. (required)
|
1002
|
+
# @param index [String] Index name to target. (required)
|
1003
|
+
# @param search [String] User query.
|
1004
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
1005
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
1006
|
+
# @param limit [Integer] Number of records to return (page size). (default to 10)
|
1007
|
+
# @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
|
1008
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
1009
|
+
# @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)
|
1010
|
+
# @return [GetTopFilterForAttributeResponse]
|
1011
|
+
def get_top_filter_for_attribute(attribute, index, search = nil, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
|
1012
|
+
response = get_top_filter_for_attribute_with_http_info(attribute, index, search, start_date, end_date, limit, offset, tags, request_options)
|
1013
|
+
deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopFilterForAttributeResponse')
|
1014
|
+
end
|
1015
|
+
|
1016
|
+
# Get top filters for a no result search.
|
1017
|
+
# Returns top filters for filter-enabled searches that don't return results. Limited to the 1,000 most recently used filters.
|
1018
|
+
# @param index [String] Index name to target. (required)
|
1019
|
+
# @param search [String] User query.
|
1020
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
1021
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
1022
|
+
# @param limit [Integer] Number of records to return (page size). (default to 10)
|
1023
|
+
# @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
|
1024
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
1025
|
+
# @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)
|
1026
|
+
# @return [Http::Response] the response
|
1027
|
+
def get_top_filters_no_results_with_http_info(index, search = nil, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
|
1028
|
+
# verify the required parameter 'index' is set
|
1029
|
+
if @api_client.config.client_side_validation && index.nil?
|
1030
|
+
raise ArgumentError, "Parameter `index` is required when calling `get_top_filters_no_results`."
|
1031
|
+
end
|
1032
|
+
|
1033
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
1034
|
+
if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
|
1035
|
+
raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_top_filters_no_results, must conform to the pattern #{pattern}."
|
1036
|
+
end
|
1037
|
+
|
1038
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
1039
|
+
if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
|
1040
|
+
raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_top_filters_no_results, must conform to the pattern #{pattern}."
|
1041
|
+
end
|
1042
|
+
|
1043
|
+
path = '/2/filters/noResults'
|
1044
|
+
query_params = {}
|
1045
|
+
query_params[:index] = index
|
1046
|
+
query_params[:search] = search unless search.nil?
|
1047
|
+
query_params[:startDate] = start_date unless start_date.nil?
|
1048
|
+
query_params[:endDate] = end_date unless end_date.nil?
|
1049
|
+
query_params[:limit] = limit unless limit.nil?
|
1050
|
+
query_params[:offset] = offset unless offset.nil?
|
1051
|
+
query_params[:tags] = tags unless tags.nil?
|
1052
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
1053
|
+
header_params = {}
|
1054
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
1055
|
+
|
1056
|
+
post_body = request_options[:debug_body]
|
1057
|
+
|
1058
|
+
new_options = request_options.merge(
|
1059
|
+
:operation => :'AnalyticsClient.get_top_filters_no_results',
|
1060
|
+
:header_params => header_params,
|
1061
|
+
:query_params => query_params,
|
1062
|
+
:body => post_body,
|
1063
|
+
:use_read_transporter => false
|
1064
|
+
)
|
1065
|
+
|
1066
|
+
@api_client.call_api(:GET, path, new_options)
|
1067
|
+
end
|
1068
|
+
|
1069
|
+
# Get top filters for a no result search.
|
1070
|
+
# Returns top filters for filter-enabled searches that don't return results. Limited to the 1,000 most recently used filters.
|
1071
|
+
# @param index [String] Index name to target. (required)
|
1072
|
+
# @param search [String] User query.
|
1073
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
1074
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
1075
|
+
# @param limit [Integer] Number of records to return (page size). (default to 10)
|
1076
|
+
# @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
|
1077
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
1078
|
+
# @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)
|
1079
|
+
# @return [GetTopFiltersNoResultsResponse]
|
1080
|
+
def get_top_filters_no_results(index, search = nil, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
|
1081
|
+
response = get_top_filters_no_results_with_http_info(index, search, start_date, end_date, limit, offset, tags, request_options)
|
1082
|
+
deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopFiltersNoResultsResponse')
|
1083
|
+
end
|
1084
|
+
|
1085
|
+
# Get top hits.
|
1086
|
+
# Return the most popular clicked results in the last 1,000 searches.
|
1087
|
+
# @param index [String] Index name to target. (required)
|
1088
|
+
# @param search [String] User query.
|
1089
|
+
# @param click_analytics [Boolean] Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (default to false)
|
1090
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
1091
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
1092
|
+
# @param limit [Integer] Number of records to return (page size). (default to 10)
|
1093
|
+
# @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
|
1094
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
1095
|
+
# @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)
|
1096
|
+
# @return [Http::Response] the response
|
1097
|
+
def get_top_hits_with_http_info(index, search = nil, click_analytics = nil, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
|
1098
|
+
# verify the required parameter 'index' is set
|
1099
|
+
if @api_client.config.client_side_validation && index.nil?
|
1100
|
+
raise ArgumentError, "Parameter `index` is required when calling `get_top_hits`."
|
1101
|
+
end
|
1102
|
+
|
1103
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
1104
|
+
if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
|
1105
|
+
raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_top_hits, must conform to the pattern #{pattern}."
|
1106
|
+
end
|
1107
|
+
|
1108
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
1109
|
+
if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
|
1110
|
+
raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_top_hits, must conform to the pattern #{pattern}."
|
1111
|
+
end
|
1112
|
+
|
1113
|
+
path = '/2/hits'
|
1114
|
+
query_params = {}
|
1115
|
+
query_params[:index] = index
|
1116
|
+
query_params[:search] = search unless search.nil?
|
1117
|
+
query_params[:clickAnalytics] = click_analytics unless click_analytics.nil?
|
1118
|
+
query_params[:startDate] = start_date unless start_date.nil?
|
1119
|
+
query_params[:endDate] = end_date unless end_date.nil?
|
1120
|
+
query_params[:limit] = limit unless limit.nil?
|
1121
|
+
query_params[:offset] = offset unless offset.nil?
|
1122
|
+
query_params[:tags] = tags unless tags.nil?
|
1123
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
1124
|
+
header_params = {}
|
1125
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
1126
|
+
|
1127
|
+
post_body = request_options[:debug_body]
|
1128
|
+
|
1129
|
+
new_options = request_options.merge(
|
1130
|
+
:operation => :'AnalyticsClient.get_top_hits',
|
1131
|
+
:header_params => header_params,
|
1132
|
+
:query_params => query_params,
|
1133
|
+
:body => post_body,
|
1134
|
+
:use_read_transporter => false
|
1135
|
+
)
|
1136
|
+
|
1137
|
+
@api_client.call_api(:GET, path, new_options)
|
1138
|
+
end
|
1139
|
+
|
1140
|
+
# Get top hits.
|
1141
|
+
# Return the most popular clicked results in the last 1,000 searches.
|
1142
|
+
# @param index [String] Index name to target. (required)
|
1143
|
+
# @param search [String] User query.
|
1144
|
+
# @param click_analytics [Boolean] Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (default to false)
|
1145
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
1146
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
1147
|
+
# @param limit [Integer] Number of records to return (page size). (default to 10)
|
1148
|
+
# @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
|
1149
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
1150
|
+
# @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)
|
1151
|
+
# @return [GetTopHitsResponse]
|
1152
|
+
def get_top_hits(index, search = nil, click_analytics = nil, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
|
1153
|
+
response = get_top_hits_with_http_info(index, search, click_analytics, start_date, end_date, limit, offset, tags, request_options)
|
1154
|
+
deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopHitsResponse')
|
1155
|
+
end
|
1156
|
+
|
1157
|
+
# Get top searches.
|
1158
|
+
# Returns the most popular of the latest 1,000 searches. For each search, also returns the number of hits.
|
1159
|
+
# @param index [String] Index name to target. (required)
|
1160
|
+
# @param click_analytics [Boolean] Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (default to false)
|
1161
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
1162
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
1163
|
+
# @param order_by [OrderBy] Reorder the results. (default to 'searchCount')
|
1164
|
+
# @param direction [Direction] Sorting direction of the results: ascending or descending. (default to 'asc')
|
1165
|
+
# @param limit [Integer] Number of records to return (page size). (default to 10)
|
1166
|
+
# @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
|
1167
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
1168
|
+
# @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)
|
1169
|
+
# @return [Http::Response] the response
|
1170
|
+
def get_top_searches_with_http_info(index, click_analytics = nil, start_date = nil, end_date = nil, order_by = nil, direction = nil, limit = nil, offset = nil, tags = nil,
|
1171
|
+
request_options = {})
|
1172
|
+
# verify the required parameter 'index' is set
|
1173
|
+
if @api_client.config.client_side_validation && index.nil?
|
1174
|
+
raise ArgumentError, "Parameter `index` is required when calling `get_top_searches`."
|
1175
|
+
end
|
1176
|
+
|
1177
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
1178
|
+
if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
|
1179
|
+
raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_top_searches, must conform to the pattern #{pattern}."
|
1180
|
+
end
|
1181
|
+
|
1182
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
1183
|
+
if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
|
1184
|
+
raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_top_searches, must conform to the pattern #{pattern}."
|
1185
|
+
end
|
1186
|
+
|
1187
|
+
path = '/2/searches'
|
1188
|
+
query_params = {}
|
1189
|
+
query_params[:index] = index
|
1190
|
+
query_params[:clickAnalytics] = click_analytics unless click_analytics.nil?
|
1191
|
+
query_params[:startDate] = start_date unless start_date.nil?
|
1192
|
+
query_params[:endDate] = end_date unless end_date.nil?
|
1193
|
+
query_params[:orderBy] = order_by unless order_by.nil?
|
1194
|
+
query_params[:direction] = direction unless direction.nil?
|
1195
|
+
query_params[:limit] = limit unless limit.nil?
|
1196
|
+
query_params[:offset] = offset unless offset.nil?
|
1197
|
+
query_params[:tags] = tags unless tags.nil?
|
1198
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
1199
|
+
header_params = {}
|
1200
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
1201
|
+
|
1202
|
+
post_body = request_options[:debug_body]
|
1203
|
+
|
1204
|
+
new_options = request_options.merge(
|
1205
|
+
:operation => :'AnalyticsClient.get_top_searches',
|
1206
|
+
:header_params => header_params,
|
1207
|
+
:query_params => query_params,
|
1208
|
+
:body => post_body,
|
1209
|
+
:use_read_transporter => false
|
1210
|
+
)
|
1211
|
+
|
1212
|
+
@api_client.call_api(:GET, path, new_options)
|
1213
|
+
end
|
1214
|
+
|
1215
|
+
# Get top searches.
|
1216
|
+
# Returns the most popular of the latest 1,000 searches. For each search, also returns the number of hits.
|
1217
|
+
# @param index [String] Index name to target. (required)
|
1218
|
+
# @param click_analytics [Boolean] Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (default to false)
|
1219
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
1220
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
1221
|
+
# @param order_by [OrderBy] Reorder the results. (default to 'searchCount')
|
1222
|
+
# @param direction [Direction] Sorting direction of the results: ascending or descending. (default to 'asc')
|
1223
|
+
# @param limit [Integer] Number of records to return (page size). (default to 10)
|
1224
|
+
# @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
|
1225
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
1226
|
+
# @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)
|
1227
|
+
# @return [GetTopSearchesResponse]
|
1228
|
+
def get_top_searches(index, click_analytics = nil, start_date = nil, end_date = nil, order_by = nil, direction = nil, limit = nil, offset = nil, tags = nil,
|
1229
|
+
request_options = {})
|
1230
|
+
response = get_top_searches_with_http_info(index, click_analytics, start_date, end_date, order_by, direction, limit, offset, tags, request_options)
|
1231
|
+
deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopSearchesResponse')
|
1232
|
+
end
|
1233
|
+
|
1234
|
+
# Get user count.
|
1235
|
+
# Return the count of unique users.
|
1236
|
+
# @param index [String] Index name to target. (required)
|
1237
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
1238
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
1239
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
1240
|
+
# @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)
|
1241
|
+
# @return [Http::Response] the response
|
1242
|
+
def get_users_count_with_http_info(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
|
1243
|
+
# verify the required parameter 'index' is set
|
1244
|
+
if @api_client.config.client_side_validation && index.nil?
|
1245
|
+
raise ArgumentError, "Parameter `index` is required when calling `get_users_count`."
|
1246
|
+
end
|
1247
|
+
|
1248
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
1249
|
+
if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
|
1250
|
+
raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_users_count, must conform to the pattern #{pattern}."
|
1251
|
+
end
|
1252
|
+
|
1253
|
+
pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
|
1254
|
+
if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
|
1255
|
+
raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_users_count, must conform to the pattern #{pattern}."
|
1256
|
+
end
|
1257
|
+
|
1258
|
+
path = '/2/users/count'
|
1259
|
+
query_params = {}
|
1260
|
+
query_params[:index] = index
|
1261
|
+
query_params[:startDate] = start_date unless start_date.nil?
|
1262
|
+
query_params[:endDate] = end_date unless end_date.nil?
|
1263
|
+
query_params[:tags] = tags unless tags.nil?
|
1264
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
1265
|
+
header_params = {}
|
1266
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
1267
|
+
|
1268
|
+
post_body = request_options[:debug_body]
|
1269
|
+
|
1270
|
+
new_options = request_options.merge(
|
1271
|
+
:operation => :'AnalyticsClient.get_users_count',
|
1272
|
+
:header_params => header_params,
|
1273
|
+
:query_params => query_params,
|
1274
|
+
:body => post_body,
|
1275
|
+
:use_read_transporter => false
|
1276
|
+
)
|
1277
|
+
|
1278
|
+
@api_client.call_api(:GET, path, new_options)
|
1279
|
+
end
|
1280
|
+
|
1281
|
+
# Get user count.
|
1282
|
+
# Return the count of unique users.
|
1283
|
+
# @param index [String] Index name to target. (required)
|
1284
|
+
# @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
1285
|
+
# @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
|
1286
|
+
# @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
1287
|
+
# @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)
|
1288
|
+
# @return [GetUsersCountResponse]
|
1289
|
+
def get_users_count(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
|
1290
|
+
response = get_users_count_with_http_info(index, start_date, end_date, tags, request_options)
|
1291
|
+
deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetUsersCountResponse')
|
1292
|
+
end
|
1293
|
+
end
|
1294
|
+
end
|