lib/algolia/api/analytics_client.rb in algolia-3.0.0.alpha.5 vs lib/algolia/api/analytics_client.rb in algolia-3.0.0.alpha.6
- old
+ new
@@ -72,11 +72,11 @@
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
# @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)
# @return [Object]
def custom_delete(path, parameters = nil, request_options = {})
response = custom_delete_with_http_info(path, parameters, request_options)
- deserialize(response.body, request_options[:debug_return_type] || 'Object')
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
end
# Send requests to the Algolia REST API.
# This method allow you to send requests to the Algolia REST API.
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
@@ -115,11 +115,11 @@
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
# @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)
# @return [Object]
def custom_get(path, parameters = nil, request_options = {})
response = custom_get_with_http_info(path, parameters, request_options)
- deserialize(response.body, request_options[:debug_return_type] || 'Object')
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
end
# Send requests to the Algolia REST API.
# This method allow you to send requests to the Algolia REST API.
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
@@ -160,11 +160,11 @@
# @param body [Object] Parameters to send with the custom request.
# @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)
# @return [Object]
def custom_post(path, parameters = nil, body = nil, request_options = {})
response = custom_post_with_http_info(path, parameters, body, request_options)
- deserialize(response.body, request_options[:debug_return_type] || 'Object')
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
end
# Send requests to the Algolia REST API.
# This method allow you to send requests to the Algolia REST API.
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
@@ -205,11 +205,11 @@
# @param body [Object] Parameters to send with the custom request.
# @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)
# @return [Object]
def custom_put(path, parameters = nil, body = nil, request_options = {})
response = custom_put_with_http_info(path, parameters, body, request_options)
- deserialize(response.body, request_options[:debug_return_type] || 'Object')
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
end
# Get average click position.
# 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`.
# @param index [String] Index name to target. (required)
@@ -265,11 +265,11 @@
# @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.
# @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)
# @return [GetAverageClickPositionResponse]
def get_average_click_position(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
response = get_average_click_position_with_http_info(index, start_date, end_date, tags, request_options)
- deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetAverageClickPositionResponse')
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetAverageClickPositionResponse')
end
# Get click positions.
# 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`.
# @param index [String] Index name to target. (required)
@@ -325,11 +325,11 @@
# @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.
# @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)
# @return [GetClickPositionsResponse]
def get_click_positions(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
response = get_click_positions_with_http_info(index, start_date, end_date, tags, request_options)
- deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetClickPositionsResponse')
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetClickPositionsResponse')
end
# Get click-through rate (CTR).
# Returns a [click-through rate (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate).
# @param index [String] Index name to target. (required)
@@ -385,11 +385,11 @@
# @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.
# @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)
# @return [GetClickThroughRateResponse]
def get_click_through_rate(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
response = get_click_through_rate_with_http_info(index, start_date, end_date, tags, request_options)
- deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetClickThroughRateResponse')
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetClickThroughRateResponse')
end
# Get conversion rate (CR).
# Return a [conversion rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate).
# @param index [String] Index name to target. (required)
@@ -445,11 +445,11 @@
# @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.
# @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)
# @return [GetConversationRateResponse]
def get_conversation_rate(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
response = get_conversation_rate_with_http_info(index, start_date, end_date, tags, request_options)
- deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetConversationRateResponse')
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetConversationRateResponse')
end
# Get no click rate.
# 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.
# @param index [String] Index name to target. (required)
@@ -505,11 +505,11 @@
# @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.
# @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)
# @return [GetNoClickRateResponse]
def get_no_click_rate(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
response = get_no_click_rate_with_http_info(index, start_date, end_date, tags, request_options)
- deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetNoClickRateResponse')
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetNoClickRateResponse')
end
# Get no results rate.
# Returns the rate at which searches didn't return any results.
# @param index [String] Index name to target. (required)
@@ -565,11 +565,11 @@
# @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.
# @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)
# @return [GetNoResultsRateResponse]
def get_no_results_rate(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
response = get_no_results_rate_with_http_info(index, start_date, end_date, tags, request_options)
- deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetNoResultsRateResponse')
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetNoResultsRateResponse')
end
# Get number of searches.
# Returns the number of searches within a time range.
# @param index [String] Index name to target. (required)
@@ -625,11 +625,11 @@
# @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.
# @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)
# @return [GetSearchesCountResponse]
def get_searches_count(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
response = get_searches_count_with_http_info(index, start_date, end_date, tags, request_options)
- deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetSearchesCountResponse')
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetSearchesCountResponse')
end
# Get top searches with no clicks.
# Return the most popular of the last 1,000 searches that didn't lead to any clicks.
# @param index [String] Index name to target. (required)
@@ -691,11 +691,11 @@
# @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.
# @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)
# @return [GetSearchesNoClicksResponse]
def get_searches_no_clicks(index, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
response = get_searches_no_clicks_with_http_info(index, start_date, end_date, limit, offset, tags, request_options)
- deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetSearchesNoClicksResponse')
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetSearchesNoClicksResponse')
end
# Get top searches with no results.
# Returns the most popular of the latest 1,000 searches that didn't return any results.
# @param index [String] Index name to target. (required)
@@ -757,11 +757,11 @@
# @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.
# @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)
# @return [GetSearchesNoResultsResponse]
def get_searches_no_results(index, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
response = get_searches_no_results_with_http_info(index, start_date, end_date, limit, offset, tags, request_options)
- deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetSearchesNoResultsResponse')
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetSearchesNoResultsResponse')
end
# Get Analytics API status.
# 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.
# @param index [String] Index name to target. (required)
@@ -798,11 +798,11 @@
# @param index [String] Index name to target. (required)
# @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)
# @return [GetStatusResponse]
def get_status(index, request_options = {})
response = get_status_with_http_info(index, request_options)
- deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetStatusResponse')
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetStatusResponse')
end
# Get top countries.
# Returns top countries. Limited to the 1,000 most frequent ones.
# @param index [String] Index name to target. (required)
@@ -864,11 +864,11 @@
# @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.
# @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)
# @return [GetTopCountriesResponse]
def get_top_countries(index, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
response = get_top_countries_with_http_info(index, start_date, end_date, limit, offset, tags, request_options)
- deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopCountriesResponse')
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopCountriesResponse')
end
# Get top filterable attributes.
# 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.
# @param index [String] Index name to target. (required)
@@ -933,11 +933,11 @@
# @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.
# @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)
# @return [GetTopFilterAttributesResponse]
def get_top_filter_attributes(index, search = nil, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
response = get_top_filter_attributes_with_http_info(index, search, start_date, end_date, limit, offset, tags, request_options)
- deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopFilterAttributesResponse')
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopFilterAttributesResponse')
end
# Get top filter values for an attribute.
# Returns the most popular filter values for an attribute in the 1,000 most recently used filters.
# @param attribute [String] Attribute name. (required)
@@ -1008,11 +1008,11 @@
# @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.
# @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)
# @return [GetTopFilterForAttributeResponse]
def get_top_filter_for_attribute(attribute, index, search = nil, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
response = get_top_filter_for_attribute_with_http_info(attribute, index, search, start_date, end_date, limit, offset, tags, request_options)
- deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopFilterForAttributeResponse')
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopFilterForAttributeResponse')
end
# Get top filters for a no result search.
# Returns top filters for filter-enabled searches that don't return results. Limited to the 1,000 most recently used filters.
# @param index [String] Index name to target. (required)
@@ -1077,11 +1077,11 @@
# @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.
# @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)
# @return [GetTopFiltersNoResultsResponse]
def get_top_filters_no_results(index, search = nil, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
response = get_top_filters_no_results_with_http_info(index, search, start_date, end_date, limit, offset, tags, request_options)
- deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopFiltersNoResultsResponse')
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopFiltersNoResultsResponse')
end
# Get top hits.
# Return the most popular clicked results in the last 1,000 searches.
# @param index [String] Index name to target. (required)
@@ -1149,11 +1149,11 @@
# @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.
# @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)
# @return [GetTopHitsResponse]
def get_top_hits(index, search = nil, click_analytics = nil, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
response = get_top_hits_with_http_info(index, search, click_analytics, start_date, end_date, limit, offset, tags, request_options)
- deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopHitsResponse')
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopHitsResponse')
end
# Get top searches.
# Returns the most popular of the latest 1,000 searches. For each search, also returns the number of hits.
# @param index [String] Index name to target. (required)
@@ -1226,11 +1226,11 @@
# @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)
# @return [GetTopSearchesResponse]
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,
request_options = {})
response = get_top_searches_with_http_info(index, click_analytics, start_date, end_date, order_by, direction, limit, offset, tags, request_options)
- deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopSearchesResponse')
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopSearchesResponse')
end
# Get user count.
# Return the count of unique users.
# @param index [String] Index name to target. (required)
@@ -1286,9 +1286,9 @@
# @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.
# @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)
# @return [GetUsersCountResponse]
def get_users_count(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
response = get_users_count_with_http_info(index, start_date, end_date, tags, request_options)
- deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetUsersCountResponse')
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetUsersCountResponse')
end
end
end