apify-client 3.0.0-beta.57 → 3.0.0-beta.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base/api_client.js +1 -13
- package/dist/bundle.js +6 -6
- package/dist/bundle.js.map +1 -1
- package/dist/resource_clients/actor.d.ts +1 -1
- package/dist/resource_clients/key_value_store.d.ts +11 -3
- package/dist/resource_clients/key_value_store.js +10 -5
- package/dist/resource_clients/request_queue.d.ts +8 -0
- package/dist/resource_clients/request_queue.js +9 -6
- package/dist/utils.d.ts +6 -0
- package/dist/utils.js +16 -0
- package/package.json +1 -1
package/dist/base/api_client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SCANNED_COUNT, toPath, toPathSegment } from '../utils.js';
|
|
1
|
+
import { minForLimitParam, SCANNED_COUNT, toPath, toPathSegment } from '../utils.js';
|
|
2
2
|
/** @private */
|
|
3
3
|
export class ApiClient {
|
|
4
4
|
id;
|
|
@@ -54,18 +54,6 @@ export class ApiClient {
|
|
|
54
54
|
* Returns async iterator to iterate through all items and Promise that can be awaited to get first page of results.
|
|
55
55
|
*/
|
|
56
56
|
listPaginatedFromCallback(getPaginatedList, options = {}) {
|
|
57
|
-
const minForLimitParam = (a, b) => {
|
|
58
|
-
// API treats 0 as undefined for limit parameter
|
|
59
|
-
if (a === 0)
|
|
60
|
-
a = undefined;
|
|
61
|
-
if (b === 0)
|
|
62
|
-
b = undefined;
|
|
63
|
-
if (a === undefined)
|
|
64
|
-
return b;
|
|
65
|
-
if (b === undefined)
|
|
66
|
-
return a;
|
|
67
|
-
return Math.min(a, b);
|
|
68
|
-
};
|
|
69
57
|
// `chunkSize` only sizes this loop's requests; it is not an API parameter, so it must not reach
|
|
70
58
|
// `buildParams()` and the query string. The same goes for `timeoutSecs` and `signal`, which callers take out
|
|
71
59
|
// before calling this, since they also apply to every page request.
|