ensembledata 0.0.3 → 0.1.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/LICENCE +9 -0
- package/README.md +39 -7
- package/package.json +5 -3
- package/src/client.js +311 -205
- package/src/errors.js +19 -0
- package/src/index.js +2 -0
- package/src/requester.js +53 -7
- package/src/version.js +1 -0
- package/types/client.d.ts +257 -105
- package/types/client.d.ts.map +1 -1
- package/types/errors.d.ts +20 -0
- package/types/errors.d.ts.map +1 -0
- package/types/index.d.ts +2 -0
- package/types/requester.d.ts +29 -4
- package/types/requester.d.ts.map +1 -1
- package/types/version.d.ts +2 -0
- package/types/version.d.ts.map +1 -0
package/types/client.d.ts
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
export class EDClient {
|
|
2
|
-
/**
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @param {{
|
|
4
|
+
* token: string;
|
|
5
|
+
* timeoutSecs?: number;
|
|
6
|
+
* maxNetworkRetries?: number;
|
|
7
|
+
* }} options
|
|
8
|
+
*/
|
|
9
|
+
constructor({ token, timeoutSecs, maxNetworkRetries }: {
|
|
4
10
|
token: string;
|
|
11
|
+
timeoutSecs?: number;
|
|
12
|
+
maxNetworkRetries?: number;
|
|
5
13
|
});
|
|
6
14
|
/** @readonly */
|
|
7
15
|
readonly customer: CustomerEndpoints;
|
|
@@ -32,20 +40,26 @@ declare class CustomerEndpoints {
|
|
|
32
40
|
});
|
|
33
41
|
/**
|
|
34
42
|
* @param {{ date: string }} params
|
|
35
|
-
* @param {Record<string, any
|
|
43
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
36
44
|
* @returns {Promise<EDResponse>}
|
|
37
45
|
*/
|
|
38
46
|
getUsage({ date }: {
|
|
39
47
|
date: string;
|
|
40
|
-
},
|
|
48
|
+
}, options?: {
|
|
49
|
+
extraParams?: Record<string, any>;
|
|
50
|
+
timeoutSecs?: number;
|
|
51
|
+
}): Promise<EDResponse>;
|
|
41
52
|
/**
|
|
42
53
|
* @param {{ days: number }} params
|
|
43
|
-
* @param {Record<string, any
|
|
54
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
44
55
|
* @returns {Promise<EDResponse>}
|
|
45
56
|
*/
|
|
46
57
|
getUsageHistory({ days }: {
|
|
47
58
|
days: number;
|
|
48
|
-
},
|
|
59
|
+
}, options?: {
|
|
60
|
+
extraParams?: Record<string, any>;
|
|
61
|
+
timeoutSecs?: number;
|
|
62
|
+
}): Promise<EDResponse>;
|
|
49
63
|
#private;
|
|
50
64
|
}
|
|
51
65
|
declare class TiktokEndpoints {
|
|
@@ -55,13 +69,16 @@ declare class TiktokEndpoints {
|
|
|
55
69
|
});
|
|
56
70
|
/**
|
|
57
71
|
* @param {{ hashtag: string; cursor?: number }} params
|
|
58
|
-
* @param {Record<string, any
|
|
72
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
59
73
|
* @returns {Promise<EDResponse>}
|
|
60
74
|
*/
|
|
61
75
|
hashtagSearch({ hashtag, cursor }: {
|
|
62
76
|
hashtag: string;
|
|
63
77
|
cursor?: number;
|
|
64
|
-
},
|
|
78
|
+
}, options?: {
|
|
79
|
+
extraParams?: Record<string, any>;
|
|
80
|
+
timeoutSecs?: number;
|
|
81
|
+
}): Promise<EDResponse>;
|
|
65
82
|
/**
|
|
66
83
|
* @param {{
|
|
67
84
|
* hashtag: string;
|
|
@@ -69,7 +86,7 @@ declare class TiktokEndpoints {
|
|
|
69
86
|
* remapOutput?: boolean;
|
|
70
87
|
* maxCursor?: number;
|
|
71
88
|
* }} params
|
|
72
|
-
* @param {Record<string, any
|
|
89
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
73
90
|
* @returns {Promise<EDResponse>}
|
|
74
91
|
*/
|
|
75
92
|
fullHashtagSearch({ hashtag, days, remapOutput, maxCursor }: {
|
|
@@ -77,29 +94,35 @@ declare class TiktokEndpoints {
|
|
|
77
94
|
days: number;
|
|
78
95
|
remapOutput?: boolean;
|
|
79
96
|
maxCursor?: number;
|
|
80
|
-
},
|
|
97
|
+
}, options?: {
|
|
98
|
+
extraParams?: Record<string, any>;
|
|
99
|
+
timeoutSecs?: number;
|
|
100
|
+
}): Promise<EDResponse>;
|
|
81
101
|
/**
|
|
82
102
|
* @param {{
|
|
83
103
|
* keyword: string;
|
|
84
104
|
* cursor?: number;
|
|
85
105
|
* period: "0" | "1" | "7" | "30" | "90" | "180";
|
|
86
|
-
* sorting
|
|
106
|
+
* sorting?: "0" | "1";
|
|
87
107
|
* country?: string;
|
|
88
108
|
* matchExactly?: boolean;
|
|
89
109
|
* getAuthorStats?: boolean;
|
|
90
110
|
* }} params
|
|
91
|
-
* @param {Record<string, any
|
|
111
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
92
112
|
* @returns {Promise<EDResponse>}
|
|
93
113
|
*/
|
|
94
114
|
keywordSearch({ keyword, cursor, period, sorting, country, matchExactly, getAuthorStats, }: {
|
|
95
115
|
keyword: string;
|
|
96
116
|
cursor?: number;
|
|
97
117
|
period: "0" | "1" | "7" | "30" | "90" | "180";
|
|
98
|
-
sorting
|
|
118
|
+
sorting?: "0" | "1";
|
|
99
119
|
country?: string;
|
|
100
120
|
matchExactly?: boolean;
|
|
101
121
|
getAuthorStats?: boolean;
|
|
102
|
-
},
|
|
122
|
+
}, options?: {
|
|
123
|
+
extraParams?: Record<string, any>;
|
|
124
|
+
timeoutSecs?: number;
|
|
125
|
+
}): Promise<EDResponse>;
|
|
103
126
|
/**
|
|
104
127
|
* @param {{
|
|
105
128
|
* keyword: string;
|
|
@@ -108,7 +131,7 @@ declare class TiktokEndpoints {
|
|
|
108
131
|
* country?: string;
|
|
109
132
|
* matchExactly?: boolean;
|
|
110
133
|
* }} params
|
|
111
|
-
* @param {Record<string, any
|
|
134
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
112
135
|
* @returns {Promise<EDResponse>}
|
|
113
136
|
*/
|
|
114
137
|
fullKeywordSearch({ keyword, period, sorting, country, matchExactly, }: {
|
|
@@ -117,7 +140,10 @@ declare class TiktokEndpoints {
|
|
|
117
140
|
sorting?: "0" | "1";
|
|
118
141
|
country?: string;
|
|
119
142
|
matchExactly?: boolean;
|
|
120
|
-
},
|
|
143
|
+
}, options?: {
|
|
144
|
+
extraParams?: Record<string, any>;
|
|
145
|
+
timeoutSecs?: number;
|
|
146
|
+
}): Promise<EDResponse>;
|
|
121
147
|
/**
|
|
122
148
|
* @param {{
|
|
123
149
|
* username: string;
|
|
@@ -126,7 +152,7 @@ declare class TiktokEndpoints {
|
|
|
126
152
|
* oldestCreatetime?: number;
|
|
127
153
|
* alternativeMethod?: boolean;
|
|
128
154
|
* }} params
|
|
129
|
-
* @param {Record<string, any
|
|
155
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
130
156
|
* @returns {Promise<EDResponse>}
|
|
131
157
|
*/
|
|
132
158
|
userPostsFromUsername({ username, depth, cursor, oldestCreatetime, alternativeMethod, }: {
|
|
@@ -135,7 +161,10 @@ declare class TiktokEndpoints {
|
|
|
135
161
|
cursor?: number;
|
|
136
162
|
oldestCreatetime?: number;
|
|
137
163
|
alternativeMethod?: boolean;
|
|
138
|
-
},
|
|
164
|
+
}, options?: {
|
|
165
|
+
extraParams?: Record<string, any>;
|
|
166
|
+
timeoutSecs?: number;
|
|
167
|
+
}): Promise<EDResponse>;
|
|
139
168
|
/**
|
|
140
169
|
* @param {{
|
|
141
170
|
* secUid: string;
|
|
@@ -144,7 +173,7 @@ declare class TiktokEndpoints {
|
|
|
144
173
|
* oldestCreatetime?: number;
|
|
145
174
|
* alternativeMethod?: boolean;
|
|
146
175
|
* }} params
|
|
147
|
-
* @param {Record<string, any
|
|
176
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
148
177
|
* @returns {Promise<EDResponse>}
|
|
149
178
|
*/
|
|
150
179
|
userPostsFromSecuid({ secUid, depth, cursor, oldestCreatetime, alternativeMethod, }: {
|
|
@@ -153,111 +182,147 @@ declare class TiktokEndpoints {
|
|
|
153
182
|
cursor?: number;
|
|
154
183
|
oldestCreatetime?: number;
|
|
155
184
|
alternativeMethod?: boolean;
|
|
156
|
-
},
|
|
185
|
+
}, options?: {
|
|
186
|
+
extraParams?: Record<string, any>;
|
|
187
|
+
timeoutSecs?: number;
|
|
188
|
+
}): Promise<EDResponse>;
|
|
157
189
|
/**
|
|
158
190
|
* @param {{ username: string }} params
|
|
159
|
-
* @param {Record<string, any
|
|
191
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
160
192
|
* @returns {Promise<EDResponse>}
|
|
161
193
|
*/
|
|
162
194
|
userInfoFromUsername({ username }: {
|
|
163
195
|
username: string;
|
|
164
|
-
},
|
|
196
|
+
}, options?: {
|
|
197
|
+
extraParams?: Record<string, any>;
|
|
198
|
+
timeoutSecs?: number;
|
|
199
|
+
}): Promise<EDResponse>;
|
|
165
200
|
/**
|
|
166
201
|
* @param {{ secUid: string; alternativeMethod?: boolean }} params
|
|
167
|
-
* @param {Record<string, any
|
|
202
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
168
203
|
* @returns {Promise<EDResponse>}
|
|
169
204
|
*/
|
|
170
205
|
userInfoFromSecuid({ secUid, alternativeMethod }: {
|
|
171
206
|
secUid: string;
|
|
172
207
|
alternativeMethod?: boolean;
|
|
173
|
-
},
|
|
208
|
+
}, options?: {
|
|
209
|
+
extraParams?: Record<string, any>;
|
|
210
|
+
timeoutSecs?: number;
|
|
211
|
+
}): Promise<EDResponse>;
|
|
174
212
|
/**
|
|
175
213
|
* @param {{ keyword: string; cursor?: number }} params
|
|
176
|
-
* @param {Record<string, any
|
|
214
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
177
215
|
* @returns {Promise<EDResponse>}
|
|
178
216
|
*/
|
|
179
217
|
userSearch({ keyword, cursor }: {
|
|
180
218
|
keyword: string;
|
|
181
219
|
cursor?: number;
|
|
182
|
-
},
|
|
220
|
+
}, options?: {
|
|
221
|
+
extraParams?: Record<string, any>;
|
|
222
|
+
timeoutSecs?: number;
|
|
223
|
+
}): Promise<EDResponse>;
|
|
183
224
|
/**
|
|
184
225
|
* @param {{ url: string }} params
|
|
185
|
-
* @param {Record<string, any
|
|
226
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
186
227
|
* @returns {Promise<EDResponse>}
|
|
187
228
|
*/
|
|
188
229
|
postInfo({ url }: {
|
|
189
230
|
url: string;
|
|
190
|
-
},
|
|
231
|
+
}, options?: {
|
|
232
|
+
extraParams?: Record<string, any>;
|
|
233
|
+
timeoutSecs?: number;
|
|
234
|
+
}): Promise<EDResponse>;
|
|
191
235
|
/**
|
|
192
236
|
* @param {{ awemeIds: string[] }} params
|
|
193
|
-
* @param {Record<string, any
|
|
237
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
194
238
|
* @returns {Promise<EDResponse>}
|
|
195
239
|
*/
|
|
196
240
|
multiPostInfo({ awemeIds }: {
|
|
197
241
|
awemeIds: string[];
|
|
198
|
-
},
|
|
242
|
+
}, options?: {
|
|
243
|
+
extraParams?: Record<string, any>;
|
|
244
|
+
timeoutSecs?: number;
|
|
245
|
+
}): Promise<EDResponse>;
|
|
199
246
|
/**
|
|
200
247
|
* @param {{ awemeId: string; cursor?: number }} params
|
|
201
|
-
* @param {Record<string, any
|
|
248
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
202
249
|
* @returns {Promise<EDResponse>}
|
|
203
250
|
*/
|
|
204
251
|
postComments({ awemeId, cursor }: {
|
|
205
252
|
awemeId: string;
|
|
206
253
|
cursor?: number;
|
|
207
|
-
},
|
|
254
|
+
}, options?: {
|
|
255
|
+
extraParams?: Record<string, any>;
|
|
256
|
+
timeoutSecs?: number;
|
|
257
|
+
}): Promise<EDResponse>;
|
|
208
258
|
/**
|
|
209
259
|
* @param {{ awemeId: string; commentId: string; cursor?: number }} params
|
|
210
|
-
* @param {Record<string, any
|
|
260
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
211
261
|
* @returns {Promise<EDResponse>}
|
|
212
262
|
*/
|
|
213
263
|
postCommentReplies({ awemeId, commentId, cursor }: {
|
|
214
264
|
awemeId: string;
|
|
215
265
|
commentId: string;
|
|
216
266
|
cursor?: number;
|
|
217
|
-
},
|
|
267
|
+
}, options?: {
|
|
268
|
+
extraParams?: Record<string, any>;
|
|
269
|
+
timeoutSecs?: number;
|
|
270
|
+
}): Promise<EDResponse>;
|
|
218
271
|
/**
|
|
219
272
|
* @param {{
|
|
220
273
|
* keyword: string;
|
|
221
274
|
* cursor?: number;
|
|
222
|
-
* sorting
|
|
223
|
-
* filterBy
|
|
275
|
+
* sorting?: "0" | "1" | "2" | "3" | "4";
|
|
276
|
+
* filterBy?: "0" | "1" | "2";
|
|
224
277
|
* }} params
|
|
225
|
-
* @param {Record<string, any
|
|
278
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
226
279
|
* @returns {Promise<EDResponse>}
|
|
227
280
|
*/
|
|
228
|
-
musicSearch({ keyword, cursor, sorting, filterBy }: {
|
|
281
|
+
musicSearch({ keyword, cursor, sorting, filterBy, }: {
|
|
229
282
|
keyword: string;
|
|
230
283
|
cursor?: number;
|
|
231
|
-
sorting
|
|
232
|
-
filterBy
|
|
233
|
-
},
|
|
284
|
+
sorting?: "0" | "1" | "2" | "3" | "4";
|
|
285
|
+
filterBy?: "0" | "1" | "2";
|
|
286
|
+
}, options?: {
|
|
287
|
+
extraParams?: Record<string, any>;
|
|
288
|
+
timeoutSecs?: number;
|
|
289
|
+
}): Promise<EDResponse>;
|
|
234
290
|
/**
|
|
235
291
|
* @param {{ musicId: string; cursor?: number }} params
|
|
236
|
-
* @param {Record<string, any
|
|
292
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
237
293
|
* @returns {Promise<EDResponse>}
|
|
238
294
|
*/
|
|
239
295
|
musicPosts({ musicId, cursor }: {
|
|
240
296
|
musicId: string;
|
|
241
297
|
cursor?: number;
|
|
242
|
-
},
|
|
298
|
+
}, options?: {
|
|
299
|
+
extraParams?: Record<string, any>;
|
|
300
|
+
timeoutSecs?: number;
|
|
301
|
+
}): Promise<EDResponse>;
|
|
243
302
|
/**
|
|
244
303
|
* @param {{ musicId: string }} params
|
|
245
|
-
* @param {Record<string, any
|
|
304
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
246
305
|
* @returns {Promise<EDResponse>}
|
|
247
306
|
*/
|
|
248
307
|
musicDetails({ musicId }: {
|
|
249
308
|
musicId: string;
|
|
250
|
-
},
|
|
309
|
+
}, options?: {
|
|
310
|
+
extraParams?: Record<string, any>;
|
|
311
|
+
timeoutSecs?: number;
|
|
312
|
+
}): Promise<EDResponse>;
|
|
251
313
|
/**
|
|
252
314
|
* @param {{ id: string; secUid: string; cursor?: number }} params
|
|
253
|
-
* @param {Record<string, any
|
|
315
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
254
316
|
* @returns {Promise<EDResponse>}
|
|
255
317
|
*/
|
|
256
318
|
userFollowers({ id, secUid, cursor }: {
|
|
257
319
|
id: string;
|
|
258
320
|
secUid: string;
|
|
259
321
|
cursor?: number;
|
|
260
|
-
},
|
|
322
|
+
}, options?: {
|
|
323
|
+
extraParams?: Record<string, any>;
|
|
324
|
+
timeoutSecs?: number;
|
|
325
|
+
}): Promise<EDResponse>;
|
|
261
326
|
/**
|
|
262
327
|
* @param {{
|
|
263
328
|
* id: string;
|
|
@@ -265,7 +330,7 @@ declare class TiktokEndpoints {
|
|
|
265
330
|
* cursor?: number;
|
|
266
331
|
* pageToken?: string;
|
|
267
332
|
* }} params
|
|
268
|
-
* @param {Record<string, any
|
|
333
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
269
334
|
* @returns {Promise<EDResponse>}
|
|
270
335
|
*/
|
|
271
336
|
userFollowings({ id, secUid, cursor, pageToken }: {
|
|
@@ -273,16 +338,22 @@ declare class TiktokEndpoints {
|
|
|
273
338
|
secUid: string;
|
|
274
339
|
cursor?: number;
|
|
275
340
|
pageToken?: string;
|
|
276
|
-
},
|
|
341
|
+
}, options?: {
|
|
342
|
+
extraParams?: Record<string, any>;
|
|
343
|
+
timeoutSecs?: number;
|
|
344
|
+
}): Promise<EDResponse>;
|
|
277
345
|
/**
|
|
278
346
|
* @param {{ secUid: string; cursor?: number }} params
|
|
279
|
-
* @param {Record<string, any
|
|
347
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
280
348
|
* @returns {Promise<EDResponse>}
|
|
281
349
|
*/
|
|
282
350
|
userLikedPosts({ secUid, cursor }: {
|
|
283
351
|
secUid: string;
|
|
284
352
|
cursor?: number;
|
|
285
|
-
},
|
|
353
|
+
}, options?: {
|
|
354
|
+
extraParams?: Record<string, any>;
|
|
355
|
+
timeoutSecs?: number;
|
|
356
|
+
}): Promise<EDResponse>;
|
|
286
357
|
#private;
|
|
287
358
|
}
|
|
288
359
|
declare class YoutubeEndpoints {
|
|
@@ -299,7 +370,7 @@ declare class YoutubeEndpoints {
|
|
|
299
370
|
* sorting?: "relevance" | "time" | "views" | "rating";
|
|
300
371
|
* getAdditionalInfo?: boolean;
|
|
301
372
|
* }} params
|
|
302
|
-
* @param {Record<string, any
|
|
373
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
303
374
|
* @returns {Promise<EDResponse>}
|
|
304
375
|
*/
|
|
305
376
|
keywordSearch({ keyword, depth, cursor, period, sorting, getAdditionalInfo, }: {
|
|
@@ -309,108 +380,144 @@ declare class YoutubeEndpoints {
|
|
|
309
380
|
period?: "overall" | "hour" | "today" | "week" | "month" | "year";
|
|
310
381
|
sorting?: "relevance" | "time" | "views" | "rating";
|
|
311
382
|
getAdditionalInfo?: boolean;
|
|
312
|
-
},
|
|
383
|
+
}, options?: {
|
|
384
|
+
extraParams?: Record<string, any>;
|
|
385
|
+
timeoutSecs?: number;
|
|
386
|
+
}): Promise<EDResponse>;
|
|
313
387
|
/**
|
|
314
388
|
* @param {{ keyword: string }} params
|
|
315
|
-
* @param {Record<string, any
|
|
389
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
316
390
|
* @returns {Promise<EDResponse>}
|
|
317
391
|
*/
|
|
318
392
|
featuredCategoriesSearch({ keyword }: {
|
|
319
393
|
keyword: string;
|
|
320
|
-
},
|
|
394
|
+
}, options?: {
|
|
395
|
+
extraParams?: Record<string, any>;
|
|
396
|
+
timeoutSecs?: number;
|
|
397
|
+
}): Promise<EDResponse>;
|
|
321
398
|
/**
|
|
322
399
|
* @param {{ hashtag: string; depth: number; onlyShorts?: boolean }} params
|
|
323
|
-
* @param {Record<string, any
|
|
400
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
324
401
|
* @returns {Promise<EDResponse>}
|
|
325
402
|
*/
|
|
326
403
|
hashtagSearch({ hashtag, depth, onlyShorts }: {
|
|
327
404
|
hashtag: string;
|
|
328
405
|
depth: number;
|
|
329
406
|
onlyShorts?: boolean;
|
|
330
|
-
},
|
|
407
|
+
}, options?: {
|
|
408
|
+
extraParams?: Record<string, any>;
|
|
409
|
+
timeoutSecs?: number;
|
|
410
|
+
}): Promise<EDResponse>;
|
|
331
411
|
/**
|
|
332
412
|
* @param {{ channelId: string; fromUrl?: boolean }} params
|
|
333
|
-
* @param {Record<string, any
|
|
413
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
334
414
|
* @returns {Promise<EDResponse>}
|
|
335
415
|
*/
|
|
336
416
|
channelDetailedInfo({ channelId, fromUrl }: {
|
|
337
417
|
channelId: string;
|
|
338
418
|
fromUrl?: boolean;
|
|
339
|
-
},
|
|
419
|
+
}, options?: {
|
|
420
|
+
extraParams?: Record<string, any>;
|
|
421
|
+
timeoutSecs?: number;
|
|
422
|
+
}): Promise<EDResponse>;
|
|
340
423
|
/**
|
|
341
424
|
* @param {{ channelId: string; depth: number }} params
|
|
342
|
-
* @param {Record<string, any
|
|
425
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
343
426
|
* @returns {Promise<EDResponse>}
|
|
344
427
|
*/
|
|
345
428
|
channelVideos({ channelId, depth }: {
|
|
346
429
|
channelId: string;
|
|
347
430
|
depth: number;
|
|
348
|
-
},
|
|
431
|
+
}, options?: {
|
|
432
|
+
extraParams?: Record<string, any>;
|
|
433
|
+
timeoutSecs?: number;
|
|
434
|
+
}): Promise<EDResponse>;
|
|
349
435
|
/**
|
|
350
436
|
* @param {{ channelId: string; depth: number }} params
|
|
351
|
-
* @param {Record<string, any
|
|
437
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
352
438
|
* @returns {Promise<EDResponse>}
|
|
353
439
|
*/
|
|
354
440
|
channelShorts({ channelId, depth }: {
|
|
355
441
|
channelId: string;
|
|
356
442
|
depth: number;
|
|
357
|
-
},
|
|
443
|
+
}, options?: {
|
|
444
|
+
extraParams?: Record<string, any>;
|
|
445
|
+
timeoutSecs?: number;
|
|
446
|
+
}): Promise<EDResponse>;
|
|
358
447
|
/**
|
|
359
448
|
* @param {{
|
|
360
449
|
* id: string;
|
|
361
450
|
* alternativeMethod?: boolean;
|
|
362
451
|
* getSubscribersCount?: boolean;
|
|
363
452
|
* }} params
|
|
364
|
-
* @param {Record<string, any
|
|
453
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
365
454
|
* @returns {Promise<EDResponse>}
|
|
366
455
|
*/
|
|
367
456
|
videoDetails({ id, alternativeMethod, getSubscribersCount }: {
|
|
368
457
|
id: string;
|
|
369
458
|
alternativeMethod?: boolean;
|
|
370
459
|
getSubscribersCount?: boolean;
|
|
371
|
-
},
|
|
460
|
+
}, options?: {
|
|
461
|
+
extraParams?: Record<string, any>;
|
|
462
|
+
timeoutSecs?: number;
|
|
463
|
+
}): Promise<EDResponse>;
|
|
372
464
|
/**
|
|
373
465
|
* @param {{ channelId: string }} params
|
|
374
|
-
* @param {Record<string, any
|
|
466
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
375
467
|
* @returns {Promise<EDResponse>}
|
|
376
468
|
*/
|
|
377
469
|
channelSubscribers({ channelId }: {
|
|
378
470
|
channelId: string;
|
|
379
|
-
},
|
|
471
|
+
}, options?: {
|
|
472
|
+
extraParams?: Record<string, any>;
|
|
473
|
+
timeoutSecs?: number;
|
|
474
|
+
}): Promise<EDResponse>;
|
|
380
475
|
/**
|
|
381
476
|
* @param {{ username: string }} params
|
|
382
|
-
* @param {Record<string, any
|
|
477
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
383
478
|
* @returns {Promise<EDResponse>}
|
|
384
479
|
*/
|
|
385
480
|
channelUsernameToId({ username }: {
|
|
386
481
|
username: string;
|
|
387
|
-
},
|
|
482
|
+
}, options?: {
|
|
483
|
+
extraParams?: Record<string, any>;
|
|
484
|
+
timeoutSecs?: number;
|
|
485
|
+
}): Promise<EDResponse>;
|
|
388
486
|
/**
|
|
389
487
|
* @param {{ channelId: string }} params
|
|
390
|
-
* @param {Record<string, any
|
|
488
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
391
489
|
* @returns {Promise<EDResponse>}
|
|
392
490
|
*/
|
|
393
491
|
channelIdToUsername({ channelId }: {
|
|
394
492
|
channelId: string;
|
|
395
|
-
},
|
|
493
|
+
}, options?: {
|
|
494
|
+
extraParams?: Record<string, any>;
|
|
495
|
+
timeoutSecs?: number;
|
|
496
|
+
}): Promise<EDResponse>;
|
|
396
497
|
/**
|
|
397
498
|
* @param {{ musicId: string; depth?: number }} params
|
|
398
|
-
* @param {Record<string, any
|
|
499
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
399
500
|
* @returns {Promise<EDResponse>}
|
|
400
501
|
*/
|
|
401
502
|
musicIdToShorts({ musicId, depth }: {
|
|
402
503
|
musicId: string;
|
|
403
504
|
depth?: number;
|
|
404
|
-
},
|
|
505
|
+
}, options?: {
|
|
506
|
+
extraParams?: Record<string, any>;
|
|
507
|
+
timeoutSecs?: number;
|
|
508
|
+
}): Promise<EDResponse>;
|
|
405
509
|
/**
|
|
406
510
|
* @param {{ id: string; cursor?: string }} params
|
|
407
|
-
* @param {Record<string, any
|
|
511
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
408
512
|
* @returns {Promise<EDResponse>}
|
|
409
513
|
*/
|
|
410
514
|
videoComments({ id, cursor }: {
|
|
411
515
|
id: string;
|
|
412
516
|
cursor?: string;
|
|
413
|
-
},
|
|
517
|
+
}, options?: {
|
|
518
|
+
extraParams?: Record<string, any>;
|
|
519
|
+
timeoutSecs?: number;
|
|
520
|
+
}): Promise<EDResponse>;
|
|
414
521
|
#private;
|
|
415
522
|
}
|
|
416
523
|
declare class InstagramEndpoints {
|
|
@@ -427,7 +534,7 @@ declare class InstagramEndpoints {
|
|
|
427
534
|
* cursor?: string;
|
|
428
535
|
* alternativeMethod?: boolean;
|
|
429
536
|
* }} params
|
|
430
|
-
* @param {Record<string, any
|
|
537
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
431
538
|
* @returns {Promise<EDResponse>}
|
|
432
539
|
*/
|
|
433
540
|
userPosts({ userId, depth, oldestTimestamp, chunkSize, cursor, alternativeMethod, }: {
|
|
@@ -437,39 +544,54 @@ declare class InstagramEndpoints {
|
|
|
437
544
|
chunkSize?: number;
|
|
438
545
|
cursor?: string;
|
|
439
546
|
alternativeMethod?: boolean;
|
|
440
|
-
},
|
|
547
|
+
}, options?: {
|
|
548
|
+
extraParams?: Record<string, any>;
|
|
549
|
+
timeoutSecs?: number;
|
|
550
|
+
}): Promise<EDResponse>;
|
|
441
551
|
/**
|
|
442
552
|
* @param {{ userId: number }} params
|
|
443
|
-
* @param {Record<string, any
|
|
553
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
444
554
|
* @returns {Promise<EDResponse>}
|
|
445
555
|
*/
|
|
446
556
|
userBasicStats({ userId }: {
|
|
447
557
|
userId: number;
|
|
448
|
-
},
|
|
558
|
+
}, options?: {
|
|
559
|
+
extraParams?: Record<string, any>;
|
|
560
|
+
timeoutSecs?: number;
|
|
561
|
+
}): Promise<EDResponse>;
|
|
449
562
|
/**
|
|
450
563
|
* @param {{ username: string }} params
|
|
451
|
-
* @param {Record<string, any
|
|
564
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
452
565
|
* @returns {Promise<EDResponse>}
|
|
453
566
|
*/
|
|
454
567
|
userInfo({ username }: {
|
|
455
568
|
username: string;
|
|
456
|
-
},
|
|
569
|
+
}, options?: {
|
|
570
|
+
extraParams?: Record<string, any>;
|
|
571
|
+
timeoutSecs?: number;
|
|
572
|
+
}): Promise<EDResponse>;
|
|
457
573
|
/**
|
|
458
574
|
* @param {{ username: string }} params
|
|
459
|
-
* @param {Record<string, any
|
|
575
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
460
576
|
* @returns {Promise<EDResponse>}
|
|
461
577
|
*/
|
|
462
578
|
userDetailedInfo({ username }: {
|
|
463
579
|
username: string;
|
|
464
|
-
},
|
|
580
|
+
}, options?: {
|
|
581
|
+
extraParams?: Record<string, any>;
|
|
582
|
+
timeoutSecs?: number;
|
|
583
|
+
}): Promise<EDResponse>;
|
|
465
584
|
/**
|
|
466
585
|
* @param {{ userId: number }} params
|
|
467
|
-
* @param {Record<string, any
|
|
586
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
468
587
|
* @returns {Promise<EDResponse>}
|
|
469
588
|
*/
|
|
470
589
|
userFollowers({ userId }: {
|
|
471
590
|
userId: number;
|
|
472
|
-
},
|
|
591
|
+
}, options?: {
|
|
592
|
+
extraParams?: Record<string, any>;
|
|
593
|
+
timeoutSecs?: number;
|
|
594
|
+
}): Promise<EDResponse>;
|
|
473
595
|
/**
|
|
474
596
|
* @param {{
|
|
475
597
|
* userId: number;
|
|
@@ -479,7 +601,7 @@ declare class InstagramEndpoints {
|
|
|
479
601
|
* cursor?: string;
|
|
480
602
|
* chunkSize?: number;
|
|
481
603
|
* }} params
|
|
482
|
-
* @param {Record<string, any
|
|
604
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
483
605
|
* @returns {Promise<EDResponse>}
|
|
484
606
|
*/
|
|
485
607
|
userReels({ userId, depth, includeFeedVideo, oldestTimestamp, cursor, chunkSize, }: {
|
|
@@ -489,26 +611,35 @@ declare class InstagramEndpoints {
|
|
|
489
611
|
oldestTimestamp?: number;
|
|
490
612
|
cursor?: string;
|
|
491
613
|
chunkSize?: number;
|
|
492
|
-
},
|
|
614
|
+
}, options?: {
|
|
615
|
+
extraParams?: Record<string, any>;
|
|
616
|
+
timeoutSecs?: number;
|
|
617
|
+
}): Promise<EDResponse>;
|
|
493
618
|
/**
|
|
494
619
|
* @param {{ userId: number; cursor?: string; chunkSize?: number }} params
|
|
495
|
-
* @param {Record<string, any
|
|
620
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
496
621
|
* @returns {Promise<EDResponse>}
|
|
497
622
|
*/
|
|
498
623
|
userTaggedPosts({ userId, cursor, chunkSize }: {
|
|
499
624
|
userId: number;
|
|
500
625
|
cursor?: string;
|
|
501
626
|
chunkSize?: number;
|
|
502
|
-
},
|
|
627
|
+
}, options?: {
|
|
628
|
+
extraParams?: Record<string, any>;
|
|
629
|
+
timeoutSecs?: number;
|
|
630
|
+
}): Promise<EDResponse>;
|
|
503
631
|
/**
|
|
504
632
|
* @param {{ code: string; numComments?: number }} params
|
|
505
|
-
* @param {Record<string, any
|
|
633
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
506
634
|
* @returns {Promise<EDResponse>}
|
|
507
635
|
*/
|
|
508
636
|
postInfoAndComments({ code, numComments }: {
|
|
509
637
|
code: string;
|
|
510
638
|
numComments?: number;
|
|
511
|
-
},
|
|
639
|
+
}, options?: {
|
|
640
|
+
extraParams?: Record<string, any>;
|
|
641
|
+
timeoutSecs?: number;
|
|
642
|
+
}): Promise<EDResponse>;
|
|
512
643
|
/**
|
|
513
644
|
* @param {{
|
|
514
645
|
* hashtag: string;
|
|
@@ -517,7 +648,7 @@ declare class InstagramEndpoints {
|
|
|
517
648
|
* getAuthorInfo?: boolean;
|
|
518
649
|
* alternativeMethod?: boolean;
|
|
519
650
|
* }} params
|
|
520
|
-
* @param {Record<string, any
|
|
651
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
521
652
|
* @returns {Promise<EDResponse>}
|
|
522
653
|
*/
|
|
523
654
|
hashtagPosts({ hashtag, cursor, chunkSize, getAuthorInfo, alternativeMethod, }: {
|
|
@@ -526,24 +657,33 @@ declare class InstagramEndpoints {
|
|
|
526
657
|
chunkSize?: number;
|
|
527
658
|
getAuthorInfo?: boolean;
|
|
528
659
|
alternativeMethod?: boolean;
|
|
529
|
-
},
|
|
660
|
+
}, options?: {
|
|
661
|
+
extraParams?: Record<string, any>;
|
|
662
|
+
timeoutSecs?: number;
|
|
663
|
+
}): Promise<EDResponse>;
|
|
530
664
|
/**
|
|
531
665
|
* @param {{ musicId: string; cursor?: string }} params
|
|
532
|
-
* @param {Record<string, any
|
|
666
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
533
667
|
* @returns {Promise<EDResponse>}
|
|
534
668
|
*/
|
|
535
669
|
musicPosts({ musicId, cursor }: {
|
|
536
670
|
musicId: string;
|
|
537
671
|
cursor?: string;
|
|
538
|
-
},
|
|
672
|
+
}, options?: {
|
|
673
|
+
extraParams?: Record<string, any>;
|
|
674
|
+
timeoutSecs?: number;
|
|
675
|
+
}): Promise<EDResponse>;
|
|
539
676
|
/**
|
|
540
677
|
* @param {{ text: string }} params
|
|
541
|
-
* @param {Record<string, any
|
|
678
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
542
679
|
* @returns {Promise<EDResponse>}
|
|
543
680
|
*/
|
|
544
681
|
search({ text }: {
|
|
545
682
|
text: string;
|
|
546
|
-
},
|
|
683
|
+
}, options?: {
|
|
684
|
+
extraParams?: Record<string, any>;
|
|
685
|
+
timeoutSecs?: number;
|
|
686
|
+
}): Promise<EDResponse>;
|
|
547
687
|
#private;
|
|
548
688
|
}
|
|
549
689
|
declare class TwitchEndpoints {
|
|
@@ -557,22 +697,28 @@ declare class TwitchEndpoints {
|
|
|
557
697
|
* depth: number;
|
|
558
698
|
* type: "videos" | "channels" | "games";
|
|
559
699
|
* }} params
|
|
560
|
-
* @param {Record<string, any
|
|
700
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
561
701
|
* @returns {Promise<EDResponse>}
|
|
562
702
|
*/
|
|
563
703
|
keywordSearch({ keyword, depth, type }: {
|
|
564
704
|
keyword: string;
|
|
565
705
|
depth: number;
|
|
566
706
|
type: "videos" | "channels" | "games";
|
|
567
|
-
},
|
|
707
|
+
}, options?: {
|
|
708
|
+
extraParams?: Record<string, any>;
|
|
709
|
+
timeoutSecs?: number;
|
|
710
|
+
}): Promise<EDResponse>;
|
|
568
711
|
/**
|
|
569
712
|
* @param {{ username: string }} params
|
|
570
|
-
* @param {Record<string, any
|
|
713
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
571
714
|
* @returns {Promise<EDResponse>}
|
|
572
715
|
*/
|
|
573
716
|
userFollowers({ username }: {
|
|
574
717
|
username: string;
|
|
575
|
-
},
|
|
718
|
+
}, options?: {
|
|
719
|
+
extraParams?: Record<string, any>;
|
|
720
|
+
timeoutSecs?: number;
|
|
721
|
+
}): Promise<EDResponse>;
|
|
576
722
|
#private;
|
|
577
723
|
}
|
|
578
724
|
declare class RedditEndpoints {
|
|
@@ -587,7 +733,7 @@ declare class RedditEndpoints {
|
|
|
587
733
|
* period: "hour" | "day" | "week" | "month" | "year" | "all";
|
|
588
734
|
* cursor?: string;
|
|
589
735
|
* }} params
|
|
590
|
-
* @param {Record<string, any
|
|
736
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
591
737
|
* @returns {Promise<EDResponse>}
|
|
592
738
|
*/
|
|
593
739
|
subredditPosts({ name, sort, period, cursor }: {
|
|
@@ -595,16 +741,22 @@ declare class RedditEndpoints {
|
|
|
595
741
|
sort: "hot" | "new" | "top" | "rising";
|
|
596
742
|
period: "hour" | "day" | "week" | "month" | "year" | "all";
|
|
597
743
|
cursor?: string;
|
|
598
|
-
},
|
|
744
|
+
}, options?: {
|
|
745
|
+
extraParams?: Record<string, any>;
|
|
746
|
+
timeoutSecs?: number;
|
|
747
|
+
}): Promise<EDResponse>;
|
|
599
748
|
/**
|
|
600
749
|
* @param {{ id: string; cursor?: string }} params
|
|
601
|
-
* @param {Record<string, any
|
|
750
|
+
* @param {{ extraParams?: Record<string, any>; timeoutSecs?: number }} options
|
|
602
751
|
* @returns {Promise<EDResponse>}
|
|
603
752
|
*/
|
|
604
753
|
postComments({ id, cursor }: {
|
|
605
754
|
id: string;
|
|
606
755
|
cursor?: string;
|
|
607
|
-
},
|
|
756
|
+
}, options?: {
|
|
757
|
+
extraParams?: Record<string, any>;
|
|
758
|
+
timeoutSecs?: number;
|
|
759
|
+
}): Promise<EDResponse>;
|
|
608
760
|
#private;
|
|
609
761
|
}
|
|
610
762
|
import { Requester } from "./requester.js";
|