Skip to content

Commit

Permalink
fix(specs): update analytics and abtesting max pagination query limit…
Browse files Browse the repository at this point in the history
… (generated)

algolia/api-clients-automation#3696

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Fernando Beck <fe.beck25@gmail.com>
Co-authored-by: Pierre Millot <pierre.millot@algolia.com>
  • Loading branch information
3 people committed Oct 3, 2024
1 parent a95024f commit ddab809
Showing 1 changed file with 72 additions and 16 deletions.
88 changes: 72 additions & 16 deletions lib/Api/AnalyticsClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -744,8 +744,8 @@ public function getSearchesCount($index, $startDate = null, $endDate = null, $ta
* @param string $index Index name. (required)
* @param string $startDate Start date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
* @param string $endDate End date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
* @param int $limit Number of items to return. (optional, default to 10)
* @param int $offset Position of the first item to return. (optional, default to 0)
* @param int $limit Number of items to return. Combined with the &#x60;offset&#x60; parameter, only the first 1000 items can be retrieved. (optional, default to 10)
* @param int $offset Position of the first item to return. Combined with the &#x60;limit&#x60; parameter, only the first 1000 items can be retrieved. (optional, default to 0)
* @param string $tags Tags by which to segment the analytics. You can combine multiple tags with &#x60;OR&#x60; and &#x60;AND&#x60;. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional)
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
*
Expand All @@ -759,6 +759,13 @@ public function getSearchesNoClicks($index, $startDate = null, $endDate = null,
'Parameter `index` is required when calling `getSearchesNoClicks`.'
);
}
if (null !== $limit && $limit > 1000) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getSearchesNoClicks, must be smaller than or equal to 1000.');
}

if (null !== $offset && $offset > 1000) {
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getSearchesNoClicks, must be smaller than or equal to 1000.');
}
if (null !== $offset && $offset < 0) {
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getSearchesNoClicks, must be bigger than or equal to 0.');
}
Expand Down Expand Up @@ -804,8 +811,8 @@ public function getSearchesNoClicks($index, $startDate = null, $endDate = null,
* @param string $index Index name. (required)
* @param string $startDate Start date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
* @param string $endDate End date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
* @param int $limit Number of items to return. (optional, default to 10)
* @param int $offset Position of the first item to return. (optional, default to 0)
* @param int $limit Number of items to return. Combined with the &#x60;offset&#x60; parameter, only the first 1000 items can be retrieved. (optional, default to 10)
* @param int $offset Position of the first item to return. Combined with the &#x60;limit&#x60; parameter, only the first 1000 items can be retrieved. (optional, default to 0)
* @param string $tags Tags by which to segment the analytics. You can combine multiple tags with &#x60;OR&#x60; and &#x60;AND&#x60;. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional)
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
*
Expand All @@ -819,6 +826,13 @@ public function getSearchesNoResults($index, $startDate = null, $endDate = null,
'Parameter `index` is required when calling `getSearchesNoResults`.'
);
}
if (null !== $limit && $limit > 1000) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getSearchesNoResults, must be smaller than or equal to 1000.');
}

if (null !== $offset && $offset > 1000) {
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getSearchesNoResults, must be smaller than or equal to 1000.');
}
if (null !== $offset && $offset < 0) {
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getSearchesNoResults, must be bigger than or equal to 0.');
}
Expand Down Expand Up @@ -896,8 +910,8 @@ public function getStatus($index, $requestOptions = [])
* @param string $index Index name. (required)
* @param string $startDate Start date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
* @param string $endDate End date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
* @param int $limit Number of items to return. (optional, default to 10)
* @param int $offset Position of the first item to return. (optional, default to 0)
* @param int $limit Number of items to return. Combined with the &#x60;offset&#x60; parameter, only the first 1000 items can be retrieved. (optional, default to 10)
* @param int $offset Position of the first item to return. Combined with the &#x60;limit&#x60; parameter, only the first 1000 items can be retrieved. (optional, default to 0)
* @param string $tags Tags by which to segment the analytics. You can combine multiple tags with &#x60;OR&#x60; and &#x60;AND&#x60;. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional)
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
*
Expand All @@ -911,6 +925,13 @@ public function getTopCountries($index, $startDate = null, $endDate = null, $lim
'Parameter `index` is required when calling `getTopCountries`.'
);
}
if (null !== $limit && $limit > 1000) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getTopCountries, must be smaller than or equal to 1000.');
}

