@getanyapi/sdk 0.10.0 → 0.11.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.cjs +100 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +400 -1
- package/dist/index.d.ts +400 -1
- package/dist/index.js +100 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3498,6 +3498,19 @@ var RedditNamespace = class {
|
|
|
3498
3498
|
this._core = _core;
|
|
3499
3499
|
}
|
|
3500
3500
|
_core;
|
|
3501
|
+
/**
|
|
3502
|
+
* Reddit Post
|
|
3503
|
+
*
|
|
3504
|
+
* Fetch a single Reddit post by URL, including its full body text, score, comment count, upvote ratio, and subreddit, as normalized JSON.
|
|
3505
|
+
*
|
|
3506
|
+
* Price: $0.001 per request.
|
|
3507
|
+
*
|
|
3508
|
+
* @example
|
|
3509
|
+
* const res = await client.reddit.post({ url: "https://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_united_states/" });
|
|
3510
|
+
*/
|
|
3511
|
+
post(input, options) {
|
|
3512
|
+
return this._core.run("reddit.post", input, options);
|
|
3513
|
+
}
|
|
3501
3514
|
/**
|
|
3502
3515
|
* Reddit Post Comments
|
|
3503
3516
|
*
|
|
@@ -3511,6 +3524,22 @@ var RedditNamespace = class {
|
|
|
3511
3524
|
postComments(input, options) {
|
|
3512
3525
|
return this._core.run("reddit.post_comments", input, options);
|
|
3513
3526
|
}
|
|
3527
|
+
/**
|
|
3528
|
+
* Iterate every result of Reddit Post Comments across pages.
|
|
3529
|
+
*
|
|
3530
|
+
* Yields items directly; call `.pages()` on the return value to walk whole
|
|
3531
|
+
* result pages instead (each carries its own costUsd).
|
|
3532
|
+
*/
|
|
3533
|
+
iterPostComments(input, options) {
|
|
3534
|
+
return paginate(
|
|
3535
|
+
this._core,
|
|
3536
|
+
"reddit.post_comments",
|
|
3537
|
+
input,
|
|
3538
|
+
"comments",
|
|
3539
|
+
false,
|
|
3540
|
+
options
|
|
3541
|
+
);
|
|
3542
|
+
}
|
|
3514
3543
|
/**
|
|
3515
3544
|
* Reddit Post Transcript
|
|
3516
3545
|
*
|
|
@@ -3524,6 +3553,19 @@ var RedditNamespace = class {
|
|
|
3524
3553
|
postTranscript(input, options) {
|
|
3525
3554
|
return this._core.run("reddit.post_transcript", input, options);
|
|
3526
3555
|
}
|
|
3556
|
+
/**
|
|
3557
|
+
* Reddit Profile
|
|
3558
|
+
*
|
|
3559
|
+
* Fetch a Reddit user's public profile (karma split, post and comment counts, bio, avatar, account age) by username.
|
|
3560
|
+
*
|
|
3561
|
+
* Price: $0.001 per request.
|
|
3562
|
+
*
|
|
3563
|
+
* @example
|
|
3564
|
+
* const res = await client.reddit.profile({ username: "spez" });
|
|
3565
|
+
*/
|
|
3566
|
+
profile(input, options) {
|
|
3567
|
+
return this._core.run("reddit.profile", input, options);
|
|
3568
|
+
}
|
|
3527
3569
|
/**
|
|
3528
3570
|
* Reddit Search
|
|
3529
3571
|
*
|
|
@@ -3608,6 +3650,64 @@ var RedditNamespace = class {
|
|
|
3608
3650
|
options
|
|
3609
3651
|
);
|
|
3610
3652
|
}
|
|
3653
|
+
/**
|
|
3654
|
+
* Reddit User Comments
|
|
3655
|
+
*
|
|
3656
|
+
* 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.
|
|
3657
|
+
*
|
|
3658
|
+
* Price: $0.001 per request.
|
|
3659
|
+
*
|
|
3660
|
+
* @example
|
|
3661
|
+
* const res = await client.reddit.userComments({ username: "spez" });
|
|
3662
|
+
*/
|
|
3663
|
+
userComments(input, options) {
|
|
3664
|
+
return this._core.run("reddit.user_comments", input, options);
|
|
3665
|
+
}
|
|
3666
|
+
/**
|
|
3667
|
+
* Iterate every result of Reddit User Comments across pages.
|
|
3668
|
+
*
|
|
3669
|
+
* Yields items directly; call `.pages()` on the return value to walk whole
|
|
3670
|
+
* result pages instead (each carries its own costUsd).
|
|
3671
|
+
*/
|
|
3672
|
+
iterUserComments(input, options) {
|
|
3673
|
+
return paginate(
|
|
3674
|
+
this._core,
|
|
3675
|
+
"reddit.user_comments",
|
|
3676
|
+
input,
|
|
3677
|
+
"comments",
|
|
3678
|
+
false,
|
|
3679
|
+
options
|
|
3680
|
+
);
|
|
3681
|
+
}
|
|
3682
|
+
/**
|
|
3683
|
+
* Reddit User Posts
|
|
3684
|
+
*
|
|
3685
|
+
* List a Reddit user's posts by username, sorted by new, top, hot, or controversial, with cursor pagination.
|
|
3686
|
+
*
|
|
3687
|
+
* Price: $0.001 per request.
|
|
3688
|
+
*
|
|
3689
|
+
* @example
|
|
3690
|
+
* const res = await client.reddit.userPosts({ username: "spez" });
|
|
3691
|
+
*/
|
|
3692
|
+
userPosts(input, options) {
|
|
3693
|
+
return this._core.run("reddit.user_posts", input, options);
|
|
3694
|
+
}
|
|
3695
|
+
/**
|
|
3696
|
+
* Iterate every result of Reddit User Posts across pages.
|
|
3697
|
+
*
|
|
3698
|
+
* Yields items directly; call `.pages()` on the return value to walk whole
|
|
3699
|
+
* result pages instead (each carries its own costUsd).
|
|
3700
|
+
*/
|
|
3701
|
+
iterUserPosts(input, options) {
|
|
3702
|
+
return paginate(
|
|
3703
|
+
this._core,
|
|
3704
|
+
"reddit.user_posts",
|
|
3705
|
+
input,
|
|
3706
|
+
"posts",
|
|
3707
|
+
false,
|
|
3708
|
+
options
|
|
3709
|
+
);
|
|
3710
|
+
}
|
|
3611
3711
|
};
|
|
3612
3712
|
|
|
3613
3713
|
// src/generated/platforms/redfin.ts
|