ensembledata 0.1.5 → 0.1.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ensembledata",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "Node.js bindings for the EnsembleData API",
5
5
  "author": "EnsembleData <hello@ensembledata.com>",
6
6
  "contributors": [
package/src/client.js CHANGED
@@ -480,6 +480,26 @@ class TiktokEndpoints {
480
480
  timeout: options.timeout,
481
481
  });
482
482
  }
483
+
484
+ /**
485
+ * @param {{ keyword: string; cursor?: number; country?: string }} params
486
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
487
+ * @returns {Promise<EDResponse>}
488
+ */
489
+ livesSearch(
490
+ { keyword, cursor = undefined, country = undefined },
491
+ options = {},
492
+ ) {
493
+ const params = filterUndefinedValues({
494
+ ...options.extraParams,
495
+ keyword,
496
+ cursor,
497
+ country,
498
+ });
499
+ return this.#requester.get("/tt/live/search", params, {
500
+ timeout: options.timeout,
501
+ });
502
+ }
483
503
  }
484
504
 
485
505
  class YoutubeEndpoints {
@@ -566,15 +586,23 @@ class YoutubeEndpoints {
566
586
  }
567
587
 
568
588
  /**
569
- * @param {{ channelId: string; fromUrl?: boolean }} params
589
+ * @param {{
590
+ * channelId: string;
591
+ * fromUrl?: boolean;
592
+ * getAdditionalInfo?: boolean;
593
+ * }} params
570
594
  * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
571
595
  * @returns {Promise<EDResponse>}
572
596
  */
573
- channelDetailedInfo({ channelId, fromUrl = undefined }, options = {}) {
597
+ channelDetailedInfo(
598
+ { channelId, fromUrl = undefined, getAdditionalInfo = undefined },
599
+ options = {},
600
+ ) {
574
601
  const params = filterUndefinedValues({
575
602
  ...options.extraParams,
576
603
  browseId: channelId,
577
604
  from_url: fromUrl,
605
+ get_additional_info: getAdditionalInfo,
578
606
  });
579
607
  return this.#requester.get("/youtube/channel/detailed-info", params, {
580
608
  timeout: options.timeout,
@@ -913,30 +941,6 @@ class InstagramEndpoints {
913
941
  });
914
942
  }
915
943
 
916
- /**
917
- * @param {{
918
- * hashtag: string;
919
- * cursor?: string;
920
- * getAuthorInfo?: boolean;
921
- * }} params
922
- * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
923
- * @returns {Promise<EDResponse>}
924
- */
925
- hashtagPosts(
926
- { hashtag, cursor = undefined, getAuthorInfo = undefined },
927
- options = {},
928
- ) {
929
- const params = filterUndefinedValues({
930
- ...options.extraParams,
931
- name: hashtag,
932
- cursor,
933
- get_author_info: getAuthorInfo,
934
- });
935
- return this.#requester.get("/instagram/hashtag/posts", params, {
936
- timeout: options.timeout,
937
- });
938
- }
939
-
940
944
  /**
941
945
  * @param {{ musicId: string; cursor?: string }} params
942
946
  * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
@@ -1054,15 +1058,14 @@ class RedditEndpoints {
1054
1058
  }
1055
1059
 
1056
1060
  /**
1057
- * @param {{ id: string; cursor?: string }} params
1061
+ * @param {{ permalink: string }} params
1058
1062
  * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
1059
1063
  * @returns {Promise<EDResponse>}
1060
1064
  */
1061
- postComments({ id, cursor = undefined }, options = {}) {
1065
+ postComments({ permalink }, options = {}) {
1062
1066
  const params = filterUndefinedValues({
1063
1067
  ...options.extraParams,
1064
- id,
1065
- cursor,
1068
+ permalink,
1066
1069
  });
1067
1070
  return this.#requester.get("/reddit/post/comments", params, {
1068
1071
  timeout: options.timeout,
package/src/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "0.1.5";
1
+ export const VERSION = "0.1.7";