discogs-marketplace-api-nodejs 1.14.0 → 1.14.1
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.
|
@@ -34,12 +34,6 @@ interface SearchParamsBase {
|
|
|
34
34
|
* @default false
|
|
35
35
|
*/
|
|
36
36
|
isMakeAnOfferOnly?: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Number of results to return per page.
|
|
39
|
-
* Allowed values: 25, 50, 100, 250.
|
|
40
|
-
* @default 25
|
|
41
|
-
*/
|
|
42
|
-
limit?: Limit;
|
|
43
37
|
/**
|
|
44
38
|
* Page number of results.
|
|
45
39
|
* Must be less than 401 to avoid Discogs 404 errors.
|
|
@@ -88,6 +82,12 @@ interface SearchParamsLegacyBase extends SearchParamsBase {
|
|
|
88
82
|
* @default 'listed,desc'
|
|
89
83
|
*/
|
|
90
84
|
sort?: Sort;
|
|
85
|
+
/**
|
|
86
|
+
* Number of results to return per page.
|
|
87
|
+
* Allowed values: 25, 50, 100, 250.
|
|
88
|
+
* @default 25
|
|
89
|
+
*/
|
|
90
|
+
limit?: Limit;
|
|
91
91
|
/**
|
|
92
92
|
* Seller's name.
|
|
93
93
|
*/
|
|
@@ -162,6 +162,11 @@ interface SearchParamsModernBase extends SearchParamsBase {
|
|
|
162
162
|
* @default 'listed,desc'
|
|
163
163
|
*/
|
|
164
164
|
sort?: Exclude<Sort, 'label,asc' | 'label,desc'>;
|
|
165
|
+
/**
|
|
166
|
+
* Number of results to return per page.
|
|
167
|
+
* @default 25
|
|
168
|
+
*/
|
|
169
|
+
limit?: number;
|
|
165
170
|
/**
|
|
166
171
|
* List of artist IDs.
|
|
167
172
|
*/
|
|
@@ -47,7 +47,7 @@ async function scrapeWantlist(searchParams) {
|
|
|
47
47
|
const wantlistIds = wants.flat();
|
|
48
48
|
// If there's nothing for sale
|
|
49
49
|
if (wantlistIds.length === 0) {
|
|
50
|
-
return {
|
|
50
|
+
return (0, modern_scraper_1.default)({ ...searchParams, releaseIds: [0], wantlist: undefined });
|
|
51
51
|
}
|
|
52
52
|
return (0, modern_scraper_1.default)({ ...searchParams, releaseIds: wantlistIds, wantlist: undefined });
|
|
53
53
|
}
|