@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.js CHANGED
@@ -3399,6 +3399,19 @@ var RedditNamespace = class {
3399
3399
  this._core = _core;
3400
3400
  }
3401
3401
  _core;
3402
+ /**
3403
+ * Reddit Post
3404
+ *
3405
+ * Fetch a single Reddit post by URL, including its full body text, score, comment count, upvote ratio, and subreddit, as normalized JSON.
3406
+ *
3407
+ * Price: $0.001 per request.
3408
+ *
3409
+ * @example
3410
+ * const res = await client.reddit.post({ url: "https://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_united_states/" });
3411
+ */
3412
+ post(input, options) {
3413
+ return this._core.run("reddit.post", input, options);
3414
+ }
3402
3415
  /**
3403
3416
  * Reddit Post Comments
3404
3417
  *
@@ -3412,6 +3425,22 @@ var RedditNamespace = class {
3412
3425
  postComments(input, options) {
3413
3426
  return this._core.run("reddit.post_comments", input, options);
3414
3427
  }
3428
+ /**
3429
+ * Iterate every result of Reddit Post Comments across pages.
3430
+ *
3431
+ * Yields items directly; call `.pages()` on the return value to walk whole
3432
+ * result pages instead (each carries its own costUsd).
3433
+ */
3434
+ iterPostComments(input, options) {
3435
+ return paginate(
3436
+ this._core,
3437
+ "reddit.post_comments",
3438
+ input,
3439
+ "comments",
3440
+ false,
3441
+ options
3442
+ );
3443
+ }
3415
3444
  /**
3416
3445
  * Reddit Post Transcript
3417
3446
  *
@@ -3425,6 +3454,19 @@ var RedditNamespace = class {
3425
3454
  postTranscript(input, options) {
3426
3455
  return this._core.run("reddit.post_transcript", input, options);
3427
3456
  }
3457
+ /**
3458
+ * Reddit Profile
3459
+ *
3460
+ * Fetch a Reddit user's public profile (karma split, post and comment counts, bio, avatar, account age) by username.
3461
+ *
3462
+ * Price: $0.001 per request.
3463
+ *
3464
+ * @example
3465
+ * const res = await client.reddit.profile({ username: "spez" });
3466
+ */
3467
+ profile(input, options) {
3468
+ return this._core.run("reddit.profile", input, options);
3469
+ }
3428
3470
  /**
3429
3471
  * Reddit Search
3430
3472
  *
@@ -3509,6 +3551,64 @@ var RedditNamespace = class {
3509
3551
  options
3510
3552
  );
3511
3553
  }
3554
+ /**
3555
+ * Reddit User Comments
3556
+ *
3557
+ * 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.
3558
+ *
3559
+ * Price: $0.001 per request.
3560
+ *
3561
+ * @example
3562
+ * const res = await client.reddit.userComments({ username: "spez" });
3563
+ */
3564
+ userComments(input, options) {
3565
+ return this._core.run("reddit.user_comments", input, options);
3566
+ }
3567
+ /**
3568
+ * Iterate every result of Reddit User Comments across pages.
3569
+ *
3570
+ * Yields items directly; call `.pages()` on the return value to walk whole
3571
+ * result pages instead (each carries its own costUsd).
3572
+ */
3573
+ iterUserComments(input, options) {
3574
+ return paginate(
3575
+ this._core,
3576
+ "reddit.user_comments",
3577
+ input,
3578
+ "comments",
3579
+ false,
3580
+ options
3581
+ );
3582
+ }
3583
+ /**
3584
+ * Reddit User Posts
3585
+ *
3586
+ * List a Reddit user's posts by username, sorted by new, top, hot, or controversial, with cursor pagination.
3587
+ *
3588
+ * Price: $0.001 per request.
3589
+ *
3590
+ * @example
3591
+ * const res = await client.reddit.userPosts({ username: "spez" });
3592
+ */
3593
+ userPosts(input, options) {
3594
+ return this._core.run("reddit.user_posts", input, options);
3595
+ }
3596
+ /**
3597
+ * Iterate every result of Reddit User Posts across pages.
3598
+ *
3599
+ * Yields items directly; call `.pages()` on the return value to walk whole
3600
+ * result pages instead (each carries its own costUsd).
3601
+ */
3602
+ iterUserPosts(input, options) {
3603
+ return paginate(
3604
+ this._core,
3605
+ "reddit.user_posts",
3606
+ input,
3607
+ "posts",
3608
+ false,
3609
+ options
3610
+ );
3611
+ }
3512
3612
  };
3513
3613
 
3514
3614
  // src/generated/platforms/redfin.ts