@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.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
@@ -5245,27 +5345,6 @@ var WeiboNamespace = class {
5245
5345
  }
5246
5346
  };
5247
5347
 
5248
- // src/generated/platforms/whatsapp.ts
5249
- var WhatsappNamespace = class {
5250
- constructor(_core) {
5251
- this._core = _core;
5252
- }
5253
- _core;
5254
- /**
5255
- * WhatsApp Number Validator
5256
- *
5257
- * Check whether a phone number is registered on WhatsApp.
5258
- *
5259
- * Price: $0.0035 per request plus $0.001 per result (maximum $0.0045).
5260
- *
5261
- * @example
5262
- * const res = await client.whatsapp.validate({ phone: "+14155552671" });
5263
- */
5264
- validate(input, options) {
5265
- return this._core.run("whatsapp.validate", input, options);
5266
- }
5267
- };
5268
-
5269
5348
  // src/generated/platforms/yahoo_finance.ts
5270
5349
  var YahooFinanceNamespace = class {
5271
5350
  constructor(_core) {
@@ -6181,14 +6260,6 @@ var AnyAPI2 = class extends AnyAPI {
6181
6260
  this._core
6182
6261
  );
6183
6262
  }
6184
- /**
6185
- * Typed methods for the whatsapp platform.
6186
- */
6187
- get whatsapp() {
6188
- return this._namespaces["whatsapp"] ??= new WhatsappNamespace(
6189
- this._core
6190
- );
6191
- }
6192
6263
  /**
6193
6264
  * Typed methods for the yahoo_finance platform.
6194
6265
  */
@@ -6296,7 +6367,6 @@ export {
6296
6367
  WalmartNamespace,
6297
6368
  WebNamespace,
6298
6369
  WeiboNamespace,
6299
- WhatsappNamespace,
6300
6370
  YahooFinanceNamespace,
6301
6371
  YelpNamespace,
6302
6372
  YoutubeNamespace,