scrapebadger 0.39.0 → 0.40.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 +45 -15
- package/dist/index.d.ts +45 -15
- package/dist/index.js +34 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1229,14 +1229,21 @@ interface ShoppingClickParams {
|
|
|
1229
1229
|
product_id?: string;
|
|
1230
1230
|
}
|
|
1231
1231
|
/**
|
|
1232
|
-
* Params for `/v1/google/shopping/offers` —
|
|
1233
|
-
* (GTIN-8/UPC-A/EAN-13/GTIN-14
|
|
1234
|
-
*
|
|
1235
|
-
*
|
|
1232
|
+
* Params for `/v1/google/shopping/offers` — multi-seller Google Shopping
|
|
1233
|
+
* offers for a product identified by `barcode` (GTIN-8/UPC-A/EAN-13/GTIN-14,
|
|
1234
|
+
* resolved via Google web search first) OR by its Google Shopping
|
|
1235
|
+
* `catalog_id` (sellers read straight off Google's product page). Exactly
|
|
1236
|
+
* one of the two is required (400 otherwise); 422 for an invalid/
|
|
1237
|
+
* checksum-failing barcode, 404 when nothing resolves.
|
|
1236
1238
|
*/
|
|
1237
1239
|
interface ShoppingOffersParams {
|
|
1238
1240
|
/** Product barcode: a GTIN-8, UPC-A, EAN-13, or GTIN-14. */
|
|
1239
|
-
barcode
|
|
1241
|
+
barcode?: string;
|
|
1242
|
+
/**
|
|
1243
|
+
* Google Shopping `catalogid` — the `catalog_id` on `shopping.search`
|
|
1244
|
+
* tiles, or `prds=catalogid:…` in a Google Shopping URL.
|
|
1245
|
+
*/
|
|
1246
|
+
catalog_id?: string;
|
|
1240
1247
|
/** ISO-3166 alpha-2 country code (e.g. `us`). */
|
|
1241
1248
|
gl?: string;
|
|
1242
1249
|
/** UI/results language (e.g. `en`). Defaults to `en`. */
|
|
@@ -2015,9 +2022,11 @@ declare class ShoppingClient {
|
|
|
2015
2022
|
*/
|
|
2016
2023
|
click(params: ShoppingClickParams): Promise<GoogleResponse>;
|
|
2017
2024
|
/**
|
|
2018
|
-
*
|
|
2019
|
-
*
|
|
2020
|
-
*
|
|
2025
|
+
* Multi-seller Google Shopping offers for a product, by `barcode`
|
|
2026
|
+
* (GTIN-8/UPC-A/EAN-13/GTIN-14, resolved via Google web search first) or
|
|
2027
|
+
* by Google Shopping `catalog_id` (sellers read off Google's product page).
|
|
2028
|
+
* Throws on 400 (not exactly one identifier), 422 (invalid barcode) or 404
|
|
2029
|
+
* (nothing resolves).
|
|
2021
2030
|
*/
|
|
2022
2031
|
offers(params: ShoppingOffersParams): Promise<GoogleResponse>;
|
|
2023
2032
|
}
|
|
@@ -4134,7 +4143,10 @@ declare class UsersClient$1 {
|
|
|
4134
4143
|
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4135
4144
|
*/
|
|
4136
4145
|
about(username: string): Promise<UserAbout>;
|
|
4137
|
-
/**
|
|
4146
|
+
/**
|
|
4147
|
+
* Get accounts related/suggested for a user.
|
|
4148
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4149
|
+
*/
|
|
4138
4150
|
related(username: string): Promise<Paginated<UserShort>>;
|
|
4139
4151
|
/** Get a user's timeline posts. */
|
|
4140
4152
|
posts(username: string, options?: {
|
|
@@ -4246,7 +4258,10 @@ declare class MediaClient$3 {
|
|
|
4246
4258
|
* @param code - The media shortcode (from the `/p/<code>/` URL).
|
|
4247
4259
|
*/
|
|
4248
4260
|
get(code: string): Promise<Media>;
|
|
4249
|
-
/**
|
|
4261
|
+
/**
|
|
4262
|
+
* Get oEmbed metadata for a media permalink.
|
|
4263
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4264
|
+
*/
|
|
4250
4265
|
oembed(code: string): Promise<Oembed>;
|
|
4251
4266
|
/** Get top-level comments on a media. */
|
|
4252
4267
|
comments(code: string, options?: {
|
|
@@ -4266,7 +4281,10 @@ declare class MediaClient$3 {
|
|
|
4266
4281
|
amount?: number;
|
|
4267
4282
|
cursor?: string;
|
|
4268
4283
|
}): Promise<Paginated<Comment$1>>;
|
|
4269
|
-
/**
|
|
4284
|
+
/**
|
|
4285
|
+
* Get the users who liked a comment.
|
|
4286
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4287
|
+
*/
|
|
4270
4288
|
commentLikers(code: string, commentId: string): Promise<Paginated<UserShort>>;
|
|
4271
4289
|
}
|
|
4272
4290
|
|
|
@@ -4300,7 +4318,10 @@ declare class SearchClient$e {
|
|
|
4300
4318
|
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4301
4319
|
*/
|
|
4302
4320
|
users(query: string): Promise<Paginated<UserShort>>;
|
|
4303
|
-
/**
|
|
4321
|
+
/**
|
|
4322
|
+
* Search hashtags.
|
|
4323
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4324
|
+
*/
|
|
4304
4325
|
hashtags(query: string): Promise<Paginated<Hashtag>>;
|
|
4305
4326
|
/**
|
|
4306
4327
|
* Search places/locations.
|
|
@@ -4317,7 +4338,10 @@ declare class SearchClient$e {
|
|
|
4317
4338
|
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4318
4339
|
*/
|
|
4319
4340
|
music(query: string): Promise<Paginated<Audio>>;
|
|
4320
|
-
/**
|
|
4341
|
+
/**
|
|
4342
|
+
* Get blended "top" results (users, hashtags, and places).
|
|
4343
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4344
|
+
*/
|
|
4321
4345
|
top(query: string): Promise<SearchTopResponse>;
|
|
4322
4346
|
/**
|
|
4323
4347
|
* Get typeahead/autocomplete suggestions (mixed entity types).
|
|
@@ -4337,7 +4361,10 @@ declare class SearchClient$e {
|
|
|
4337
4361
|
declare class HashtagsClient$1 {
|
|
4338
4362
|
private readonly client;
|
|
4339
4363
|
constructor(client: BaseClient);
|
|
4340
|
-
/**
|
|
4364
|
+
/**
|
|
4365
|
+
* Get a hashtag's info (media count, cover).
|
|
4366
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4367
|
+
*/
|
|
4341
4368
|
get(tag: string): Promise<Hashtag>;
|
|
4342
4369
|
/**
|
|
4343
4370
|
* Get the top/popular media for a hashtag.
|
|
@@ -4347,7 +4374,10 @@ declare class HashtagsClient$1 {
|
|
|
4347
4374
|
amount?: number;
|
|
4348
4375
|
cursor?: string;
|
|
4349
4376
|
}): Promise<Paginated<Media>>;
|
|
4350
|
-
/**
|
|
4377
|
+
/**
|
|
4378
|
+
* Get the most recent media for a hashtag.
|
|
4379
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4380
|
+
*/
|
|
4351
4381
|
recent(tag: string, options?: {
|
|
4352
4382
|
amount?: number;
|
|
4353
4383
|
cursor?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1229,14 +1229,21 @@ interface ShoppingClickParams {
|
|
|
1229
1229
|
product_id?: string;
|
|
1230
1230
|
}
|
|
1231
1231
|
/**
|
|
1232
|
-
* Params for `/v1/google/shopping/offers` —
|
|
1233
|
-
* (GTIN-8/UPC-A/EAN-13/GTIN-14
|
|
1234
|
-
*
|
|
1235
|
-
*
|
|
1232
|
+
* Params for `/v1/google/shopping/offers` — multi-seller Google Shopping
|
|
1233
|
+
* offers for a product identified by `barcode` (GTIN-8/UPC-A/EAN-13/GTIN-14,
|
|
1234
|
+
* resolved via Google web search first) OR by its Google Shopping
|
|
1235
|
+
* `catalog_id` (sellers read straight off Google's product page). Exactly
|
|
1236
|
+
* one of the two is required (400 otherwise); 422 for an invalid/
|
|
1237
|
+
* checksum-failing barcode, 404 when nothing resolves.
|
|
1236
1238
|
*/
|
|
1237
1239
|
interface ShoppingOffersParams {
|
|
1238
1240
|
/** Product barcode: a GTIN-8, UPC-A, EAN-13, or GTIN-14. */
|
|
1239
|
-
barcode
|
|
1241
|
+
barcode?: string;
|
|
1242
|
+
/**
|
|
1243
|
+
* Google Shopping `catalogid` — the `catalog_id` on `shopping.search`
|
|
1244
|
+
* tiles, or `prds=catalogid:…` in a Google Shopping URL.
|
|
1245
|
+
*/
|
|
1246
|
+
catalog_id?: string;
|
|
1240
1247
|
/** ISO-3166 alpha-2 country code (e.g. `us`). */
|
|
1241
1248
|
gl?: string;
|
|
1242
1249
|
/** UI/results language (e.g. `en`). Defaults to `en`. */
|
|
@@ -2015,9 +2022,11 @@ declare class ShoppingClient {
|
|
|
2015
2022
|
*/
|
|
2016
2023
|
click(params: ShoppingClickParams): Promise<GoogleResponse>;
|
|
2017
2024
|
/**
|
|
2018
|
-
*
|
|
2019
|
-
*
|
|
2020
|
-
*
|
|
2025
|
+
* Multi-seller Google Shopping offers for a product, by `barcode`
|
|
2026
|
+
* (GTIN-8/UPC-A/EAN-13/GTIN-14, resolved via Google web search first) or
|
|
2027
|
+
* by Google Shopping `catalog_id` (sellers read off Google's product page).
|
|
2028
|
+
* Throws on 400 (not exactly one identifier), 422 (invalid barcode) or 404
|
|
2029
|
+
* (nothing resolves).
|
|
2021
2030
|
*/
|
|
2022
2031
|
offers(params: ShoppingOffersParams): Promise<GoogleResponse>;
|
|
2023
2032
|
}
|
|
@@ -4134,7 +4143,10 @@ declare class UsersClient$1 {
|
|
|
4134
4143
|
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4135
4144
|
*/
|
|
4136
4145
|
about(username: string): Promise<UserAbout>;
|
|
4137
|
-
/**
|
|
4146
|
+
/**
|
|
4147
|
+
* Get accounts related/suggested for a user.
|
|
4148
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4149
|
+
*/
|
|
4138
4150
|
related(username: string): Promise<Paginated<UserShort>>;
|
|
4139
4151
|
/** Get a user's timeline posts. */
|
|
4140
4152
|
posts(username: string, options?: {
|
|
@@ -4246,7 +4258,10 @@ declare class MediaClient$3 {
|
|
|
4246
4258
|
* @param code - The media shortcode (from the `/p/<code>/` URL).
|
|
4247
4259
|
*/
|
|
4248
4260
|
get(code: string): Promise<Media>;
|
|
4249
|
-
/**
|
|
4261
|
+
/**
|
|
4262
|
+
* Get oEmbed metadata for a media permalink.
|
|
4263
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4264
|
+
*/
|
|
4250
4265
|
oembed(code: string): Promise<Oembed>;
|
|
4251
4266
|
/** Get top-level comments on a media. */
|
|
4252
4267
|
comments(code: string, options?: {
|
|
@@ -4266,7 +4281,10 @@ declare class MediaClient$3 {
|
|
|
4266
4281
|
amount?: number;
|
|
4267
4282
|
cursor?: string;
|
|
4268
4283
|
}): Promise<Paginated<Comment$1>>;
|
|
4269
|
-
/**
|
|
4284
|
+
/**
|
|
4285
|
+
* Get the users who liked a comment.
|
|
4286
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4287
|
+
*/
|
|
4270
4288
|
commentLikers(code: string, commentId: string): Promise<Paginated<UserShort>>;
|
|
4271
4289
|
}
|
|
4272
4290
|
|
|
@@ -4300,7 +4318,10 @@ declare class SearchClient$e {
|
|
|
4300
4318
|
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4301
4319
|
*/
|
|
4302
4320
|
users(query: string): Promise<Paginated<UserShort>>;
|
|
4303
|
-
/**
|
|
4321
|
+
/**
|
|
4322
|
+
* Search hashtags.
|
|
4323
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4324
|
+
*/
|
|
4304
4325
|
hashtags(query: string): Promise<Paginated<Hashtag>>;
|
|
4305
4326
|
/**
|
|
4306
4327
|
* Search places/locations.
|
|
@@ -4317,7 +4338,10 @@ declare class SearchClient$e {
|
|
|
4317
4338
|
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4318
4339
|
*/
|
|
4319
4340
|
music(query: string): Promise<Paginated<Audio>>;
|
|
4320
|
-
/**
|
|
4341
|
+
/**
|
|
4342
|
+
* Get blended "top" results (users, hashtags, and places).
|
|
4343
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4344
|
+
*/
|
|
4321
4345
|
top(query: string): Promise<SearchTopResponse>;
|
|
4322
4346
|
/**
|
|
4323
4347
|
* Get typeahead/autocomplete suggestions (mixed entity types).
|
|
@@ -4337,7 +4361,10 @@ declare class SearchClient$e {
|
|
|
4337
4361
|
declare class HashtagsClient$1 {
|
|
4338
4362
|
private readonly client;
|
|
4339
4363
|
constructor(client: BaseClient);
|
|
4340
|
-
/**
|
|
4364
|
+
/**
|
|
4365
|
+
* Get a hashtag's info (media count, cover).
|
|
4366
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4367
|
+
*/
|
|
4341
4368
|
get(tag: string): Promise<Hashtag>;
|
|
4342
4369
|
/**
|
|
4343
4370
|
* Get the top/popular media for a hashtag.
|
|
@@ -4347,7 +4374,10 @@ declare class HashtagsClient$1 {
|
|
|
4347
4374
|
amount?: number;
|
|
4348
4375
|
cursor?: string;
|
|
4349
4376
|
}): Promise<Paginated<Media>>;
|
|
4350
|
-
/**
|
|
4377
|
+
/**
|
|
4378
|
+
* Get the most recent media for a hashtag.
|
|
4379
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4380
|
+
*/
|
|
4351
4381
|
recent(tag: string, options?: {
|
|
4352
4382
|
amount?: number;
|
|
4353
4383
|
cursor?: string;
|
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.40.1";
|
|
13
13
|
|
|
14
14
|
// src/internal/exceptions.ts
|
|
15
15
|
var ScrapeBadgerError = class _ScrapeBadgerError extends Error {
|
|
@@ -3336,9 +3336,11 @@ var ShoppingClient = class {
|
|
|
3336
3336
|
});
|
|
3337
3337
|
}
|
|
3338
3338
|
/**
|
|
3339
|
-
*
|
|
3340
|
-
*
|
|
3341
|
-
*
|
|
3339
|
+
* Multi-seller Google Shopping offers for a product, by `barcode`
|
|
3340
|
+
* (GTIN-8/UPC-A/EAN-13/GTIN-14, resolved via Google web search first) or
|
|
3341
|
+
* by Google Shopping `catalog_id` (sellers read off Google's product page).
|
|
3342
|
+
* Throws on 400 (not exactly one identifier), 422 (invalid barcode) or 404
|
|
3343
|
+
* (nothing resolves).
|
|
3342
3344
|
*/
|
|
3343
3345
|
async offers(params) {
|
|
3344
3346
|
return this.client.request("/v1/google/shopping/offers", {
|
|
@@ -4300,7 +4302,10 @@ var UsersClient4 = class {
|
|
|
4300
4302
|
async about(username) {
|
|
4301
4303
|
return this.client.request(`/v1/instagram/users/${username}/about`);
|
|
4302
4304
|
}
|
|
4303
|
-
/**
|
|
4305
|
+
/**
|
|
4306
|
+
* Get accounts related/suggested for a user.
|
|
4307
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4308
|
+
*/
|
|
4304
4309
|
async related(username) {
|
|
4305
4310
|
return this.client.request(`/v1/instagram/users/${username}/related`);
|
|
4306
4311
|
}
|
|
@@ -4411,7 +4416,10 @@ var MediaClient = class {
|
|
|
4411
4416
|
async get(code) {
|
|
4412
4417
|
return this.client.request(`/v1/instagram/media/${code}`);
|
|
4413
4418
|
}
|
|
4414
|
-
/**
|
|
4419
|
+
/**
|
|
4420
|
+
* Get oEmbed metadata for a media permalink.
|
|
4421
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4422
|
+
*/
|
|
4415
4423
|
async oembed(code) {
|
|
4416
4424
|
return this.client.request(`/v1/instagram/media/${code}/oembed`);
|
|
4417
4425
|
}
|
|
@@ -4438,7 +4446,10 @@ var MediaClient = class {
|
|
|
4438
4446
|
{ params: { amount: options.amount, cursor: options.cursor } }
|
|
4439
4447
|
);
|
|
4440
4448
|
}
|
|
4441
|
-
/**
|
|
4449
|
+
/**
|
|
4450
|
+
* Get the users who liked a comment.
|
|
4451
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4452
|
+
*/
|
|
4442
4453
|
async commentLikers(code, commentId) {
|
|
4443
4454
|
return this.client.request(
|
|
4444
4455
|
`/v1/instagram/media/${code}/comments/${commentId}/likers`
|
|
@@ -4461,7 +4472,10 @@ var SearchClient4 = class {
|
|
|
4461
4472
|
params: { query }
|
|
4462
4473
|
});
|
|
4463
4474
|
}
|
|
4464
|
-
/**
|
|
4475
|
+
/**
|
|
4476
|
+
* Search hashtags.
|
|
4477
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4478
|
+
*/
|
|
4465
4479
|
async hashtags(query) {
|
|
4466
4480
|
return this.client.request("/v1/instagram/search/hashtags", {
|
|
4467
4481
|
params: { query }
|
|
@@ -4494,7 +4508,10 @@ var SearchClient4 = class {
|
|
|
4494
4508
|
params: { query }
|
|
4495
4509
|
});
|
|
4496
4510
|
}
|
|
4497
|
-
/**
|
|
4511
|
+
/**
|
|
4512
|
+
* Get blended "top" results (users, hashtags, and places).
|
|
4513
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4514
|
+
*/
|
|
4498
4515
|
async top(query) {
|
|
4499
4516
|
return this.client.request("/v1/instagram/search/top", {
|
|
4500
4517
|
params: { query }
|
|
@@ -4522,7 +4539,10 @@ var HashtagsClient = class {
|
|
|
4522
4539
|
constructor(client) {
|
|
4523
4540
|
this.client = client;
|
|
4524
4541
|
}
|
|
4525
|
-
/**
|
|
4542
|
+
/**
|
|
4543
|
+
* Get a hashtag's info (media count, cover).
|
|
4544
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4545
|
+
*/
|
|
4526
4546
|
async get(tag) {
|
|
4527
4547
|
return this.client.request(`/v1/instagram/hashtags/${tag}`);
|
|
4528
4548
|
}
|
|
@@ -4533,7 +4553,10 @@ var HashtagsClient = class {
|
|
|
4533
4553
|
async top(tag, options = {}) {
|
|
4534
4554
|
return mediaFeed(this.client, `/v1/instagram/hashtags/${tag}/top`, options);
|
|
4535
4555
|
}
|
|
4536
|
-
/**
|
|
4556
|
+
/**
|
|
4557
|
+
* Get the most recent media for a hashtag.
|
|
4558
|
+
* @deprecated Temporarily unavailable — authenticated data is temporarily offline.
|
|
4559
|
+
*/
|
|
4537
4560
|
async recent(tag, options = {}) {
|
|
4538
4561
|
return mediaFeed(this.client, `/v1/instagram/hashtags/${tag}/recent`, options);
|
|
4539
4562
|
}
|