lib/algolia/api/analytics_client.rb in algolia-3.4.0 vs lib/algolia/api/analytics_client.rb in algolia-3.5.0
- old
+ new
@@ -798,12 +798,12 @@
# Required API Key ACLs:
# - analytics
# @param index [String] Index name. (required)
# @param start_date [String] Start date of the period to analyze, in `YYYY-MM-DD` format.
# @param end_date [String] End date of the period to analyze, in `YYYY-MM-DD` format.
- # @param limit [Integer] Number of items to return. (default to 10)
- # @param offset [Integer] Position of the first item to return. (default to 0)
+ # @param limit [Integer] Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved. (default to 10)
+ # @param offset [Integer] Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved. (default to 0)
# @param tags [String] Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
# @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 [Http::Response] the response
def get_searches_no_clicks_with_http_info(
index,
@@ -817,10 +817,24 @@
# verify the required parameter 'index' is set
if @api_client.config.client_side_validation && index.nil?
raise ArgumentError, "Parameter `index` is required when calling `get_searches_no_clicks`."
end
+ if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
+ raise(
+ ArgumentError,
+ "invalid value for \"\"limit\"\" when calling AnalyticsClient.get_searches_no_clicks, must be smaller than or equal to 1000."
+ )
+ end
+
+ if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
+ raise(
+ ArgumentError,
+ "invalid value for \"\"offset\"\" when calling AnalyticsClient.get_searches_no_clicks, must be smaller than or equal to 1000."
+ )
+ end
+
if @api_client.config.client_side_validation && !offset.nil? && offset < 0
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_searches_no_clicks, must be greater than or equal to 0."
)
@@ -856,12 +870,12 @@
# Required API Key ACLs:
# - analytics
# @param index [String] Index name. (required)
# @param start_date [String] Start date of the period to analyze, in `YYYY-MM-DD` format.
# @param end_date [String] End date of the period to analyze, in `YYYY-MM-DD` format.
- # @param limit [Integer] Number of items to return. (default to 10)
- # @param offset [Integer] Position of the first item to return. (default to 0)
+ # @param limit [Integer] Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved. (default to 10)
+ # @param offset [Integer] Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved. (default to 0)
# @param tags [String] Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
# @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,
@@ -892,12 +906,12 @@
# Required API Key ACLs:
# - analytics
# @param index [String] Index name. (required)
# @param start_date [String] Start date of the period to analyze, in `YYYY-MM-DD` format.
# @param end_date [String] End date of the period to analyze, in `YYYY-MM-DD` format.
- # @param limit [Integer] Number of items to return. (default to 10)
- # @param offset [Integer] Position of the first item to return. (default to 0)
+ # @param limit [Integer] Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved. (default to 10)
+ # @param offset [Integer] Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved. (default to 0)
# @param tags [String] Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
# @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 [Http::Response] the response
def get_searches_no_results_with_http_info(
index,
@@ -911,10 +925,24 @@
# verify the required parameter 'index' is set
if @api_client.config.client_side_validation && index.nil?
raise ArgumentError, "Parameter `index` is required when calling `get_searches_no_results`."
end
+ if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
+ raise(
+ ArgumentError,
+ "invalid value for \"\"limit\"\" when calling AnalyticsClient.get_searches_no_results, must be smaller than or equal to 1000."
+ )
+ end
+
+ if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
+ raise(
+ ArgumentError,
+ "invalid value for \"\"offset\"\" when calling AnalyticsClient.get_searches_no_results, must be smaller than or equal to 1000."
+ )
+ end
+
if @api_client.config.client_side_validation && !offset.nil? && offset < 0
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_searches_no_results, must be greater than or equal to 0."
)
@@ -950,12 +978,12 @@
# Required API Key ACLs:
# - analytics
# @param index [String] Index name. (required)
# @param start_date [String] Start date of the period to analyze, in `YYYY-MM-DD` format.
# @param end_date [String] End date of the period to analyze, in `YYYY-MM-DD` format.
- # @param limit [Integer] Number of items to return. (default to 10)
- # @param offset [Integer] Position of the first item to return. (default to 0)
+ # @param limit [Integer] Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved. (default to 10)
+ # @param offset [Integer] Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved. (default to 0)
# @param tags [String] Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
# @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,
@@ -1031,12 +1059,12 @@
# Required API Key ACLs:
# - analytics
# @param index [String] Index name. (required)
# @param start_date [String] Start date of the period to analyze, in `YYYY-MM-DD` format.
# @param end_date [String] End date of the period to analyze, in `YYYY-MM-DD` format.
- # @param limit [Integer] Number of items to return. (default to 10)
- # @param offset [Integer] Position of the first item to return. (default to 0)
+ # @param limit [Integer] Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved. (default to 10)
+ # @param offset [Integer] Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved. (default to 0)
# @param tags [String] Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
# @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 [Http::Response] the response
def get_top_countries_with_http_info(
index,
@@ -1050,10 +1078,24 @@
# verify the required parameter 'index' is set
if @api_client.config.client_side_validation && index.nil?
raise ArgumentError, "Parameter `index` is required when calling `get_top_countries`."
end
+ if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
+ raise(
+ ArgumentError,
+ "invalid value for \"\"limit\"\" when calling AnalyticsClient.get_top_countries, must be smaller than or equal to 1000."
+ )
+ end
+
+ if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
+ raise(
+ ArgumentError,
+ "invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_countries, must be smaller than or equal to 1000."
+ )
+ end
+
if @api_client.config.client_side_validation && !offset.nil? && offset < 0
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_countries, must be greater than or equal to 0."
)
@@ -1089,12 +1131,12 @@
# Required API Key ACLs:
# - analytics
# @param index [String] Index name. (required)
# @param start_date [String] Start date of the period to analyze, in `YYYY-MM-DD` format.
# @param end_date [String] End date of the period to analyze, in `YYYY-MM-DD` format.
- # @param limit [Integer] Number of items to return. (default to 10)
- # @param offset [Integer] Position of the first item to return. (default to 0)
+ # @param limit [Integer] Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved. (default to 10)
+ # @param offset [Integer] Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved. (default to 0)
# @param tags [String] Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
# @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,
@@ -1118,12 +1160,12 @@
# - analytics
# @param index [String] Index name. (required)
# @param search [String] Search query.
# @param start_date [String] Start date of the period to analyze, in `YYYY-MM-DD` format.
# @param end_date [String] End date of the period to analyze, in `YYYY-MM-DD` format.
- # @param limit [Integer] Number of items to return. (default to 10)
- # @param offset [Integer] Position of the first item to return. (default to 0)
+ # @param limit [Integer] Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved. (default to 10)
+ # @param offset [Integer] Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved. (default to 0)
# @param tags [String] Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
# @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 [Http::Response] the response
def get_top_filter_attributes_with_http_info(
index,
@@ -1138,10 +1180,24 @@
# verify the required parameter 'index' is set
if @api_client.config.client_side_validation && index.nil?
raise ArgumentError, "Parameter `index` is required when calling `get_top_filter_attributes`."
end
+ if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
+ raise(
+ ArgumentError,
+ "invalid value for \"\"limit\"\" when calling AnalyticsClient.get_top_filter_attributes, must be smaller than or equal to 1000."
+ )
+ end
+
+ if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
+ raise(
+ ArgumentError,
+ "invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_filter_attributes, must be smaller than or equal to 1000."
+ )
+ end
+
if @api_client.config.client_side_validation && !offset.nil? && offset < 0
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_filter_attributes, must be greater than or equal to 0."
)
@@ -1179,12 +1235,12 @@
# - analytics
# @param index [String] Index name. (required)
# @param search [String] Search query.
# @param start_date [String] Start date of the period to analyze, in `YYYY-MM-DD` format.
# @param end_date [String] End date of the period to analyze, in `YYYY-MM-DD` format.
- # @param limit [Integer] Number of items to return. (default to 10)
- # @param offset [Integer] Position of the first item to return. (default to 0)
+ # @param limit [Integer] Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved. (default to 10)
+ # @param offset [Integer] Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved. (default to 0)
# @param tags [String] Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
# @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,
@@ -1219,12 +1275,12 @@
# @param attribute [String] Attribute name. (required)
# @param index [String] Index name. (required)
# @param search [String] Search query.
# @param start_date [String] Start date of the period to analyze, in `YYYY-MM-DD` format.
# @param end_date [String] End date of the period to analyze, in `YYYY-MM-DD` format.
- # @param limit [Integer] Number of items to return. (default to 10)
- # @param offset [Integer] Position of the first item to return. (default to 0)
+ # @param limit [Integer] Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved. (default to 10)
+ # @param offset [Integer] Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved. (default to 0)
# @param tags [String] Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
# @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 [Http::Response] the response
def get_top_filter_for_attribute_with_http_info(
attribute,
@@ -1244,10 +1300,24 @@
# verify the required parameter 'index' is set
if @api_client.config.client_side_validation && index.nil?
raise ArgumentError, "Parameter `index` is required when calling `get_top_filter_for_attribute`."
end
+ if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
+ raise(
+ ArgumentError,
+ "invalid value for \"\"limit\"\" when calling AnalyticsClient.get_top_filter_for_attribute, must be smaller than or equal to 1000."
+ )
+ end
+
+ if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
+ raise(
+ ArgumentError,
+ "invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_filter_for_attribute, must be smaller than or equal to 1000."
+ )
+ end
+
if @api_client.config.client_side_validation && !offset.nil? && offset < 0
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_filter_for_attribute, must be greater than or equal to 0."
)
@@ -1286,12 +1356,12 @@
# @param attribute [String] Attribute name. (required)
# @param index [String] Index name. (required)
# @param search [String] Search query.
# @param start_date [String] Start date of the period to analyze, in `YYYY-MM-DD` format.
# @param end_date [String] End date of the period to analyze, in `YYYY-MM-DD` format.
- # @param limit [Integer] Number of items to return. (default to 10)
- # @param offset [Integer] Position of the first item to return. (default to 0)
+ # @param limit [Integer] Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved. (default to 10)
+ # @param offset [Integer] Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved. (default to 0)
# @param tags [String] Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
# @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,
@@ -1327,12 +1397,12 @@
# - analytics
# @param index [String] Index name. (required)
# @param search [String] Search query.
# @param start_date [String] Start date of the period to analyze, in `YYYY-MM-DD` format.
# @param end_date [String] End date of the period to analyze, in `YYYY-MM-DD` format.
- # @param limit [Integer] Number of items to return. (default to 10)
- # @param offset [Integer] Position of the first item to return. (default to 0)
+ # @param limit [Integer] Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved. (default to 10)
+ # @param offset [Integer] Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved. (default to 0)
# @param tags [String] Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
# @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 [Http::Response] the response
def get_top_filters_no_results_with_http_info(
index,
@@ -1347,10 +1417,24 @@
# verify the required parameter 'index' is set
if @api_client.config.client_side_validation && index.nil?
raise ArgumentError, "Parameter `index` is required when calling `get_top_filters_no_results`."
end
+ if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
+ raise(
+ ArgumentError,
+ "invalid value for \"\"limit\"\" when calling AnalyticsClient.get_top_filters_no_results, must be smaller than or equal to 1000."
+ )
+ end
+
+ if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
+ raise(
+ ArgumentError,
+ "invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_filters_no_results, must be smaller than or equal to 1000."
+ )
+ end
+
if @api_client.config.client_side_validation && !offset.nil? && offset < 0
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_filters_no_results, must be greater than or equal to 0."
)
@@ -1388,12 +1472,12 @@
# - analytics
# @param index [String] Index name. (required)
# @param search [String] Search query.
# @param start_date [String] Start date of the period to analyze, in `YYYY-MM-DD` format.
# @param end_date [String] End date of the period to analyze, in `YYYY-MM-DD` format.
- # @param limit [Integer] Number of items to return. (default to 10)
- # @param offset [Integer] Position of the first item to return. (default to 0)
+ # @param limit [Integer] Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved. (default to 10)
+ # @param offset [Integer] Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved. (default to 0)
# @param tags [String] Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
# @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,
@@ -1429,12 +1513,12 @@
# @param search [String] Search query.
# @param click_analytics [Boolean] Whether to include metrics related to click and conversion events in the response. (default to false)
# @param revenue_analytics [Boolean] Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response. (default to false)
# @param start_date [String] Start date of the period to analyze, in `YYYY-MM-DD` format.
# @param end_date [String] End date of the period to analyze, in `YYYY-MM-DD` format.
- # @param limit [Integer] Number of items to return. (default to 10)
- # @param offset [Integer] Position of the first item to return. (default to 0)
+ # @param limit [Integer] Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved. (default to 10)
+ # @param offset [Integer] Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved. (default to 0)
# @param tags [String] Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
# @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 [Http::Response] the response
def get_top_hits_with_http_info(
index,
@@ -1451,10 +1535,24 @@
# verify the required parameter 'index' is set
if @api_client.config.client_side_validation && index.nil?
raise ArgumentError, "Parameter `index` is required when calling `get_top_hits`."
end
+ if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
+ raise(
+ ArgumentError,
+ "invalid value for \"\"limit\"\" when calling AnalyticsClient.get_top_hits, must be smaller than or equal to 1000."
+ )
+ end
+
+ if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
+ raise(
+ ArgumentError,
+ "invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_hits, must be smaller than or equal to 1000."
+ )
+ end
+
if @api_client.config.client_side_validation && !offset.nil? && offset < 0
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_hits, must be greater than or equal to 0."
)
@@ -1496,12 +1594,12 @@
# @param search [String] Search query.
# @param click_analytics [Boolean] Whether to include metrics related to click and conversion events in the response. (default to false)
# @param revenue_analytics [Boolean] Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response. (default to false)
# @param start_date [String] Start date of the period to analyze, in `YYYY-MM-DD` format.
# @param end_date [String] End date of the period to analyze, in `YYYY-MM-DD` format.
- # @param limit [Integer] Number of items to return. (default to 10)
- # @param offset [Integer] Position of the first item to return. (default to 0)
+ # @param limit [Integer] Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved. (default to 10)
+ # @param offset [Integer] Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved. (default to 0)
# @param tags [String] Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
# @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,
@@ -1539,12 +1637,12 @@
# @param revenue_analytics [Boolean] Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response. (default to false)
# @param start_date [String] Start date of the period to analyze, in `YYYY-MM-DD` format.
# @param end_date [String] End date of the period to analyze, in `YYYY-MM-DD` format.
# @param order_by [OrderBy] Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available. (default to 'searchCount')
# @param direction [Direction] Sorting direction of the results: ascending or descending. (default to 'asc')
- # @param limit [Integer] Number of items to return. (default to 10)
- # @param offset [Integer] Position of the first item to return. (default to 0)
+ # @param limit [Integer] Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved. (default to 10)
+ # @param offset [Integer] Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved. (default to 0)
# @param tags [String] Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
# @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 [Http::Response] the response
def get_top_searches_with_http_info(
index,
@@ -1562,10 +1660,24 @@
# verify the required parameter 'index' is set
if @api_client.config.client_side_validation && index.nil?
raise ArgumentError, "Parameter `index` is required when calling `get_top_searches`."
end
+ if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
+ raise(
+ ArgumentError,
+ "invalid value for \"\"limit\"\" when calling AnalyticsClient.get_top_searches, must be smaller than or equal to 1000."
+ )
+ end
+
+ if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
+ raise(
+ ArgumentError,
+ "invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_searches, must be smaller than or equal to 1000."
+ )
+ end
+
if @api_client.config.client_side_validation && !offset.nil? && offset < 0
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_searches, must be greater than or equal to 0."
)
@@ -1609,11 +1721,11 @@
# @param revenue_analytics [Boolean] Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response. (default to false)
# @param start_date [String] Start date of the period to analyze, in `YYYY-MM-DD` format.
# @param end_date [String] End date of the period to analyze, in `YYYY-MM-DD` format.
# @param order_by [OrderBy] Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available. (default to 'searchCount')
# @param direction [Direction] Sorting direction of the results: ascending or descending. (default to 'asc')
- # @param limit [Integer] Number of items to return. (default to 10)
- # @param offset [Integer] Position of the first item to return. (default to 0)
+ # @param limit [Integer] Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved. (default to 10)
+ # @param offset [Integer] Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved. (default to 0)
# @param tags [String] Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
# @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,