@getanyapi/sdk 0.10.0 → 0.11.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.cjs +100 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +400 -70
- package/dist/index.d.ts +400 -70
- package/dist/index.js +100 -30
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -85,7 +85,6 @@ __export(index_exports, {
|
|
|
85
85
|
WalmartNamespace: () => WalmartNamespace,
|
|
86
86
|
WebNamespace: () => WebNamespace,
|
|
87
87
|
WeiboNamespace: () => WeiboNamespace,
|
|
88
|
-
WhatsappNamespace: () => WhatsappNamespace,
|
|
89
88
|
YahooFinanceNamespace: () => YahooFinanceNamespace,
|
|
90
89
|
YelpNamespace: () => YelpNamespace,
|
|
91
90
|
YoutubeNamespace: () => YoutubeNamespace,
|
|
@@ -3498,6 +3497,19 @@ var RedditNamespace = class {
|
|
|
3498
3497
|
this._core = _core;
|
|
3499
3498
|
}
|
|
3500
3499
|
_core;
|
|
3500
|
+
/**
|
|
3501
|
+
* Reddit Post
|
|
3502
|
+
*
|
|
3503
|
+
* Fetch a single Reddit post by URL, including its full body text, score, comment count, upvote ratio, and subreddit, as normalized JSON.
|
|
3504
|
+
*
|
|
3505
|
+
* Price: $0.001 per request.
|
|
3506
|
+
*
|
|
3507
|
+
* @example
|
|
3508
|
+
* const res = await client.reddit.post({ url: "https://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_united_states/" });
|
|
3509
|
+
*/
|
|
3510
|
+
post(input, options) {
|
|
3511
|
+
return this._core.run("reddit.post", input, options);
|
|
3512
|
+
}
|
|
3501
3513
|
/**
|
|
3502
3514
|
* Reddit Post Comments
|
|
3503
3515
|
*
|
|
@@ -3511,6 +3523,22 @@ var RedditNamespace = class {
|
|
|
3511
3523
|
postComments(input, options) {
|
|
3512
3524
|
return this._core.run("reddit.post_comments", input, options);
|
|
3513
3525
|
}
|
|
3526
|
+
/**
|
|
3527
|
+
* Iterate every result of Reddit Post Comments across pages.
|
|
3528
|
+
*
|
|
3529
|
+
* Yields items directly; call `.pages()` on the return value to walk whole
|
|
3530
|
+
* result pages instead (each carries its own costUsd).
|
|
3531
|
+
*/
|
|
3532
|
+
iterPostComments(input, options) {
|
|
3533
|
+
return paginate(
|
|
3534
|
+
this._core,
|
|
3535
|
+
"reddit.post_comments",
|
|
3536
|
+
input,
|
|
3537
|
+
"comments",
|
|
3538
|
+
false,
|
|
3539
|
+
options
|
|
3540
|
+
);
|
|
3541
|
+
}
|
|
3514
3542
|
/**
|
|
3515
3543
|
* Reddit Post Transcript
|
|
3516
3544
|
*
|
|
@@ -3524,6 +3552,19 @@ var RedditNamespace = class {
|
|
|
3524
3552
|
postTranscript(input, options) {
|
|
3525
3553
|
return this._core.run("reddit.post_transcript", input, options);
|
|
3526
3554
|
}
|
|
3555
|
+
/**
|
|
3556
|
+
* Reddit Profile
|
|
3557
|
+
*
|
|
3558
|
+
* Fetch a Reddit user's public profile (karma split, post and comment counts, bio, avatar, account age) by username.
|
|
3559
|
+
*
|
|
3560
|
+
* Price: $0.001 per request.
|
|
3561
|
+
*
|
|
3562
|
+
* @example
|
|
3563
|
+
* const res = await client.reddit.profile({ username: "spez" });
|
|
3564
|
+
*/
|
|
3565
|
+
profile(input, options) {
|
|
3566
|
+
return this._core.run("reddit.profile", input, options);
|
|
3567
|
+
}
|
|
3527
3568
|
/**
|
|
3528
3569
|
* Reddit Search
|
|
3529
3570
|
*
|
|
@@ -3608,6 +3649,64 @@ var RedditNamespace = class {
|
|
|
3608
3649
|
options
|
|
3609
3650
|
);
|
|
3610
3651
|
}
|
|
3652
|
+
/**
|
|
3653
|
+
* Reddit User Comments
|
|
3654
|
+
*
|
|
3655
|
+
* List a Reddit user's comments by username, sorted by new, top, hot, or controversial, with the parent post title and subreddit on every item and cursor pagination. Comment text comes back as a roughly 300-character preview rather than the full body, and this endpoint carries no per-comment permalink; use reddit.post_comments for full comment bodies and comment URLs on a given post.
|
|
3656
|
+
*
|
|
3657
|
+
* Price: $0.001 per request.
|
|
3658
|
+
*
|
|
3659
|
+
* @example
|
|
3660
|
+
* const res = await client.reddit.userComments({ username: "spez" });
|
|
3661
|
+
*/
|
|
3662
|
+
userComments(input, options) {
|
|
3663
|
+
return this._core.run("reddit.user_comments", input, options);
|
|
3664
|
+
}
|
|
3665
|
+
/**
|
|
3666
|
+
* Iterate every result of Reddit User Comments across pages.
|
|
3667
|
+
*
|
|
3668
|
+
* Yields items directly; call `.pages()` on the return value to walk whole
|
|
3669
|
+
* result pages instead (each carries its own costUsd).
|
|
3670
|
+
*/
|
|
3671
|
+
iterUserComments(input, options) {
|
|
3672
|
+
return paginate(
|
|
3673
|
+
this._core,
|
|
3674
|
+
"reddit.user_comments",
|
|
3675
|
+
input,
|
|
3676
|
+
"comments",
|
|
3677
|
+
false,
|
|
3678
|
+
options
|
|
3679
|
+
);
|
|
3680
|
+
}
|
|
3681
|
+
/**
|
|
3682
|
+
* Reddit User Posts
|
|
3683
|
+
*
|
|
3684
|
+
* List a Reddit user's posts by username, sorted by new, top, hot, or controversial, with cursor pagination.
|
|
3685
|
+
*
|
|
3686
|
+
* Price: $0.001 per request.
|
|
3687
|
+
*
|
|
3688
|
+
* @example
|
|
3689
|
+
* const res = await client.reddit.userPosts({ username: "spez" });
|
|
3690
|
+
*/
|
|
3691
|
+
userPosts(input, options) {
|
|
3692
|
+
return this._core.run("reddit.user_posts", input, options);
|
|
3693
|
+
}
|
|
3694
|
+
/**
|
|
3695
|
+
* Iterate every result of Reddit User Posts across pages.
|
|
3696
|
+
*
|
|
3697
|
+
* Yields items directly; call `.pages()` on the return value to walk whole
|
|
3698
|
+
* result pages instead (each carries its own costUsd).
|
|
3699
|
+
*/
|
|
3700
|
+
iterUserPosts(input, options) {
|
|
3701
|
+
return paginate(
|
|
3702
|
+
this._core,
|
|
3703
|
+
"reddit.user_posts",
|
|
3704
|
+
input,
|
|
3705
|
+
"posts",
|
|
3706
|
+
false,
|
|
3707
|
+
options
|
|
3708
|
+
);
|
|
3709
|
+
}
|
|
3611
3710
|
};
|
|
3612
3711
|
|
|
3613
3712
|
// src/generated/platforms/redfin.ts
|
|
@@ -5344,27 +5443,6 @@ var WeiboNamespace = class {
|
|
|
5344
5443
|
}
|
|
5345
5444
|
};
|
|
5346
5445
|
|
|
5347
|
-
// src/generated/platforms/whatsapp.ts
|
|
5348
|
-
var WhatsappNamespace = class {
|
|
5349
|
-
constructor(_core) {
|
|
5350
|
-
this._core = _core;
|
|
5351
|
-
}
|
|
5352
|
-
_core;
|
|
5353
|
-
/**
|
|
5354
|
-
* WhatsApp Number Validator
|
|
5355
|
-
*
|
|
5356
|
-
* Check whether a phone number is registered on WhatsApp.
|
|
5357
|
-
*
|
|
5358
|
-
* Price: $0.0035 per request plus $0.001 per result (maximum $0.0045).
|
|
5359
|
-
*
|
|
5360
|
-
* @example
|
|
5361
|
-
* const res = await client.whatsapp.validate({ phone: "+14155552671" });
|
|
5362
|
-
*/
|
|
5363
|
-
validate(input, options) {
|
|
5364
|
-
return this._core.run("whatsapp.validate", input, options);
|
|
5365
|
-
}
|
|
5366
|
-
};
|
|
5367
|
-
|
|
5368
5446
|
// src/generated/platforms/yahoo_finance.ts
|
|
5369
5447
|
var YahooFinanceNamespace = class {
|
|
5370
5448
|
constructor(_core) {
|
|
@@ -6280,14 +6358,6 @@ var AnyAPI2 = class extends AnyAPI {
|
|
|
6280
6358
|
this._core
|
|
6281
6359
|
);
|
|
6282
6360
|
}
|
|
6283
|
-
/**
|
|
6284
|
-
* Typed methods for the whatsapp platform.
|
|
6285
|
-
*/
|
|
6286
|
-
get whatsapp() {
|
|
6287
|
-
return this._namespaces["whatsapp"] ??= new WhatsappNamespace(
|
|
6288
|
-
this._core
|
|
6289
|
-
);
|
|
6290
|
-
}
|
|
6291
6361
|
/**
|
|
6292
6362
|
* Typed methods for the yahoo_finance platform.
|
|
6293
6363
|
*/
|
|
@@ -6396,7 +6466,6 @@ var AnyAPI2 = class extends AnyAPI {
|
|
|
6396
6466
|
WalmartNamespace,
|
|
6397
6467
|
WebNamespace,
|
|
6398
6468
|
WeiboNamespace,
|
|
6399
|
-
WhatsappNamespace,
|
|
6400
6469
|
YahooFinanceNamespace,
|
|
6401
6470
|
YelpNamespace,
|
|
6402
6471
|
YoutubeNamespace,
|