ensembledata 0.1.11 → 0.1.13
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 +1 -1
- package/src/client.js +74 -65
- package/src/version.js +1 -1
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -105,7 +105,7 @@ class TiktokEndpoints {
|
|
|
105
105
|
* keyword: string;
|
|
106
106
|
* cursor?: number;
|
|
107
107
|
* period: "0" | "1" | "7" | "30" | "90" | "180";
|
|
108
|
-
* sorting?: "0" | "1";
|
|
108
|
+
* sorting?: "0" | "1" | "2";
|
|
109
109
|
* country?: string;
|
|
110
110
|
* matchExactly?: boolean;
|
|
111
111
|
* getAuthorStats?: boolean;
|
|
@@ -144,7 +144,7 @@ class TiktokEndpoints {
|
|
|
144
144
|
* @param {{
|
|
145
145
|
* keyword: string;
|
|
146
146
|
* period: "0" | "1" | "7" | "30" | "90" | "180";
|
|
147
|
-
* sorting?: "0" | "1";
|
|
147
|
+
* sorting?: "0" | "1" | "2";
|
|
148
148
|
* country?: string;
|
|
149
149
|
* matchExactly?: boolean;
|
|
150
150
|
* }} params
|
|
@@ -266,23 +266,18 @@ class TiktokEndpoints {
|
|
|
266
266
|
}
|
|
267
267
|
|
|
268
268
|
/**
|
|
269
|
-
* @param {{
|
|
270
|
-
* secUid: string;
|
|
271
|
-
* alternativeMethod?: boolean;
|
|
272
|
-
* newVersion?: boolean;
|
|
273
|
-
* }} params
|
|
269
|
+
* @param {{ secUid: string; alternativeMethod?: boolean }} params
|
|
274
270
|
* @param {{ extraParams?: Record<string, any>; timeout?: number }} options
|
|
275
271
|
* @returns {Promise<EDResponse>}
|
|
276
272
|
*/
|
|
277
273
|
userInfoFromSecuid(
|
|
278
|
-
{ secUid, alternativeMethod = undefined
|
|
274
|
+
{ secUid, alternativeMethod = undefined },
|
|
279
275
|
options = {},
|
|
280
276
|
) {
|
|
281
277
|
const params = filterUndefinedValues({
|
|
282
278
|
...options.extraParams,
|
|
283
279
|
secUid,
|
|
284
280
|
alternative_method: alternativeMethod,
|
|
285
|
-
new_version: newVersion,
|
|
286
281
|
});
|
|
287
282
|
return this.#requester.get("/tt/user/info-from-secuid", params, {
|
|
288
283
|
timeout: options.timeout,
|
|
@@ -354,19 +349,15 @@ class TiktokEndpoints {
|
|
|
354
349
|
}
|
|
355
350
|
|
|
356
351
|
/**
|
|
357
|
-
* @param {{ awemeId: string; cursor?: number
|
|
352
|
+
* @param {{ awemeId: string; cursor?: number }} params
|
|
358
353
|
* @param {{ extraParams?: Record<string, any>; timeout?: number }} options
|
|
359
354
|
* @returns {Promise<EDResponse>}
|
|
360
355
|
*/
|
|
361
|
-
postComments(
|
|
362
|
-
{ awemeId, cursor = undefined, newVersion = undefined },
|
|
363
|
-
options = {},
|
|
364
|
-
) {
|
|
356
|
+
postComments({ awemeId, cursor = undefined }, options = {}) {
|
|
365
357
|
const params = filterUndefinedValues({
|
|
366
358
|
...options.extraParams,
|
|
367
359
|
aweme_id: awemeId,
|
|
368
360
|
cursor,
|
|
369
|
-
new_version: newVersion,
|
|
370
361
|
});
|
|
371
362
|
return this.#requester.get("/tt/post/comments", params, {
|
|
372
363
|
timeout: options.timeout,
|
|
@@ -441,15 +432,14 @@ class TiktokEndpoints {
|
|
|
441
432
|
}
|
|
442
433
|
|
|
443
434
|
/**
|
|
444
|
-
* @param {{ musicId: string
|
|
435
|
+
* @param {{ musicId: string }} params
|
|
445
436
|
* @param {{ extraParams?: Record<string, any>; timeout?: number }} options
|
|
446
437
|
* @returns {Promise<EDResponse>}
|
|
447
438
|
*/
|
|
448
|
-
musicDetails({ musicId
|
|
439
|
+
musicDetails({ musicId }, options = {}) {
|
|
449
440
|
const params = filterUndefinedValues({
|
|
450
441
|
...options.extraParams,
|
|
451
442
|
id: musicId,
|
|
452
|
-
new_version: newVersion,
|
|
453
443
|
});
|
|
454
444
|
return this.#requester.get("/tt/music/details", params, {
|
|
455
445
|
timeout: options.timeout,
|
|
@@ -462,19 +452,12 @@ class TiktokEndpoints {
|
|
|
462
452
|
* secUid: string;
|
|
463
453
|
* cursor?: number;
|
|
464
454
|
* pageToken?: string;
|
|
465
|
-
* newVersion?: boolean;
|
|
466
455
|
* }} params
|
|
467
456
|
* @param {{ extraParams?: Record<string, any>; timeout?: number }} options
|
|
468
457
|
* @returns {Promise<EDResponse>}
|
|
469
458
|
*/
|
|
470
459
|
userFollowers(
|
|
471
|
-
{
|
|
472
|
-
id,
|
|
473
|
-
secUid,
|
|
474
|
-
cursor = undefined,
|
|
475
|
-
pageToken = undefined,
|
|
476
|
-
newVersion = undefined,
|
|
477
|
-
},
|
|
460
|
+
{ id, secUid, cursor = undefined, pageToken = undefined },
|
|
478
461
|
options = {},
|
|
479
462
|
) {
|
|
480
463
|
const params = filterUndefinedValues({
|
|
@@ -483,7 +466,6 @@ class TiktokEndpoints {
|
|
|
483
466
|
secUid,
|
|
484
467
|
cursor,
|
|
485
468
|
page_token: pageToken,
|
|
486
|
-
new_version: newVersion,
|
|
487
469
|
});
|
|
488
470
|
return this.#requester.get("/tt/user/followers", params, {
|
|
489
471
|
timeout: options.timeout,
|
|
@@ -496,19 +478,12 @@ class TiktokEndpoints {
|
|
|
496
478
|
* secUid: string;
|
|
497
479
|
* cursor?: number;
|
|
498
480
|
* pageToken?: string;
|
|
499
|
-
* newVersion?: boolean;
|
|
500
481
|
* }} params
|
|
501
482
|
* @param {{ extraParams?: Record<string, any>; timeout?: number }} options
|
|
502
483
|
* @returns {Promise<EDResponse>}
|
|
503
484
|
*/
|
|
504
485
|
userFollowings(
|
|
505
|
-
{
|
|
506
|
-
id,
|
|
507
|
-
secUid,
|
|
508
|
-
cursor = undefined,
|
|
509
|
-
pageToken = undefined,
|
|
510
|
-
newVersion = undefined,
|
|
511
|
-
},
|
|
486
|
+
{ id, secUid, cursor = undefined, pageToken = undefined },
|
|
512
487
|
options = {},
|
|
513
488
|
) {
|
|
514
489
|
const params = filterUndefinedValues({
|
|
@@ -517,7 +492,6 @@ class TiktokEndpoints {
|
|
|
517
492
|
secUid,
|
|
518
493
|
cursor,
|
|
519
494
|
page_token: pageToken,
|
|
520
|
-
new_version: newVersion,
|
|
521
495
|
});
|
|
522
496
|
return this.#requester.get("/tt/user/followings", params, {
|
|
523
497
|
timeout: options.timeout,
|
|
@@ -838,6 +812,7 @@ class InstagramEndpoints {
|
|
|
838
812
|
* chunkSize?: number;
|
|
839
813
|
* cursor?: string;
|
|
840
814
|
* alternativeMethod?: boolean;
|
|
815
|
+
* fetchPlayCount?: boolean;
|
|
841
816
|
* }} params
|
|
842
817
|
* @param {{ extraParams?: Record<string, any>; timeout?: number }} options
|
|
843
818
|
* @returns {Promise<EDResponse>}
|
|
@@ -850,6 +825,7 @@ class InstagramEndpoints {
|
|
|
850
825
|
chunkSize = undefined,
|
|
851
826
|
cursor = undefined,
|
|
852
827
|
alternativeMethod = undefined,
|
|
828
|
+
fetchPlayCount = undefined,
|
|
853
829
|
},
|
|
854
830
|
options = {},
|
|
855
831
|
) {
|
|
@@ -861,6 +837,7 @@ class InstagramEndpoints {
|
|
|
861
837
|
chunk_size: chunkSize,
|
|
862
838
|
start_cursor: cursor,
|
|
863
839
|
alternative_method: alternativeMethod,
|
|
840
|
+
fetch_play_count: fetchPlayCount,
|
|
864
841
|
});
|
|
865
842
|
return this.#requester.get("/instagram/user/posts", params, {
|
|
866
843
|
timeout: options.timeout,
|
|
@@ -898,14 +875,15 @@ class InstagramEndpoints {
|
|
|
898
875
|
}
|
|
899
876
|
|
|
900
877
|
/**
|
|
901
|
-
* @param {{ username: string }} params
|
|
878
|
+
* @param {{ username: string; backupMethod?: boolean }} params
|
|
902
879
|
* @param {{ extraParams?: Record<string, any>; timeout?: number }} options
|
|
903
880
|
* @returns {Promise<EDResponse>}
|
|
904
881
|
*/
|
|
905
|
-
userDetailedInfo({ username }, options = {}) {
|
|
882
|
+
userDetailedInfo({ username, backupMethod = undefined }, options = {}) {
|
|
906
883
|
const params = filterUndefinedValues({
|
|
907
884
|
...options.extraParams,
|
|
908
885
|
username,
|
|
886
|
+
backup_method: backupMethod,
|
|
909
887
|
});
|
|
910
888
|
return this.#requester.get("/instagram/user/detailed-info", params, {
|
|
911
889
|
timeout: options.timeout,
|
|
@@ -965,35 +943,23 @@ class InstagramEndpoints {
|
|
|
965
943
|
}
|
|
966
944
|
|
|
967
945
|
/**
|
|
968
|
-
* @param {{
|
|
946
|
+
* @param {{
|
|
947
|
+
* code: string;
|
|
948
|
+
* numComments?: number;
|
|
949
|
+
* fetchPlayCount?: boolean;
|
|
950
|
+
* }} params
|
|
969
951
|
* @param {{ extraParams?: Record<string, any>; timeout?: number }} options
|
|
970
952
|
* @returns {Promise<EDResponse>}
|
|
971
953
|
*/
|
|
972
|
-
|
|
973
|
-
{
|
|
954
|
+
postInfoAndComments(
|
|
955
|
+
{ code, numComments = undefined, fetchPlayCount = undefined },
|
|
974
956
|
options = {},
|
|
975
957
|
) {
|
|
976
|
-
const params = filterUndefinedValues({
|
|
977
|
-
...options.extraParams,
|
|
978
|
-
user_id: userId,
|
|
979
|
-
cursor,
|
|
980
|
-
chunk_size: chunkSize,
|
|
981
|
-
});
|
|
982
|
-
return this.#requester.get("/instagram/user/tagged-posts", params, {
|
|
983
|
-
timeout: options.timeout,
|
|
984
|
-
});
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
/**
|
|
988
|
-
* @param {{ code: string; numComments?: number }} params
|
|
989
|
-
* @param {{ extraParams?: Record<string, any>; timeout?: number }} options
|
|
990
|
-
* @returns {Promise<EDResponse>}
|
|
991
|
-
*/
|
|
992
|
-
postInfoAndComments({ code, numComments = undefined }, options = {}) {
|
|
993
958
|
const params = filterUndefinedValues({
|
|
994
959
|
...options.extraParams,
|
|
995
960
|
code,
|
|
996
961
|
n_comments_to_fetch: numComments,
|
|
962
|
+
fetch_play_count: fetchPlayCount,
|
|
997
963
|
});
|
|
998
964
|
return this.#requester.get("/instagram/post/details", params, {
|
|
999
965
|
timeout: options.timeout,
|
|
@@ -1038,16 +1004,17 @@ class InstagramEndpoints {
|
|
|
1038
1004
|
}
|
|
1039
1005
|
|
|
1040
1006
|
/**
|
|
1041
|
-
* @param {{ text: string }} params
|
|
1007
|
+
* @param {{ text: string; cursor: string }} params
|
|
1042
1008
|
* @param {{ extraParams?: Record<string, any>; timeout?: number }} options
|
|
1043
1009
|
* @returns {Promise<EDResponse>}
|
|
1044
1010
|
*/
|
|
1045
|
-
|
|
1011
|
+
reelsSearch({ text, cursor }, options = {}) {
|
|
1046
1012
|
const params = filterUndefinedValues({
|
|
1047
1013
|
...options.extraParams,
|
|
1048
1014
|
text,
|
|
1015
|
+
cursor,
|
|
1049
1016
|
});
|
|
1050
|
-
return this.#requester.get("/instagram/search", params, {
|
|
1017
|
+
return this.#requester.get("/instagram/reels/search", params, {
|
|
1051
1018
|
timeout: options.timeout,
|
|
1052
1019
|
});
|
|
1053
1020
|
}
|
|
@@ -1114,6 +1081,29 @@ class RedditEndpoints {
|
|
|
1114
1081
|
this.#requester = requester;
|
|
1115
1082
|
}
|
|
1116
1083
|
|
|
1084
|
+
/**
|
|
1085
|
+
* @param {{
|
|
1086
|
+
* name: string;
|
|
1087
|
+
* sort: "relevance" | "hot" | "new" | "top" | "comments";
|
|
1088
|
+
* period: "hour" | "day" | "week" | "month" | "year" | "all";
|
|
1089
|
+
* cursor: string;
|
|
1090
|
+
* }} params
|
|
1091
|
+
* @param {{ extraParams?: Record<string, any>; timeout?: number }} options
|
|
1092
|
+
* @returns {Promise<EDResponse>}
|
|
1093
|
+
*/
|
|
1094
|
+
searchRedditKeywordSearchGet({ name, sort, period, cursor }, options = {}) {
|
|
1095
|
+
const params = filterUndefinedValues({
|
|
1096
|
+
...options.extraParams,
|
|
1097
|
+
name,
|
|
1098
|
+
sort,
|
|
1099
|
+
period,
|
|
1100
|
+
cursor,
|
|
1101
|
+
});
|
|
1102
|
+
return this.#requester.get("/reddit/keyword/search", params, {
|
|
1103
|
+
timeout: options.timeout,
|
|
1104
|
+
});
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1117
1107
|
/**
|
|
1118
1108
|
* @param {{
|
|
1119
1109
|
* name: string;
|
|
@@ -1138,14 +1128,15 @@ class RedditEndpoints {
|
|
|
1138
1128
|
}
|
|
1139
1129
|
|
|
1140
1130
|
/**
|
|
1141
|
-
* @param {{ permalink: string }} params
|
|
1131
|
+
* @param {{ permalink: string; cursor?: string }} params
|
|
1142
1132
|
* @param {{ extraParams?: Record<string, any>; timeout?: number }} options
|
|
1143
1133
|
* @returns {Promise<EDResponse>}
|
|
1144
1134
|
*/
|
|
1145
|
-
postComments({ permalink }, options = {}) {
|
|
1135
|
+
postComments({ permalink, cursor = undefined }, options = {}) {
|
|
1146
1136
|
const params = filterUndefinedValues({
|
|
1147
1137
|
...options.extraParams,
|
|
1148
1138
|
permalink,
|
|
1139
|
+
cursor,
|
|
1149
1140
|
});
|
|
1150
1141
|
return this.#requester.get("/reddit/post/comments", params, {
|
|
1151
1142
|
timeout: options.timeout,
|
|
@@ -1195,6 +1186,23 @@ class TwitterEndpoints {
|
|
|
1195
1186
|
});
|
|
1196
1187
|
}
|
|
1197
1188
|
|
|
1189
|
+
/**
|
|
1190
|
+
* @param {{ name: string }} params
|
|
1191
|
+
* @param {{ extraParams?: Record<string, any>; timeout?: number }} options
|
|
1192
|
+
* @returns {Promise<EDResponse>}
|
|
1193
|
+
*/
|
|
1194
|
+
userTweetsFromUsername({ name }, options = {}) {
|
|
1195
|
+
const params = filterUndefinedValues({
|
|
1196
|
+
...options.extraParams,
|
|
1197
|
+
name,
|
|
1198
|
+
});
|
|
1199
|
+
return this.#requester.get(
|
|
1200
|
+
"/twitter/user/tweets-from-username",
|
|
1201
|
+
params,
|
|
1202
|
+
{ timeout: options.timeout },
|
|
1203
|
+
);
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1198
1206
|
/**
|
|
1199
1207
|
* @param {{ id: number }} params
|
|
1200
1208
|
* @param {{ extraParams?: Record<string, any>; timeout?: number }} options
|
|
@@ -1286,14 +1294,15 @@ class ThreadsEndpoints {
|
|
|
1286
1294
|
}
|
|
1287
1295
|
|
|
1288
1296
|
/**
|
|
1289
|
-
* @param {{ id: number }} params
|
|
1297
|
+
* @param {{ id: number; shortcode?: string }} params
|
|
1290
1298
|
* @param {{ extraParams?: Record<string, any>; timeout?: number }} options
|
|
1291
1299
|
* @returns {Promise<EDResponse>}
|
|
1292
1300
|
*/
|
|
1293
|
-
postReplies({ id }, options = {}) {
|
|
1301
|
+
postReplies({ id, shortcode = undefined }, options = {}) {
|
|
1294
1302
|
const params = filterUndefinedValues({
|
|
1295
1303
|
...options.extraParams,
|
|
1296
1304
|
id,
|
|
1305
|
+
shortcode,
|
|
1297
1306
|
});
|
|
1298
1307
|
return this.#requester.get("/threads/post/replies", params, {
|
|
1299
1308
|
timeout: options.timeout,
|
package/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "0.1.
|
|
1
|
+
export const VERSION = "0.1.13";
|