scrapebadger 0.62.0 → 0.64.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/dist/index.d.cts +35 -3
- package/dist/index.d.ts +35 -3
- package/dist/index.js +45 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +45 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1035,6 +1035,33 @@ declare class ReferenceClient$f {
|
|
|
1035
1035
|
market?: string;
|
|
1036
1036
|
per_page?: number;
|
|
1037
1037
|
}): Promise<BrandsResponse>;
|
|
1038
|
+
/**
|
|
1039
|
+
* Get Vinted's A-Z directory of popular brands.
|
|
1040
|
+
*
|
|
1041
|
+
* Returns about 240 of the most popular brands whose name starts with
|
|
1042
|
+
* `letter`, with ID, slug and item count. Loop `letter` over A-Z and "0"
|
|
1043
|
+
* (digits) for a reference list of roughly 6,000 brand IDs. `brands()`
|
|
1044
|
+
* stops at 10 matches per keyword. 1 credit per call.
|
|
1045
|
+
*
|
|
1046
|
+
* @param options - Optional parameters.
|
|
1047
|
+
* @param options.letter - First letter of the brand name, "A"-"Z", or "0"
|
|
1048
|
+
* for digits. Omit for the most popular brands overall.
|
|
1049
|
+
* @param options.market - Market code (default: "fr").
|
|
1050
|
+
* @returns Brands for that letter (no pagination; one page per letter).
|
|
1051
|
+
*
|
|
1052
|
+
* @example
|
|
1053
|
+
* ```typescript
|
|
1054
|
+
* const ids = new Map<string, number>();
|
|
1055
|
+
* for (const letter of [..."ABCDEFGHIJKLMNOPQRSTUVWXYZ", "0"]) {
|
|
1056
|
+
* const { brands } = await client.vinted.reference.popularBrands({ letter, market: "uk" });
|
|
1057
|
+
* for (const brand of brands) ids.set(brand.title, brand.id);
|
|
1058
|
+
* }
|
|
1059
|
+
* ```
|
|
1060
|
+
*/
|
|
1061
|
+
popularBrands(options?: {
|
|
1062
|
+
letter?: string;
|
|
1063
|
+
market?: string;
|
|
1064
|
+
}): Promise<BrandsResponse>;
|
|
1038
1065
|
/**
|
|
1039
1066
|
* Get available colors for a market.
|
|
1040
1067
|
*
|
|
@@ -8633,8 +8660,10 @@ interface EbaySearchByImageParams {
|
|
|
8633
8660
|
}
|
|
8634
8661
|
/** Parameters for searching completed / sold eBay listings. */
|
|
8635
8662
|
interface EbayCompletedParams {
|
|
8636
|
-
/** Search keywords
|
|
8637
|
-
query
|
|
8663
|
+
/** Search keywords. Optional when `seller` is set; pass at least one. */
|
|
8664
|
+
query?: string;
|
|
8665
|
+
/** Only this seller's sold listings (eBay username). Works without `query`. */
|
|
8666
|
+
seller?: string;
|
|
8638
8667
|
/** Marketplace domain (default: "com") */
|
|
8639
8668
|
domain?: string;
|
|
8640
8669
|
/** Restrict to a category id */
|
|
@@ -8769,7 +8798,10 @@ declare class SearchClient$b {
|
|
|
8769
8798
|
/**
|
|
8770
8799
|
* Search completed / sold listings — eBay's sold-price history.
|
|
8771
8800
|
*
|
|
8772
|
-
*
|
|
8801
|
+
* Pass `query`, `seller` or both. `seller` alone pages through everything
|
|
8802
|
+
* that seller sold, e.g. `completed({ seller: "musicmagpie", domain: "co.uk" })`.
|
|
8803
|
+
*
|
|
8804
|
+
* @param params - Search parameters including query, seller, filters, and pagination.
|
|
8773
8805
|
* @returns Search results (with `sold: true`), facets, and pagination.
|
|
8774
8806
|
*/
|
|
8775
8807
|
completed(params: EbayCompletedParams): Promise<SearchResponse$6>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1035,6 +1035,33 @@ declare class ReferenceClient$f {
|
|
|
1035
1035
|
market?: string;
|
|
1036
1036
|
per_page?: number;
|
|
1037
1037
|
}): Promise<BrandsResponse>;
|
|
1038
|
+
/**
|
|
1039
|
+
* Get Vinted's A-Z directory of popular brands.
|
|
1040
|
+
*
|
|
1041
|
+
* Returns about 240 of the most popular brands whose name starts with
|
|
1042
|
+
* `letter`, with ID, slug and item count. Loop `letter` over A-Z and "0"
|
|
1043
|
+
* (digits) for a reference list of roughly 6,000 brand IDs. `brands()`
|
|
1044
|
+
* stops at 10 matches per keyword. 1 credit per call.
|
|
1045
|
+
*
|
|
1046
|
+
* @param options - Optional parameters.
|
|
1047
|
+
* @param options.letter - First letter of the brand name, "A"-"Z", or "0"
|
|
1048
|
+
* for digits. Omit for the most popular brands overall.
|
|
1049
|
+
* @param options.market - Market code (default: "fr").
|
|
1050
|
+
* @returns Brands for that letter (no pagination; one page per letter).
|
|
1051
|
+
*
|
|
1052
|
+
* @example
|
|
1053
|
+
* ```typescript
|
|
1054
|
+
* const ids = new Map<string, number>();
|
|
1055
|
+
* for (const letter of [..."ABCDEFGHIJKLMNOPQRSTUVWXYZ", "0"]) {
|
|
1056
|
+
* const { brands } = await client.vinted.reference.popularBrands({ letter, market: "uk" });
|
|
1057
|
+
* for (const brand of brands) ids.set(brand.title, brand.id);
|
|
1058
|
+
* }
|
|
1059
|
+
* ```
|
|
1060
|
+
*/
|
|
1061
|
+
popularBrands(options?: {
|
|
1062
|
+
letter?: string;
|
|
1063
|
+
market?: string;
|
|
1064
|
+
}): Promise<BrandsResponse>;
|
|
1038
1065
|
/**
|
|
1039
1066
|
* Get available colors for a market.
|
|
1040
1067
|
*
|
|
@@ -8633,8 +8660,10 @@ interface EbaySearchByImageParams {
|
|
|
8633
8660
|
}
|
|
8634
8661
|
/** Parameters for searching completed / sold eBay listings. */
|
|
8635
8662
|
interface EbayCompletedParams {
|
|
8636
|
-
/** Search keywords
|
|
8637
|
-
query
|
|
8663
|
+
/** Search keywords. Optional when `seller` is set; pass at least one. */
|
|
8664
|
+
query?: string;
|
|
8665
|
+
/** Only this seller's sold listings (eBay username). Works without `query`. */
|
|
8666
|
+
seller?: string;
|
|
8638
8667
|
/** Marketplace domain (default: "com") */
|
|
8639
8668
|
domain?: string;
|
|
8640
8669
|
/** Restrict to a category id */
|
|
@@ -8769,7 +8798,10 @@ declare class SearchClient$b {
|
|
|
8769
8798
|
/**
|
|
8770
8799
|
* Search completed / sold listings — eBay's sold-price history.
|
|
8771
8800
|
*
|
|
8772
|
-
*
|
|
8801
|
+
* Pass `query`, `seller` or both. `seller` alone pages through everything
|
|
8802
|
+
* that seller sold, e.g. `completed({ seller: "musicmagpie", domain: "co.uk" })`.
|
|
8803
|
+
*
|
|
8804
|
+
* @param params - Search parameters including query, seller, filters, and pagination.
|
|
8773
8805
|
* @returns Search results (with `sold: true`), facets, and pagination.
|
|
8774
8806
|
*/
|
|
8775
8807
|
completed(params: EbayCompletedParams): Promise<SearchResponse$6>;
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
var WebSocket__default = /*#__PURE__*/_interopDefault(WebSocket);
|
|
10
10
|
|
|
11
11
|
// src/internal/version.ts
|
|
12
|
-
var SDK_VERSION = "0.
|
|
12
|
+
var SDK_VERSION = "0.64.0";
|
|
13
13
|
|
|
14
14
|
// src/internal/exceptions.ts
|
|
15
15
|
var ScrapeBadgerError = class _ScrapeBadgerError extends Error {
|
|
@@ -3034,6 +3034,42 @@ var ReferenceClient = class {
|
|
|
3034
3034
|
}
|
|
3035
3035
|
});
|
|
3036
3036
|
}
|
|
3037
|
+
/**
|
|
3038
|
+
* Get Vinted's A-Z directory of popular brands.
|
|
3039
|
+
*
|
|
3040
|
+
* Returns about 240 of the most popular brands whose name starts with
|
|
3041
|
+
* `letter`, with ID, slug and item count. Loop `letter` over A-Z and "0"
|
|
3042
|
+
* (digits) for a reference list of roughly 6,000 brand IDs. `brands()`
|
|
3043
|
+
* stops at 10 matches per keyword. 1 credit per call.
|
|
3044
|
+
*
|
|
3045
|
+
* @param options - Optional parameters.
|
|
3046
|
+
* @param options.letter - First letter of the brand name, "A"-"Z", or "0"
|
|
3047
|
+
* for digits. Omit for the most popular brands overall.
|
|
3048
|
+
* @param options.market - Market code (default: "fr").
|
|
3049
|
+
* @returns Brands for that letter (no pagination; one page per letter).
|
|
3050
|
+
*
|
|
3051
|
+
* @example
|
|
3052
|
+
* ```typescript
|
|
3053
|
+
* const ids = new Map<string, number>();
|
|
3054
|
+
* for (const letter of [..."ABCDEFGHIJKLMNOPQRSTUVWXYZ", "0"]) {
|
|
3055
|
+
* const { brands } = await client.vinted.reference.popularBrands({ letter, market: "uk" });
|
|
3056
|
+
* for (const brand of brands) ids.set(brand.title, brand.id);
|
|
3057
|
+
* }
|
|
3058
|
+
* ```
|
|
3059
|
+
*/
|
|
3060
|
+
async popularBrands(options = {}) {
|
|
3061
|
+
const response = await this.client.request(
|
|
3062
|
+
"/v1/vinted/mobile/popular-brands",
|
|
3063
|
+
{
|
|
3064
|
+
method: "POST",
|
|
3065
|
+
body: {
|
|
3066
|
+
market: options.market ?? "fr",
|
|
3067
|
+
parameters: options.letter ? { letter: options.letter } : {}
|
|
3068
|
+
}
|
|
3069
|
+
}
|
|
3070
|
+
);
|
|
3071
|
+
return { brands: response.data?.brands ?? [], pagination: null };
|
|
3072
|
+
}
|
|
3037
3073
|
/**
|
|
3038
3074
|
* Get available colors for a market.
|
|
3039
3075
|
*
|
|
@@ -6177,13 +6213,20 @@ var SearchClient8 = class {
|
|
|
6177
6213
|
/**
|
|
6178
6214
|
* Search completed / sold listings — eBay's sold-price history.
|
|
6179
6215
|
*
|
|
6180
|
-
*
|
|
6216
|
+
* Pass `query`, `seller` or both. `seller` alone pages through everything
|
|
6217
|
+
* that seller sold, e.g. `completed({ seller: "musicmagpie", domain: "co.uk" })`.
|
|
6218
|
+
*
|
|
6219
|
+
* @param params - Search parameters including query, seller, filters, and pagination.
|
|
6181
6220
|
* @returns Search results (with `sold: true`), facets, and pagination.
|
|
6182
6221
|
*/
|
|
6183
6222
|
async completed(params) {
|
|
6223
|
+
if (!params.query && !params.seller) {
|
|
6224
|
+
throw new Error("Pass query, seller, or both.");
|
|
6225
|
+
}
|
|
6184
6226
|
return this.client.request("/v1/ebay/completed", {
|
|
6185
6227
|
params: {
|
|
6186
6228
|
query: params.query,
|
|
6229
|
+
seller: params.seller,
|
|
6187
6230
|
domain: params.domain,
|
|
6188
6231
|
category_id: params.category_id,
|
|
6189
6232
|
page: params.page,
|