ensembledata 0.1.4 → 0.1.6
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 +2 -2
- package/src/client.js +50 -17
- package/src/version.js +1 -1
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ensembledata",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Node.js bindings for the EnsembleData API",
|
|
5
5
|
"author": "EnsembleData <hello@ensembledata.com>",
|
|
6
6
|
"contributors": [
|
|
7
|
-
"
|
|
7
|
+
"EnsembleData <hello@ensembledata.com>"
|
|
8
8
|
],
|
|
9
9
|
"homepage": "https://ensembledata.com",
|
|
10
10
|
"repository": {
|
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 {{
|
|
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(
|
|
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,
|
|
@@ -613,6 +641,22 @@ class YoutubeEndpoints {
|
|
|
613
641
|
});
|
|
614
642
|
}
|
|
615
643
|
|
|
644
|
+
/**
|
|
645
|
+
* @param {{ channelId: string; depth: number }} params
|
|
646
|
+
* @param {{ extraParams?: Record<string, any>; timeout?: number }} options
|
|
647
|
+
* @returns {Promise<EDResponse>}
|
|
648
|
+
*/
|
|
649
|
+
channelStreams({ channelId, depth }, options = {}) {
|
|
650
|
+
const params = filterUndefinedValues({
|
|
651
|
+
...options.extraParams,
|
|
652
|
+
browseId: channelId,
|
|
653
|
+
depth,
|
|
654
|
+
});
|
|
655
|
+
return this.#requester.get("/youtube/channel/streams", params, {
|
|
656
|
+
timeout: options.timeout,
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
|
|
616
660
|
/**
|
|
617
661
|
* @param {{
|
|
618
662
|
* id: string;
|
|
@@ -901,30 +945,20 @@ class InstagramEndpoints {
|
|
|
901
945
|
* @param {{
|
|
902
946
|
* hashtag: string;
|
|
903
947
|
* cursor?: string;
|
|
904
|
-
* chunkSize?: number;
|
|
905
948
|
* getAuthorInfo?: boolean;
|
|
906
|
-
* alternativeMethod?: boolean;
|
|
907
949
|
* }} params
|
|
908
950
|
* @param {{ extraParams?: Record<string, any>; timeout?: number }} options
|
|
909
951
|
* @returns {Promise<EDResponse>}
|
|
910
952
|
*/
|
|
911
953
|
hashtagPosts(
|
|
912
|
-
{
|
|
913
|
-
hashtag,
|
|
914
|
-
cursor = undefined,
|
|
915
|
-
chunkSize = undefined,
|
|
916
|
-
getAuthorInfo = undefined,
|
|
917
|
-
alternativeMethod = undefined,
|
|
918
|
-
},
|
|
954
|
+
{ hashtag, cursor = undefined, getAuthorInfo = undefined },
|
|
919
955
|
options = {},
|
|
920
956
|
) {
|
|
921
957
|
const params = filterUndefinedValues({
|
|
922
958
|
...options.extraParams,
|
|
923
959
|
name: hashtag,
|
|
924
960
|
cursor,
|
|
925
|
-
chunk_size: chunkSize,
|
|
926
961
|
get_author_info: getAuthorInfo,
|
|
927
|
-
alternative_method: alternativeMethod,
|
|
928
962
|
});
|
|
929
963
|
return this.#requester.get("/instagram/hashtag/posts", params, {
|
|
930
964
|
timeout: options.timeout,
|
|
@@ -1048,15 +1082,14 @@ class RedditEndpoints {
|
|
|
1048
1082
|
}
|
|
1049
1083
|
|
|
1050
1084
|
/**
|
|
1051
|
-
* @param {{
|
|
1085
|
+
* @param {{ permalink: string }} params
|
|
1052
1086
|
* @param {{ extraParams?: Record<string, any>; timeout?: number }} options
|
|
1053
1087
|
* @returns {Promise<EDResponse>}
|
|
1054
1088
|
*/
|
|
1055
|
-
postComments({
|
|
1089
|
+
postComments({ permalink }, options = {}) {
|
|
1056
1090
|
const params = filterUndefinedValues({
|
|
1057
1091
|
...options.extraParams,
|
|
1058
|
-
|
|
1059
|
-
cursor,
|
|
1092
|
+
permalink,
|
|
1060
1093
|
});
|
|
1061
1094
|
return this.#requester.get("/reddit/post/comments", params, {
|
|
1062
1095
|
timeout: options.timeout,
|
package/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "0.1.
|
|
1
|
+
export const VERSION = "0.1.6";
|