if (null !== $offset && $offset > 1000) {
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopCountries, must be smaller than or equal to 1000.');
}
if (null !== $offset && $offset < 0) {
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopCountries, must be bigger than or equal to 0.');
}
Expand Down Expand Up @@ -957,8 +978,8 @@ public function getTopCountries($index, $startDate = null, $endDate = null, $lim
* @param string $search Search query. (optional)
* @param string $startDate Start date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
* @param string $endDate End date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
* @param int $limit Number of items to return. (optional, default to 10)
* @param int $offset Position of the first item to return. (optional, default to 0)
* @param int $limit Number of items to return. Combined with the &#x60;offset&#x60; parameter, only the first 1000 items can be retrieved. (optional, default to 10)
* @param int $offset Position of the first item to return. Combined with the &#x60;limit&#x60; parameter, only the first 1000 items can be retrieved. (optional, default to 0)
* @param string $tags Tags by which to segment the analytics. You can combine multiple tags with &#x60;OR&#x60; and &#x60;AND&#x60;. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional)
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
*
Expand All @@ -972,6 +993,13 @@ public function getTopFilterAttributes($index, $search = null, $startDate = null
'Parameter `index` is required when calling `getTopFilterAttributes`.'
);
}
if (null !== $limit && $limit > 1000) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getTopFilterAttributes, must be smaller than or equal to 1000.');
}

if (null !== $offset && $offset > 1000) {
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopFilterAttributes, must be smaller than or equal to 1000.');
}
if (null !== $offset && $offset < 0) {
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopFilterAttributes, must be bigger than or equal to 0.');
}
Expand Down Expand Up @@ -1023,8 +1051,8 @@ public function getTopFilterAttributes($index, $search = null, $startDate = null
* @param string $search Search query. (optional)
* @param string $startDate Start date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
* @param string $endDate End date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
* @param int $limit Number of items to return. (optional, default to 10)
* @param int $offset Position of the first item to return. (optional, default to 0)
* @param int $limit Number of items to return. Combined with the &#x60;offset&#x60; parameter, only the first 1000 items can be retrieved. (optional, default to 10)
* @param int $offset Position of the first item to return. Combined with the &#x60;limit&#x60; parameter, only the first 1000 items can be retrieved. (optional, default to 0)
* @param string $tags Tags by which to segment the analytics. You can combine multiple tags with &#x60;OR&#x60; and &#x60;AND&#x60;. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional)
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
*
Expand All @@ -1044,6 +1072,13 @@ public function getTopFilterForAttribute($attribute, $index, $search = null, $st
'Parameter `index` is required when calling `getTopFilterForAttribute`.'
);
}
if (null !== $limit && $limit > 1000) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getTopFilterForAttribute, must be smaller than or equal to 1000.');
}

