scrapebadger 0.63.0 → 0.64.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.
- package/dist/index.d.cts +60 -128
- package/dist/index.d.ts +60 -128
- package/dist/index.js +70 -129
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +70 -129
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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.1";
|
|
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
|
*
|
|
@@ -4555,17 +4591,11 @@ var UsersClient4 = class {
|
|
|
4555
4591
|
async get(username) {
|
|
4556
4592
|
return this.client.request(`/v1/instagram/users/${username}`);
|
|
4557
4593
|
}
|
|
4558
|
-
/**
|
|
4559
|
-
* Get "About this account" metadata for a user.
|
|
4560
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4561
|
-
*/
|
|
4594
|
+
/** Get "About this account" metadata for a user. */
|
|
4562
4595
|
async about(username) {
|
|
4563
4596
|
return this.client.request(`/v1/instagram/users/${username}/about`);
|
|
4564
4597
|
}
|
|
4565
|
-
/**
|
|
4566
|
-
* Get accounts related/suggested for a user.
|
|
4567
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4568
|
-
*/
|
|
4598
|
+
/** Get accounts related/suggested for a user. */
|
|
4569
4599
|
async related(username) {
|
|
4570
4600
|
return this.client.request(`/v1/instagram/users/${username}/related`);
|
|
4571
4601
|
}
|
|
@@ -4574,36 +4604,25 @@ var UsersClient4 = class {
|
|
|
4574
4604
|
return this.media(`/v1/instagram/users/${username}/posts`, options);
|
|
4575
4605
|
}
|
|
4576
4606
|
/**
|
|
4577
|
-
* Get a user's video posts
|
|
4578
|
-
*
|
|
4607
|
+
* Get a user's video posts from their feed. A page may hold slightly more than
|
|
4608
|
+
* `amount` items; pass `next_cursor` back as `cursor` to continue the feed.
|
|
4579
4609
|
*/
|
|
4580
4610
|
async videos(username, options = {}) {
|
|
4581
4611
|
return this.media(`/v1/instagram/users/${username}/videos`, options);
|
|
4582
4612
|
}
|
|
4583
|
-
/**
|
|
4584
|
-
* Get a user's reels.
|
|
4585
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4586
|
-
*/
|
|
4613
|
+
/** Get a user's reels. */
|
|
4587
4614
|
async reels(username, options = {}) {
|
|
4588
4615
|
return this.media(`/v1/instagram/users/${username}/reels`, options);
|
|
4589
4616
|
}
|
|
4590
|
-
/**
|
|
4591
|
-
* Get media a user is tagged in.
|
|
4592
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4593
|
-
*/
|
|
4617
|
+
/** Get media a user is tagged in. */
|
|
4594
4618
|
async tagged(username, options = {}) {
|
|
4595
4619
|
return this.media(`/v1/instagram/users/${username}/tagged`, options);
|
|
4596
4620
|
}
|
|
4597
|
-
/**
|
|
4598
|
-
* Get a user's pinned posts.
|
|
4599
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4600
|
-
*/
|
|
4621
|
+
/** Get a user's pinned posts. */
|
|
4601
4622
|
async pinned(username) {
|
|
4602
4623
|
return this.client.request(`/v1/instagram/users/${username}/pinned`);
|
|
4603
4624
|
}
|
|
4604
4625
|
/**
|
|
4605
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4606
|
-
*
|
|
4607
4626
|
* Get a user's followers.
|
|
4608
4627
|
*
|
|
4609
4628
|
* @param username - Instagram username.
|
|
@@ -4620,19 +4639,13 @@ var UsersClient4 = class {
|
|
|
4620
4639
|
}
|
|
4621
4640
|
});
|
|
4622
4641
|
}
|
|
4623
|
-
/**
|
|
4624
|
-
* Get the accounts a user follows.
|
|
4625
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4626
|
-
*/
|
|
4642
|
+
/** Get the accounts a user follows. */
|
|
4627
4643
|
async following(username, options = {}) {
|
|
4628
4644
|
return this.client.request(`/v1/instagram/users/${username}/following`, {
|
|
4629
4645
|
params: { amount: options.amount, cursor: options.cursor }
|
|
4630
4646
|
});
|
|
4631
4647
|
}
|
|
4632
|
-
/**
|
|
4633
|
-
* Search within a user's followers by name/username.
|
|
4634
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4635
|
-
*/
|
|
4648
|
+
/** Search within a user's followers by name/username. */
|
|
4636
4649
|
async searchFollowers(username, query, options = {}) {
|
|
4637
4650
|
return this.client.request(
|
|
4638
4651
|
`/v1/instagram/users/${username}/followers/search`,
|
|
@@ -4641,17 +4654,11 @@ var UsersClient4 = class {
|
|
|
4641
4654
|
}
|
|
4642
4655
|
);
|
|
4643
4656
|
}
|
|
4644
|
-
/**
|
|
4645
|
-
* Get a user's currently-live stories.
|
|
4646
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4647
|
-
*/
|
|
4657
|
+
/** Get a user's currently-live stories. */
|
|
4648
4658
|
async stories(username) {
|
|
4649
4659
|
return this.client.request(`/v1/instagram/users/${username}/stories`);
|
|
4650
4660
|
}
|
|
4651
|
-
/**
|
|
4652
|
-
* Get a user's story highlights.
|
|
4653
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4654
|
-
*/
|
|
4661
|
+
/** Get a user's story highlights. */
|
|
4655
4662
|
async highlights(username) {
|
|
4656
4663
|
return this.client.request(`/v1/instagram/users/${username}/highlights`);
|
|
4657
4664
|
}
|
|
@@ -4676,10 +4683,7 @@ var MediaClient = class {
|
|
|
4676
4683
|
async get(code) {
|
|
4677
4684
|
return this.client.request(`/v1/instagram/media/${code}`);
|
|
4678
4685
|
}
|
|
4679
|
-
/**
|
|
4680
|
-
* Get oEmbed metadata for a media permalink.
|
|
4681
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4682
|
-
*/
|
|
4686
|
+
/** Get oEmbed metadata for a media permalink. */
|
|
4683
4687
|
async oembed(code) {
|
|
4684
4688
|
return this.client.request(`/v1/instagram/media/${code}/oembed`);
|
|
4685
4689
|
}
|
|
@@ -4689,27 +4693,18 @@ var MediaClient = class {
|
|
|
4689
4693
|
params: { amount: options.amount, cursor: options.cursor }
|
|
4690
4694
|
});
|
|
4691
4695
|
}
|
|
4692
|
-
/**
|
|
4693
|
-
* Get the users who liked a media.
|
|
4694
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4695
|
-
*/
|
|
4696
|
+
/** Get the users who liked a media. */
|
|
4696
4697
|
async likers(code) {
|
|
4697
4698
|
return this.client.request(`/v1/instagram/media/${code}/likers`);
|
|
4698
4699
|
}
|
|
4699
|
-
/**
|
|
4700
|
-
* Get replies to a comment.
|
|
4701
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4702
|
-
*/
|
|
4700
|
+
/** Get replies to a comment. */
|
|
4703
4701
|
async replies(code, commentId, options = {}) {
|
|
4704
4702
|
return this.client.request(
|
|
4705
4703
|
`/v1/instagram/media/${code}/comments/${commentId}/replies`,
|
|
4706
4704
|
{ params: { amount: options.amount, cursor: options.cursor } }
|
|
4707
4705
|
);
|
|
4708
4706
|
}
|
|
4709
|
-
/**
|
|
4710
|
-
* Get the users who liked a comment.
|
|
4711
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4712
|
-
*/
|
|
4707
|
+
/** Get the users who liked a comment. */
|
|
4713
4708
|
async commentLikers(code, commentId) {
|
|
4714
4709
|
return this.client.request(
|
|
4715
4710
|
`/v1/instagram/media/${code}/comments/${commentId}/likers`
|
|
@@ -4723,64 +4718,43 @@ var SearchClient4 = class {
|
|
|
4723
4718
|
constructor(client) {
|
|
4724
4719
|
this.client = client;
|
|
4725
4720
|
}
|
|
4726
|
-
/**
|
|
4727
|
-
* Search accounts by name/username.
|
|
4728
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4729
|
-
*/
|
|
4721
|
+
/** Search accounts by name/username. */
|
|
4730
4722
|
async users(query) {
|
|
4731
4723
|
return this.client.request("/v1/instagram/search/users", {
|
|
4732
4724
|
params: { query }
|
|
4733
4725
|
});
|
|
4734
4726
|
}
|
|
4735
|
-
/**
|
|
4736
|
-
* Search hashtags.
|
|
4737
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4738
|
-
*/
|
|
4727
|
+
/** Search hashtags. */
|
|
4739
4728
|
async hashtags(query) {
|
|
4740
4729
|
return this.client.request("/v1/instagram/search/hashtags", {
|
|
4741
4730
|
params: { query }
|
|
4742
4731
|
});
|
|
4743
4732
|
}
|
|
4744
|
-
/**
|
|
4745
|
-
* Search places/locations.
|
|
4746
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4747
|
-
*/
|
|
4733
|
+
/** Search places/locations (global ranking). */
|
|
4748
4734
|
async places(query) {
|
|
4749
4735
|
return this.client.request("/v1/instagram/search/places", {
|
|
4750
4736
|
params: { query }
|
|
4751
4737
|
});
|
|
4752
4738
|
}
|
|
4753
|
-
/**
|
|
4754
|
-
* Search reels.
|
|
4755
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4756
|
-
*/
|
|
4739
|
+
/** Search reels. */
|
|
4757
4740
|
async reels(query) {
|
|
4758
4741
|
return this.client.request("/v1/instagram/search/reels", {
|
|
4759
4742
|
params: { query }
|
|
4760
4743
|
});
|
|
4761
4744
|
}
|
|
4762
|
-
/**
|
|
4763
|
-
* Search music/audio tracks.
|
|
4764
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4765
|
-
*/
|
|
4745
|
+
/** Search music/audio tracks. */
|
|
4766
4746
|
async music(query) {
|
|
4767
4747
|
return this.client.request("/v1/instagram/search/music", {
|
|
4768
4748
|
params: { query }
|
|
4769
4749
|
});
|
|
4770
4750
|
}
|
|
4771
|
-
/**
|
|
4772
|
-
* Get blended "top" results (users, hashtags, and places).
|
|
4773
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4774
|
-
*/
|
|
4751
|
+
/** Get blended "top" results (users, hashtags, and places). */
|
|
4775
4752
|
async top(query) {
|
|
4776
4753
|
return this.client.request("/v1/instagram/search/top", {
|
|
4777
4754
|
params: { query }
|
|
4778
4755
|
});
|
|
4779
4756
|
}
|
|
4780
|
-
/**
|
|
4781
|
-
* Get typeahead/autocomplete suggestions (mixed entity types).
|
|
4782
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4783
|
-
*/
|
|
4757
|
+
/** Get typeahead/autocomplete suggestions (mixed entity types). */
|
|
4784
4758
|
async autocomplete(query) {
|
|
4785
4759
|
return this.client.request("/v1/instagram/search/autocomplete", {
|
|
4786
4760
|
params: { query }
|
|
@@ -4799,31 +4773,19 @@ var HashtagsClient = class {
|
|
|
4799
4773
|
constructor(client) {
|
|
4800
4774
|
this.client = client;
|
|
4801
4775
|
}
|
|
4802
|
-
/**
|
|
4803
|
-
* Get a hashtag's info (media count, cover).
|
|
4804
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4805
|
-
*/
|
|
4776
|
+
/** Get a hashtag's info (media count, cover). */
|
|
4806
4777
|
async get(tag) {
|
|
4807
4778
|
return this.client.request(`/v1/instagram/hashtags/${tag}`);
|
|
4808
4779
|
}
|
|
4809
|
-
/**
|
|
4810
|
-
* Get the top/popular media for a hashtag.
|
|
4811
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4812
|
-
*/
|
|
4780
|
+
/** Get the top/popular media for a hashtag. */
|
|
4813
4781
|
async top(tag, options = {}) {
|
|
4814
4782
|
return mediaFeed(this.client, `/v1/instagram/hashtags/${tag}/top`, options);
|
|
4815
4783
|
}
|
|
4816
|
-
/**
|
|
4817
|
-
* Get the most recent media for a hashtag.
|
|
4818
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4819
|
-
*/
|
|
4784
|
+
/** Get the most recent media for a hashtag. */
|
|
4820
4785
|
async recent(tag, options = {}) {
|
|
4821
4786
|
return mediaFeed(this.client, `/v1/instagram/hashtags/${tag}/recent`, options);
|
|
4822
4787
|
}
|
|
4823
|
-
/**
|
|
4824
|
-
* Get reels for a hashtag.
|
|
4825
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4826
|
-
*/
|
|
4788
|
+
/** Get reels for a hashtag. */
|
|
4827
4789
|
async reels(tag, options = {}) {
|
|
4828
4790
|
return mediaFeed(this.client, `/v1/instagram/hashtags/${tag}/reels`, options);
|
|
4829
4791
|
}
|
|
@@ -4833,31 +4795,19 @@ var LocationsClient = class {
|
|
|
4833
4795
|
constructor(client) {
|
|
4834
4796
|
this.client = client;
|
|
4835
4797
|
}
|
|
4836
|
-
/**
|
|
4837
|
-
* Get a location's info.
|
|
4838
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4839
|
-
*/
|
|
4798
|
+
/** Get a location's info. */
|
|
4840
4799
|
async get(pk) {
|
|
4841
4800
|
return this.client.request(`/v1/instagram/locations/${pk}`);
|
|
4842
4801
|
}
|
|
4843
|
-
/**
|
|
4844
|
-
* Get the top/popular media for a location.
|
|
4845
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4846
|
-
*/
|
|
4802
|
+
/** Get the top/popular media for a location. */
|
|
4847
4803
|
async top(pk, options = {}) {
|
|
4848
4804
|
return mediaFeed(this.client, `/v1/instagram/locations/${pk}/top`, options);
|
|
4849
4805
|
}
|
|
4850
|
-
/**
|
|
4851
|
-
* Get the most recent media for a location.
|
|
4852
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4853
|
-
*/
|
|
4806
|
+
/** Get the most recent media for a location. */
|
|
4854
4807
|
async recent(pk, options = {}) {
|
|
4855
4808
|
return mediaFeed(this.client, `/v1/instagram/locations/${pk}/recent`, options);
|
|
4856
4809
|
}
|
|
4857
|
-
/**
|
|
4858
|
-
* Search locations by name.
|
|
4859
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4860
|
-
*/
|
|
4810
|
+
/** Search locations by name. */
|
|
4861
4811
|
async search(query) {
|
|
4862
4812
|
return this.client.request("/v1/instagram/locations/search", {
|
|
4863
4813
|
params: { query }
|
|
@@ -4869,24 +4819,15 @@ var AudioClient = class {
|
|
|
4869
4819
|
constructor(client) {
|
|
4870
4820
|
this.client = client;
|
|
4871
4821
|
}
|
|
4872
|
-
/**
|
|
4873
|
-
* Get an audio track's info.
|
|
4874
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4875
|
-
*/
|
|
4822
|
+
/** Get an audio track's info. */
|
|
4876
4823
|
async get(audioId) {
|
|
4877
4824
|
return this.client.request(`/v1/instagram/audio/${audioId}`);
|
|
4878
4825
|
}
|
|
4879
|
-
/**
|
|
4880
|
-
* Get media that use an audio track.
|
|
4881
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4882
|
-
*/
|
|
4826
|
+
/** Get media that use an audio track. */
|
|
4883
4827
|
async media(audioId, options = {}) {
|
|
4884
4828
|
return mediaFeed(this.client, `/v1/instagram/audio/${audioId}/media`, options);
|
|
4885
4829
|
}
|
|
4886
|
-
/**
|
|
4887
|
-
* Get currently-trending audio tracks.
|
|
4888
|
-
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4889
|
-
*/
|
|
4830
|
+
/** Get currently-trending audio tracks. */
|
|
4890
4831
|
async trending() {
|
|
4891
4832
|
return this.client.request("/v1/instagram/audio/trending");
|
|
4892
4833
|
}
|