scrapebadger 0.63.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 +27 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +37 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +37 -1
- 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
|
*
|
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
|
*
|
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
|
*
|