if (null !== $offset && $offset > 1000) {
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopFilterForAttribute, must be smaller than or equal to 1000.');
}
if (null !== $offset && $offset < 0) {
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopFilterForAttribute, must be bigger than or equal to 0.');
}
Expand Down Expand Up @@ -1103,8 +1138,8 @@ public function getTopFilterForAttribute($attribute, $index, $search = null, $st
* @param string $search Search query. (optional)
* @param string $startDate Start date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
* @param string $endDate End date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
* @param int $limit Number of items to return. (optional, default to 10)
* @param int $offset Position of the first item to return. (optional, default to 0)
* @param int $limit Number of items to return. Combined with the &#x60;offset&#x60; parameter, only the first 1000 items can be retrieved. (optional, default to 10)
* @param int $offset Position of the first item to return. Combined with the &#x60;limit&#x60; parameter, only the first 1000 items can be retrieved. (optional, default to 0)
* @param string $tags Tags by which to segment the analytics. You can combine multiple tags with &#x60;OR&#x60; and &#x60;AND&#x60;. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional)
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
*
Expand All @@ -1118,6 +1153,13 @@ public function getTopFiltersNoResults($index, $search = null, $startDate = null
'Parameter `index` is required when calling `getTopFiltersNoResults`.'
);
}
if (null !== $limit && $limit > 1000) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getTopFiltersNoResults, must be smaller than or equal to 1000.');
}

if (null !== $offset && $offset > 1000) {
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopFiltersNoResults, must be smaller than or equal to 1000.');
}
if (null !== $offset && $offset < 0) {
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopFiltersNoResults, must be bigger than or equal to 0.');
}
Expand Down Expand Up @@ -1170,8 +1212,8 @@ public function getTopFiltersNoResults($index, $search = null, $startDate = null
* @param bool $revenueAnalytics Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response. (optional, default to false)
* @param string $startDate Start date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
* @param string $endDate End date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
* @param int $limit Number of items to return. (optional, default to 10)
* @param int $offset Position of the first item to return. (optional, default to 0)
* @param int $limit Number of items to return. Combined with the &#x60;offset&#x60; parameter, only the first 1000 items can be retrieved. (optional, default to 10)
* @param int $offset Position of the first item to return. Combined with the &#x60;limit&#x60; parameter, only the first 1000 items can be retrieved. (optional, default to 0)
* @param string $tags Tags by which to segment the analytics. You can combine multiple tags with &#x60;OR&#x60; and &#x60;AND&#x60;. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional)
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
*
Expand All @@ -1185,6 +1227,13 @@ public function getTopHits($index, $search = null, $clickAnalytics = null, $reve
'Parameter `index` is required when calling `getTopHits`.'
);
}
if (null !== $limit && $limit > 1000) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getTopHits, must be smaller than or equal to 1000.');
}

if (null !== $offset && $offset > 1000) {
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopHits, must be smaller than or equal to 1000.');
}
if (null !== $offset && $offset < 0) {
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopHits, must be bigger than or equal to 0.');
}
Expand Down Expand Up @@ -1246,8 +1295,8 @@ public function getTopHits($index, $search = null, $clickAnalytics = null, $reve
* @param string $endDate End date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
* @param array $orderBy Attribute by which to order the response items. If the &#x60;clickAnalytics&#x60; parameter is false, only &#x60;searchCount&#x60; is available. (optional)
* @param array $direction Sorting direction of the results: ascending or descending. (optional)
* @param int $limit Number of items to return. (optional, default to 10)
* @param int $offset Position of the first item to return. (optional, default to 0)
* @param int $limit Number of items to return. Combined with the &#x60;offset&#x60; parameter, only the first 1000 items can be retrieved. (optional, default to 10)
* @param int $offset Position of the first item to return. Combined with the &#x60;limit&#x60; parameter, only the first 1000 items can be retrieved. (optional, default to 0)
* @param string $tags Tags by which to segment the analytics. You can combine multiple tags with &#x60;OR&#x60; and &#x60;AND&#x60;. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional)
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
*
Expand All @@ -1261,6 +1310,13 @@ public function getTopSearches($index, $clickAnalytics = null, $revenueAnalytics
'Parameter `index` is required when calling `getTopSearches`.'
);
}
if (null !== $limit && $limit > 1000) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getTopSearches, must be smaller than or equal to 1000.');
}

if (null !== $offset && $offset > 1000) {
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopSearches, must be smaller than or equal to 1000.');
}
if (null !== $offset && $offset < 0) {
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopSearches, must be bigger than or equal to 0.');
}
Expand Down

0 comments on commit ddab809

Please sign in to comment.