Skip to content

Commit ddab809

Browse files
algolia-botfebeckmillotp
committed
fix(specs): update analytics and abtesting max pagination query limit (generated)
algolia/api-clients-automation#3696 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Fernando Beck <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent a95024f commit ddab809

File tree

1 file changed

+72
-16
lines changed

1 file changed

+72
-16
lines changed

lib/Api/AnalyticsClient.php

Lines changed: 72 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -744,8 +744,8 @@ public function getSearchesCount($index, $startDate = null, $endDate = null, $ta
744744
* @param string $index Index name. (required)
745745
* @param string $startDate Start date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
746746
* @param string $endDate End date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
747-
* @param int $limit Number of items to return. (optional, default to 10)
748-
* @param int $offset Position of the first item to return. (optional, default to 0)
747+
* @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)
748+
* @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)
749749
* @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)
750750
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
751751
*
@@ -759,6 +759,13 @@ public function getSearchesNoClicks($index, $startDate = null, $endDate = null,
759759
'Parameter `index` is required when calling `getSearchesNoClicks`.'
760760
);
761761
}
762+
if (null !== $limit && $limit > 1000) {
763+
throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getSearchesNoClicks, must be smaller than or equal to 1000.');
764+
}
765+
766+
if (null !== $offset && $offset > 1000) {
767+
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getSearchesNoClicks, must be smaller than or equal to 1000.');
768+
}
762769
if (null !== $offset && $offset < 0) {
763770
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getSearchesNoClicks, must be bigger than or equal to 0.');
764771
}
@@ -804,8 +811,8 @@ public function getSearchesNoClicks($index, $startDate = null, $endDate = null,
804811
* @param string $index Index name. (required)
805812
* @param string $startDate Start date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
806813
* @param string $endDate End date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
807-
* @param int $limit Number of items to return. (optional, default to 10)
808-
* @param int $offset Position of the first item to return. (optional, default to 0)
814+
* @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)
815+
* @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)
809816
* @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)
810817
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
811818
*
@@ -819,6 +826,13 @@ public function getSearchesNoResults($index, $startDate = null, $endDate = null,
819826
'Parameter `index` is required when calling `getSearchesNoResults`.'
820827
);
821828
}
829+
if (null !== $limit && $limit > 1000) {
830+
throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getSearchesNoResults, must be smaller than or equal to 1000.');
831+
}
832+
833+
if (null !== $offset && $offset > 1000) {
834+
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getSearchesNoResults, must be smaller than or equal to 1000.');
835+
}
822836
if (null !== $offset && $offset < 0) {
823837
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getSearchesNoResults, must be bigger than or equal to 0.');
824838
}
@@ -896,8 +910,8 @@ public function getStatus($index, $requestOptions = [])
896910
* @param string $index Index name. (required)
897911
* @param string $startDate Start date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
898912
* @param string $endDate End date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
899-
* @param int $limit Number of items to return. (optional, default to 10)
900-
* @param int $offset Position of the first item to return. (optional, default to 0)
913+
* @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)
914+
* @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)
901915
* @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)
902916
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
903917
*
@@ -911,6 +925,13 @@ public function getTopCountries($index, $startDate = null, $endDate = null, $lim
911925
'Parameter `index` is required when calling `getTopCountries`.'
912926
);
913927
}
928+
if (null !== $limit && $limit > 1000) {
929+
throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getTopCountries, must be smaller than or equal to 1000.');
930+
}
931+
932+
if (null !== $offset && $offset > 1000) {
933+
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopCountries, must be smaller than or equal to 1000.');
934+
}
914935
if (null !== $offset && $offset < 0) {
915936
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopCountries, must be bigger than or equal to 0.');
916937
}
@@ -957,8 +978,8 @@ public function getTopCountries($index, $startDate = null, $endDate = null, $lim
957978
* @param string $search Search query. (optional)
958979
* @param string $startDate Start date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
959980
* @param string $endDate End date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
960-
* @param int $limit Number of items to return. (optional, default to 10)
961-
* @param int $offset Position of the first item to return. (optional, default to 0)
981+
* @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)
982+
* @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)
962983
* @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)
963984
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
964985
*
@@ -972,6 +993,13 @@ public function getTopFilterAttributes($index, $search = null, $startDate = null
972993
'Parameter `index` is required when calling `getTopFilterAttributes`.'
973994
);
974995
}
996+
if (null !== $limit && $limit > 1000) {
997+
throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getTopFilterAttributes, must be smaller than or equal to 1000.');
998+
}
999+
1000+
if (null !== $offset && $offset > 1000) {
1001+
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopFilterAttributes, must be smaller than or equal to 1000.');
1002+
}
9751003
if (null !== $offset && $offset < 0) {
9761004
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopFilterAttributes, must be bigger than or equal to 0.');
9771005
}
@@ -1023,8 +1051,8 @@ public function getTopFilterAttributes($index, $search = null, $startDate = null
10231051
* @param string $search Search query. (optional)
10241052
* @param string $startDate Start date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
10251053
* @param string $endDate End date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
1026-
* @param int $limit Number of items to return. (optional, default to 10)
1027-
* @param int $offset Position of the first item to return. (optional, default to 0)
1054+
* @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)
1055+
* @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)
10281056
* @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)
10291057
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
10301058
*
@@ -1044,6 +1072,13 @@ public function getTopFilterForAttribute($attribute, $index, $search = null, $st
10441072
'Parameter `index` is required when calling `getTopFilterForAttribute`.'
10451073
);
10461074
}
1075+
if (null !== $limit && $limit > 1000) {
1076+
throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getTopFilterForAttribute, must be smaller than or equal to 1000.');
1077+
}
1078+
1079+
if (null !== $offset && $offset > 1000) {
1080+
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopFilterForAttribute, must be smaller than or equal to 1000.');
1081+
}
10471082
if (null !== $offset && $offset < 0) {
10481083
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopFilterForAttribute, must be bigger than or equal to 0.');
10491084
}
@@ -1103,8 +1138,8 @@ public function getTopFilterForAttribute($attribute, $index, $search = null, $st
11031138
* @param string $search Search query. (optional)
11041139
* @param string $startDate Start date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
11051140
* @param string $endDate End date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
1106-
* @param int $limit Number of items to return. (optional, default to 10)
1107-
* @param int $offset Position of the first item to return. (optional, default to 0)
1141+
* @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)
1142+
* @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)
11081143
* @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)
11091144
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
11101145
*
@@ -1118,6 +1153,13 @@ public function getTopFiltersNoResults($index, $search = null, $startDate = null
11181153
'Parameter `index` is required when calling `getTopFiltersNoResults`.'
11191154
);
11201155
}
1156+
if (null !== $limit && $limit > 1000) {
1157+
throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getTopFiltersNoResults, must be smaller than or equal to 1000.');
1158+
}
1159+
1160+
if (null !== $offset && $offset > 1000) {
1161+
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopFiltersNoResults, must be smaller than or equal to 1000.');
1162+
}
11211163
if (null !== $offset && $offset < 0) {
11221164
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopFiltersNoResults, must be bigger than or equal to 0.');
11231165
}
@@ -1170,8 +1212,8 @@ public function getTopFiltersNoResults($index, $search = null, $startDate = null
11701212
* @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)
11711213
* @param string $startDate Start date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
11721214
* @param string $endDate End date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
1173-
* @param int $limit Number of items to return. (optional, default to 10)
1174-
* @param int $offset Position of the first item to return. (optional, default to 0)
1215+
* @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)
1216+
* @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)
11751217
* @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)
11761218
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
11771219
*
@@ -1185,6 +1227,13 @@ public function getTopHits($index, $search = null, $clickAnalytics = null, $reve
11851227
'Parameter `index` is required when calling `getTopHits`.'
11861228
);
11871229
}
1230+
if (null !== $limit && $limit > 1000) {
1231+
throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getTopHits, must be smaller than or equal to 1000.');
1232+
}
1233+
1234+
if (null !== $offset && $offset > 1000) {
1235+
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopHits, must be smaller than or equal to 1000.');
1236+
}
11881237
if (null !== $offset && $offset < 0) {
11891238
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopHits, must be bigger than or equal to 0.');
11901239
}
@@ -1246,8 +1295,8 @@ public function getTopHits($index, $search = null, $clickAnalytics = null, $reve
12461295
* @param string $endDate End date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (optional)
12471296
* @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)
12481297
* @param array $direction Sorting direction of the results: ascending or descending. (optional)
1249-
* @param int $limit Number of items to return. (optional, default to 10)
1250-
* @param int $offset Position of the first item to return. (optional, default to 0)
1298+
* @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)
1299+
* @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)
12511300
* @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)
12521301
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
12531302
*
@@ -1261,6 +1310,13 @@ public function getTopSearches($index, $clickAnalytics = null, $revenueAnalytics
12611310
'Parameter `index` is required when calling `getTopSearches`.'
12621311
);
12631312
}
1313+
if (null !== $limit && $limit > 1000) {
1314+
throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getTopSearches, must be smaller than or equal to 1000.');
1315+
}
1316+
1317+
if (null !== $offset && $offset > 1000) {
1318+
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopSearches, must be smaller than or equal to 1000.');
1319+
}
12641320
if (null !== $offset && $offset < 0) {
12651321
throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopSearches, must be bigger than or equal to 0.');
12661322
}

0 commit comments

Comments
 (0)