discogs-marketplace-api-nodejs 1.14.4 → 1.15.0
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/README.MD
CHANGED
|
@@ -175,8 +175,8 @@ Both share common search filters and extend them with API-specific options via t
|
|
|
175
175
|
| `sellerIds` | `number[]` | Filter by seller IDs. | `[789, 1011]` | – |
|
|
176
176
|
| `priceRange.min`/`max` | `number` | Filter by price range. | `{ min: 10, max: 100 }` | – |
|
|
177
177
|
| `sellerRatingMin` | `number (0–100)` | Minimum seller rating. | `90` | `0` |
|
|
178
|
-
| `
|
|
179
|
-
| `
|
|
178
|
+
| `hideGenericSleeves` | `boolean` | Hide generic sleeves. | – | `false` |
|
|
179
|
+
| `hideSleevelessMedia` | `boolean` | Hide sleeveless media. | – | `false` |
|
|
180
180
|
| `showUnavailable` | `boolean` | Show unavailable items. | – | `true` |
|
|
181
181
|
| `sellerRatingCountMin` | `number` | Minimum number of seller ratings. | `50` | `0` |
|
|
182
182
|
| `wantlist`* | `string` | Search by wantlist username. | `"username"` | – |
|
|
@@ -193,15 +193,15 @@ interface SearchParamsModernBase extends SearchParamsBase {
|
|
|
193
193
|
*/
|
|
194
194
|
sellerRatingMin?: number;
|
|
195
195
|
/**
|
|
196
|
-
*
|
|
197
|
-
* @default
|
|
196
|
+
* Hide generic sleeves.
|
|
197
|
+
* @default false
|
|
198
198
|
*/
|
|
199
|
-
|
|
199
|
+
hideGenericSleeves?: boolean;
|
|
200
200
|
/**
|
|
201
|
-
*
|
|
202
|
-
* @default
|
|
201
|
+
* Hide sleeveless media.
|
|
202
|
+
* @default false
|
|
203
203
|
*/
|
|
204
|
-
|
|
204
|
+
hideSleevelessMedia?: boolean;
|
|
205
205
|
/**
|
|
206
206
|
* Show unavailable items.
|
|
207
207
|
* @default true
|
|
@@ -5,7 +5,7 @@ import type { SearchParamsModern } from '../interfaces/search-params.interface.j
|
|
|
5
5
|
* @param SearchParams Search parameters
|
|
6
6
|
* @returns Items found and total
|
|
7
7
|
*/
|
|
8
|
-
export default function scrape({ currencies, genres, formats, formatDescriptions, conditions, years, isMakeAnOfferOnly, from, sort, limit, page, releaseIds, sellerIds, artistIds, priceRange, sellerRatingMin,
|
|
8
|
+
export default function scrape({ currencies, genres, formats, formatDescriptions, conditions, years, isMakeAnOfferOnly, from, sort, limit, page, releaseIds, sellerIds, artistIds, priceRange, sellerRatingMin, hideGenericSleeves, hideSleevelessMedia, showUnavailable, sellerRatingCountMin, }: SearchParamsModern): Promise<Pick<SearchResult, 'items' | 'urlGenerated'> & {
|
|
9
9
|
/** Total items found */
|
|
10
10
|
total: SearchResult['result']['total'];
|
|
11
11
|
}>;
|
|
@@ -12,14 +12,14 @@ const search_1 = require("../search.js");
|
|
|
12
12
|
* @param SearchParams Search parameters
|
|
13
13
|
* @returns Items found and total
|
|
14
14
|
*/
|
|
15
|
-
async function scrape({ currencies, genres, formats, formatDescriptions, conditions, years, isMakeAnOfferOnly = false, from, sort = search_1.DEFAULT_SORT, limit = search_1.DEFAULT_LIMIT, page = search_1.DEFAULT_PAGE, releaseIds, sellerIds, artistIds, priceRange, sellerRatingMin = 0,
|
|
15
|
+
async function scrape({ currencies, genres, formats, formatDescriptions, conditions, years, isMakeAnOfferOnly = false, from, sort = search_1.DEFAULT_SORT, limit = search_1.DEFAULT_LIMIT, page = search_1.DEFAULT_PAGE, releaseIds, sellerIds, artistIds, priceRange, sellerRatingMin = 0, hideGenericSleeves = false, hideSleevelessMedia = false, showUnavailable = true, sellerRatingCountMin = 0, }) {
|
|
16
16
|
const [sortType, sortOrder] = sort.split(',');
|
|
17
17
|
const urlGenerated = [
|
|
18
18
|
'https://www.discogs.com/api/shop-page-api/sell_item',
|
|
19
19
|
new URLSearchParams([
|
|
20
20
|
['sellerRatingMin', sellerRatingMin.toString()],
|
|
21
|
-
['
|
|
22
|
-
['
|
|
21
|
+
['hideGenericSleeves', hideGenericSleeves.toString()],
|
|
22
|
+
['hideSleevelessMedia', hideSleevelessMedia.toString()],
|
|
23
23
|
['showUnavailable', showUnavailable.toString()],
|
|
24
24
|
['sellerRatingCountMin', sellerRatingCountMin.toString()],
|
|
25
25
|
[
|