diff --git a/lib/algolia/api/analytics_client.rb b/lib/algolia/api/analytics_client.rb index 00ecf4bf..eb544d48 100644 --- a/lib/algolia/api/analytics_client.rb +++ b/lib/algolia/api/analytics_client.rb @@ -800,8 +800,8 @@ def get_searches_count(index, start_date = nil, end_date = nil, tags = nil, requ # @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 @@ -819,6 +819,20 @@ def get_searches_no_clicks_with_http_info( 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, @@ -858,8 +872,8 @@ def get_searches_no_clicks_with_http_info( # @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] @@ -894,8 +908,8 @@ def get_searches_no_clicks( # @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 @@ -913,6 +927,20 @@ def get_searches_no_results_with_http_info( 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, @@ -952,8 +980,8 @@ def get_searches_no_results_with_http_info( # @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] @@ -1033,8 +1061,8 @@ def get_status(index, request_options = {}) # @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 @@ -1052,6 +1080,20 @@ def get_top_countries_with_http_info( 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, @@ -1091,8 +1133,8 @@ def get_top_countries_with_http_info( # @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] @@ -1120,8 +1162,8 @@ def get_top_countries( # @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 @@ -1140,6 +1182,20 @@ def get_top_filter_attributes_with_http_info( 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, @@ -1181,8 +1237,8 @@ def get_top_filter_attributes_with_http_info( # @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] @@ -1221,8 +1277,8 @@ def get_top_filter_attributes( # @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 @@ -1246,6 +1302,20 @@ def get_top_filter_for_attribute_with_http_info( 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, @@ -1288,8 +1358,8 @@ def get_top_filter_for_attribute_with_http_info( # @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] @@ -1329,8 +1399,8 @@ def get_top_filter_for_attribute( # @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 @@ -1349,6 +1419,20 @@ def get_top_filters_no_results_with_http_info( 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, @@ -1390,8 +1474,8 @@ def get_top_filters_no_results_with_http_info( # @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] @@ -1431,8 +1515,8 @@ def get_top_filters_no_results( # @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 @@ -1453,6 +1537,20 @@ def get_top_hits_with_http_info( 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, @@ -1498,8 +1596,8 @@ def get_top_hits_with_http_info( # @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] @@ -1541,8 +1639,8 @@ def get_top_hits( # @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 @@ -1564,6 +1662,20 @@ def get_top_searches_with_http_info( 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, @@ -1611,8 +1723,8 @@ def get_top_searches_with_http_info( # @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]