ensembledata 0.0.3
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/README.md +135 -0
- package/package.json +28 -0
- package/src/client.js +1010 -0
- package/src/index.js +1 -0
- package/src/requester.js +85 -0
- package/src/utils.js +36 -0
- package/types/client.d.ts +612 -0
- package/types/client.d.ts.map +1 -0
- package/types/index.d.ts +2 -0
- package/types/index.d.ts.map +1 -0
- package/types/requester.d.ts +35 -0
- package/types/requester.d.ts.map +1 -0
- package/types/utils.d.ts +11 -0
- package/types/utils.d.ts.map +1 -0
|
@@ -0,0 +1,612 @@
|
|
|
1
|
+
export class EDClient {
|
|
2
|
+
/** @param {{ token: string }} options */
|
|
3
|
+
constructor({ token }: {
|
|
4
|
+
token: string;
|
|
5
|
+
});
|
|
6
|
+
/** @readonly */
|
|
7
|
+
readonly customer: CustomerEndpoints;
|
|
8
|
+
/** @readonly */
|
|
9
|
+
readonly tiktok: TiktokEndpoints;
|
|
10
|
+
/** @readonly */
|
|
11
|
+
readonly youtube: YoutubeEndpoints;
|
|
12
|
+
/** @readonly */
|
|
13
|
+
readonly instagram: InstagramEndpoints;
|
|
14
|
+
/** @readonly */
|
|
15
|
+
readonly twitch: TwitchEndpoints;
|
|
16
|
+
/** @readonly */
|
|
17
|
+
readonly reddit: RedditEndpoints;
|
|
18
|
+
/**
|
|
19
|
+
* @param {string} path
|
|
20
|
+
* @param {Record<string, string>} params
|
|
21
|
+
* @returns {Promise<EDResponse>}
|
|
22
|
+
*/
|
|
23
|
+
request(path: string, params: Record<string, string>): Promise<EDResponse>;
|
|
24
|
+
#private;
|
|
25
|
+
}
|
|
26
|
+
export type EDResponse = import("./requester").EDResponse;
|
|
27
|
+
/** @typedef {import("./requester").EDResponse} EDResponse */
|
|
28
|
+
declare class CustomerEndpoints {
|
|
29
|
+
/** @param {{ requester: Requester }} options */
|
|
30
|
+
constructor({ requester }: {
|
|
31
|
+
requester: Requester;
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* @param {{ date: string }} params
|
|
35
|
+
* @param {Record<string, any>} extraParams
|
|
36
|
+
* @returns {Promise<EDResponse>}
|
|
37
|
+
*/
|
|
38
|
+
getUsage({ date }: {
|
|
39
|
+
date: string;
|
|
40
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
41
|
+
/**
|
|
42
|
+
* @param {{ days: number }} params
|
|
43
|
+
* @param {Record<string, any>} extraParams
|
|
44
|
+
* @returns {Promise<EDResponse>}
|
|
45
|
+
*/
|
|
46
|
+
getUsageHistory({ days }: {
|
|
47
|
+
days: number;
|
|
48
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
49
|
+
#private;
|
|
50
|
+
}
|
|
51
|
+
declare class TiktokEndpoints {
|
|
52
|
+
/** @param {{ requester: Requester }} options */
|
|
53
|
+
constructor({ requester }: {
|
|
54
|
+
requester: Requester;
|
|
55
|
+
});
|
|
56
|
+
/**
|
|
57
|
+
* @param {{ hashtag: string; cursor?: number }} params
|
|
58
|
+
* @param {Record<string, any>} extraParams
|
|
59
|
+
* @returns {Promise<EDResponse>}
|
|
60
|
+
*/
|
|
61
|
+
hashtagSearch({ hashtag, cursor }: {
|
|
62
|
+
hashtag: string;
|
|
63
|
+
cursor?: number;
|
|
64
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
65
|
+
/**
|
|
66
|
+
* @param {{
|
|
67
|
+
* hashtag: string;
|
|
68
|
+
* days: number;
|
|
69
|
+
* remapOutput?: boolean;
|
|
70
|
+
* maxCursor?: number;
|
|
71
|
+
* }} params
|
|
72
|
+
* @param {Record<string, any>} extraParams
|
|
73
|
+
* @returns {Promise<EDResponse>}
|
|
74
|
+
*/
|
|
75
|
+
fullHashtagSearch({ hashtag, days, remapOutput, maxCursor }: {
|
|
76
|
+
hashtag: string;
|
|
77
|
+
days: number;
|
|
78
|
+
remapOutput?: boolean;
|
|
79
|
+
maxCursor?: number;
|
|
80
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
81
|
+
/**
|
|
82
|
+
* @param {{
|
|
83
|
+
* keyword: string;
|
|
84
|
+
* cursor?: number;
|
|
85
|
+
* period: "0" | "1" | "7" | "30" | "90" | "180";
|
|
86
|
+
* sorting: "0" | "1";
|
|
87
|
+
* country?: string;
|
|
88
|
+
* matchExactly?: boolean;
|
|
89
|
+
* getAuthorStats?: boolean;
|
|
90
|
+
* }} params
|
|
91
|
+
* @param {Record<string, any>} extraParams
|
|
92
|
+
* @returns {Promise<EDResponse>}
|
|
93
|
+
*/
|
|
94
|
+
keywordSearch({ keyword, cursor, period, sorting, country, matchExactly, getAuthorStats, }: {
|
|
95
|
+
keyword: string;
|
|
96
|
+
cursor?: number;
|
|
97
|
+
period: "0" | "1" | "7" | "30" | "90" | "180";
|
|
98
|
+
sorting: "0" | "1";
|
|
99
|
+
country?: string;
|
|
100
|
+
matchExactly?: boolean;
|
|
101
|
+
getAuthorStats?: boolean;
|
|
102
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
103
|
+
/**
|
|
104
|
+
* @param {{
|
|
105
|
+
* keyword: string;
|
|
106
|
+
* period: "0" | "1" | "7" | "30" | "90" | "180";
|
|
107
|
+
* sorting?: "0" | "1";
|
|
108
|
+
* country?: string;
|
|
109
|
+
* matchExactly?: boolean;
|
|
110
|
+
* }} params
|
|
111
|
+
* @param {Record<string, any>} extraParams
|
|
112
|
+
* @returns {Promise<EDResponse>}
|
|
113
|
+
*/
|
|
114
|
+
fullKeywordSearch({ keyword, period, sorting, country, matchExactly, }: {
|
|
115
|
+
keyword: string;
|
|
116
|
+
period: "0" | "1" | "7" | "30" | "90" | "180";
|
|
117
|
+
sorting?: "0" | "1";
|
|
118
|
+
country?: string;
|
|
119
|
+
matchExactly?: boolean;
|
|
120
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
121
|
+
/**
|
|
122
|
+
* @param {{
|
|
123
|
+
* username: string;
|
|
124
|
+
* depth: number;
|
|
125
|
+
* cursor?: number;
|
|
126
|
+
* oldestCreatetime?: number;
|
|
127
|
+
* alternativeMethod?: boolean;
|
|
128
|
+
* }} params
|
|
129
|
+
* @param {Record<string, any>} extraParams
|
|
130
|
+
* @returns {Promise<EDResponse>}
|
|
131
|
+
*/
|
|
132
|
+
userPostsFromUsername({ username, depth, cursor, oldestCreatetime, alternativeMethod, }: {
|
|
133
|
+
username: string;
|
|
134
|
+
depth: number;
|
|
135
|
+
cursor?: number;
|
|
136
|
+
oldestCreatetime?: number;
|
|
137
|
+
alternativeMethod?: boolean;
|
|
138
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
139
|
+
/**
|
|
140
|
+
* @param {{
|
|
141
|
+
* secUid: string;
|
|
142
|
+
* depth: number;
|
|
143
|
+
* cursor?: number;
|
|
144
|
+
* oldestCreatetime?: number;
|
|
145
|
+
* alternativeMethod?: boolean;
|
|
146
|
+
* }} params
|
|
147
|
+
* @param {Record<string, any>} extraParams
|
|
148
|
+
* @returns {Promise<EDResponse>}
|
|
149
|
+
*/
|
|
150
|
+
userPostsFromSecuid({ secUid, depth, cursor, oldestCreatetime, alternativeMethod, }: {
|
|
151
|
+
secUid: string;
|
|
152
|
+
depth: number;
|
|
153
|
+
cursor?: number;
|
|
154
|
+
oldestCreatetime?: number;
|
|
155
|
+
alternativeMethod?: boolean;
|
|
156
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
157
|
+
/**
|
|
158
|
+
* @param {{ username: string }} params
|
|
159
|
+
* @param {Record<string, any>} extraParams
|
|
160
|
+
* @returns {Promise<EDResponse>}
|
|
161
|
+
*/
|
|
162
|
+
userInfoFromUsername({ username }: {
|
|
163
|
+
username: string;
|
|
164
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
165
|
+
/**
|
|
166
|
+
* @param {{ secUid: string; alternativeMethod?: boolean }} params
|
|
167
|
+
* @param {Record<string, any>} extraParams
|
|
168
|
+
* @returns {Promise<EDResponse>}
|
|
169
|
+
*/
|
|
170
|
+
userInfoFromSecuid({ secUid, alternativeMethod }: {
|
|
171
|
+
secUid: string;
|
|
172
|
+
alternativeMethod?: boolean;
|
|
173
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
174
|
+
/**
|
|
175
|
+
* @param {{ keyword: string; cursor?: number }} params
|
|
176
|
+
* @param {Record<string, any>} extraParams
|
|
177
|
+
* @returns {Promise<EDResponse>}
|
|
178
|
+
*/
|
|
179
|
+
userSearch({ keyword, cursor }: {
|
|
180
|
+
keyword: string;
|
|
181
|
+
cursor?: number;
|
|
182
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
183
|
+
/**
|
|
184
|
+
* @param {{ url: string }} params
|
|
185
|
+
* @param {Record<string, any>} extraParams
|
|
186
|
+
* @returns {Promise<EDResponse>}
|
|
187
|
+
*/
|
|
188
|
+
postInfo({ url }: {
|
|
189
|
+
url: string;
|
|
190
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
191
|
+
/**
|
|
192
|
+
* @param {{ awemeIds: string[] }} params
|
|
193
|
+
* @param {Record<string, any>} extraParams
|
|
194
|
+
* @returns {Promise<EDResponse>}
|
|
195
|
+
*/
|
|
196
|
+
multiPostInfo({ awemeIds }: {
|
|
197
|
+
awemeIds: string[];
|
|
198
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
199
|
+
/**
|
|
200
|
+
* @param {{ awemeId: string; cursor?: number }} params
|
|
201
|
+
* @param {Record<string, any>} extraParams
|
|
202
|
+
* @returns {Promise<EDResponse>}
|
|
203
|
+
*/
|
|
204
|
+
postComments({ awemeId, cursor }: {
|
|
205
|
+
awemeId: string;
|
|
206
|
+
cursor?: number;
|
|
207
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
208
|
+
/**
|
|
209
|
+
* @param {{ awemeId: string; commentId: string; cursor?: number }} params
|
|
210
|
+
* @param {Record<string, any>} extraParams
|
|
211
|
+
* @returns {Promise<EDResponse>}
|
|
212
|
+
*/
|
|
213
|
+
postCommentReplies({ awemeId, commentId, cursor }: {
|
|
214
|
+
awemeId: string;
|
|
215
|
+
commentId: string;
|
|
216
|
+
cursor?: number;
|
|
217
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
218
|
+
/**
|
|
219
|
+
* @param {{
|
|
220
|
+
* keyword: string;
|
|
221
|
+
* cursor?: number;
|
|
222
|
+
* sorting: "0" | "1" | "2" | "3" | "4";
|
|
223
|
+
* filterBy: "0" | "1" | "2";
|
|
224
|
+
* }} params
|
|
225
|
+
* @param {Record<string, any>} extraParams
|
|
226
|
+
* @returns {Promise<EDResponse>}
|
|
227
|
+
*/
|
|
228
|
+
musicSearch({ keyword, cursor, sorting, filterBy }: {
|
|
229
|
+
keyword: string;
|
|
230
|
+
cursor?: number;
|
|
231
|
+
sorting: "0" | "1" | "2" | "3" | "4";
|
|
232
|
+
filterBy: "0" | "1" | "2";
|
|
233
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
234
|
+
/**
|
|
235
|
+
* @param {{ musicId: string; cursor?: number }} params
|
|
236
|
+
* @param {Record<string, any>} extraParams
|
|
237
|
+
* @returns {Promise<EDResponse>}
|
|
238
|
+
*/
|
|
239
|
+
musicPosts({ musicId, cursor }: {
|
|
240
|
+
musicId: string;
|
|
241
|
+
cursor?: number;
|
|
242
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
243
|
+
/**
|
|
244
|
+
* @param {{ musicId: string }} params
|
|
245
|
+
* @param {Record<string, any>} extraParams
|
|
246
|
+
* @returns {Promise<EDResponse>}
|
|
247
|
+
*/
|
|
248
|
+
musicDetails({ musicId }: {
|
|
249
|
+
musicId: string;
|
|
250
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
251
|
+
/**
|
|
252
|
+
* @param {{ id: string; secUid: string; cursor?: number }} params
|
|
253
|
+
* @param {Record<string, any>} extraParams
|
|
254
|
+
* @returns {Promise<EDResponse>}
|
|
255
|
+
*/
|
|
256
|
+
userFollowers({ id, secUid, cursor }: {
|
|
257
|
+
id: string;
|
|
258
|
+
secUid: string;
|
|
259
|
+
cursor?: number;
|
|
260
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
261
|
+
/**
|
|
262
|
+
* @param {{
|
|
263
|
+
* id: string;
|
|
264
|
+
* secUid: string;
|
|
265
|
+
* cursor?: number;
|
|
266
|
+
* pageToken?: string;
|
|
267
|
+
* }} params
|
|
268
|
+
* @param {Record<string, any>} extraParams
|
|
269
|
+
* @returns {Promise<EDResponse>}
|
|
270
|
+
*/
|
|
271
|
+
userFollowings({ id, secUid, cursor, pageToken }: {
|
|
272
|
+
id: string;
|
|
273
|
+
secUid: string;
|
|
274
|
+
cursor?: number;
|
|
275
|
+
pageToken?: string;
|
|
276
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
277
|
+
/**
|
|
278
|
+
* @param {{ secUid: string; cursor?: number }} params
|
|
279
|
+
* @param {Record<string, any>} extraParams
|
|
280
|
+
* @returns {Promise<EDResponse>}
|
|
281
|
+
*/
|
|
282
|
+
userLikedPosts({ secUid, cursor }: {
|
|
283
|
+
secUid: string;
|
|
284
|
+
cursor?: number;
|
|
285
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
286
|
+
#private;
|
|
287
|
+
}
|
|
288
|
+
declare class YoutubeEndpoints {
|
|
289
|
+
/** @param {{ requester: Requester }} options */
|
|
290
|
+
constructor({ requester }: {
|
|
291
|
+
requester: Requester;
|
|
292
|
+
});
|
|
293
|
+
/**
|
|
294
|
+
* @param {{
|
|
295
|
+
* keyword: string;
|
|
296
|
+
* depth: number;
|
|
297
|
+
* cursor?: string;
|
|
298
|
+
* period?: "overall" | "hour" | "today" | "week" | "month" | "year";
|
|
299
|
+
* sorting?: "relevance" | "time" | "views" | "rating";
|
|
300
|
+
* getAdditionalInfo?: boolean;
|
|
301
|
+
* }} params
|
|
302
|
+
* @param {Record<string, any>} extraParams
|
|
303
|
+
* @returns {Promise<EDResponse>}
|
|
304
|
+
*/
|
|
305
|
+
keywordSearch({ keyword, depth, cursor, period, sorting, getAdditionalInfo, }: {
|
|
306
|
+
keyword: string;
|
|
307
|
+
depth: number;
|
|
308
|
+
cursor?: string;
|
|
309
|
+
period?: "overall" | "hour" | "today" | "week" | "month" | "year";
|
|
310
|
+
sorting?: "relevance" | "time" | "views" | "rating";
|
|
311
|
+
getAdditionalInfo?: boolean;
|
|
312
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
313
|
+
/**
|
|
314
|
+
* @param {{ keyword: string }} params
|
|
315
|
+
* @param {Record<string, any>} extraParams
|
|
316
|
+
* @returns {Promise<EDResponse>}
|
|
317
|
+
*/
|
|
318
|
+
featuredCategoriesSearch({ keyword }: {
|
|
319
|
+
keyword: string;
|
|
320
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
321
|
+
/**
|
|
322
|
+
* @param {{ hashtag: string; depth: number; onlyShorts?: boolean }} params
|
|
323
|
+
* @param {Record<string, any>} extraParams
|
|
324
|
+
* @returns {Promise<EDResponse>}
|
|
325
|
+
*/
|
|
326
|
+
hashtagSearch({ hashtag, depth, onlyShorts }: {
|
|
327
|
+
hashtag: string;
|
|
328
|
+
depth: number;
|
|
329
|
+
onlyShorts?: boolean;
|
|
330
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
331
|
+
/**
|
|
332
|
+
* @param {{ channelId: string; fromUrl?: boolean }} params
|
|
333
|
+
* @param {Record<string, any>} extraParams
|
|
334
|
+
* @returns {Promise<EDResponse>}
|
|
335
|
+
*/
|
|
336
|
+
channelDetailedInfo({ channelId, fromUrl }: {
|
|
337
|
+
channelId: string;
|
|
338
|
+
fromUrl?: boolean;
|
|
339
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
340
|
+
/**
|
|
341
|
+
* @param {{ channelId: string; depth: number }} params
|
|
342
|
+
* @param {Record<string, any>} extraParams
|
|
343
|
+
* @returns {Promise<EDResponse>}
|
|
344
|
+
*/
|
|
345
|
+
channelVideos({ channelId, depth }: {
|
|
346
|
+
channelId: string;
|
|
347
|
+
depth: number;
|
|
348
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
349
|
+
/**
|
|
350
|
+
* @param {{ channelId: string; depth: number }} params
|
|
351
|
+
* @param {Record<string, any>} extraParams
|
|
352
|
+
* @returns {Promise<EDResponse>}
|
|
353
|
+
*/
|
|
354
|
+
channelShorts({ channelId, depth }: {
|
|
355
|
+
channelId: string;
|
|
356
|
+
depth: number;
|
|
357
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
358
|
+
/**
|
|
359
|
+
* @param {{
|
|
360
|
+
* id: string;
|
|
361
|
+
* alternativeMethod?: boolean;
|
|
362
|
+
* getSubscribersCount?: boolean;
|
|
363
|
+
* }} params
|
|
364
|
+
* @param {Record<string, any>} extraParams
|
|
365
|
+
* @returns {Promise<EDResponse>}
|
|
366
|
+
*/
|
|
367
|
+
videoDetails({ id, alternativeMethod, getSubscribersCount }: {
|
|
368
|
+
id: string;
|
|
369
|
+
alternativeMethod?: boolean;
|
|
370
|
+
getSubscribersCount?: boolean;
|
|
371
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
372
|
+
/**
|
|
373
|
+
* @param {{ channelId: string }} params
|
|
374
|
+
* @param {Record<string, any>} extraParams
|
|
375
|
+
* @returns {Promise<EDResponse>}
|
|
376
|
+
*/
|
|
377
|
+
channelSubscribers({ channelId }: {
|
|
378
|
+
channelId: string;
|
|
379
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
380
|
+
/**
|
|
381
|
+
* @param {{ username: string }} params
|
|
382
|
+
* @param {Record<string, any>} extraParams
|
|
383
|
+
* @returns {Promise<EDResponse>}
|
|
384
|
+
*/
|
|
385
|
+
channelUsernameToId({ username }: {
|
|
386
|
+
username: string;
|
|
387
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
388
|
+
/**
|
|
389
|
+
* @param {{ channelId: string }} params
|
|
390
|
+
* @param {Record<string, any>} extraParams
|
|
391
|
+
* @returns {Promise<EDResponse>}
|
|
392
|
+
*/
|
|
393
|
+
channelIdToUsername({ channelId }: {
|
|
394
|
+
channelId: string;
|
|
395
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
396
|
+
/**
|
|
397
|
+
* @param {{ musicId: string; depth?: number }} params
|
|
398
|
+
* @param {Record<string, any>} extraParams
|
|
399
|
+
* @returns {Promise<EDResponse>}
|
|
400
|
+
*/
|
|
401
|
+
musicIdToShorts({ musicId, depth }: {
|
|
402
|
+
musicId: string;
|
|
403
|
+
depth?: number;
|
|
404
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
405
|
+
/**
|
|
406
|
+
* @param {{ id: string; cursor?: string }} params
|
|
407
|
+
* @param {Record<string, any>} extraParams
|
|
408
|
+
* @returns {Promise<EDResponse>}
|
|
409
|
+
*/
|
|
410
|
+
videoComments({ id, cursor }: {
|
|
411
|
+
id: string;
|
|
412
|
+
cursor?: string;
|
|
413
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
414
|
+
#private;
|
|
415
|
+
}
|
|
416
|
+
declare class InstagramEndpoints {
|
|
417
|
+
/** @param {{ requester: Requester }} options */
|
|
418
|
+
constructor({ requester }: {
|
|
419
|
+
requester: Requester;
|
|
420
|
+
});
|
|
421
|
+
/**
|
|
422
|
+
* @param {{
|
|
423
|
+
* userId: number;
|
|
424
|
+
* depth: number;
|
|
425
|
+
* oldestTimestamp?: number;
|
|
426
|
+
* chunkSize?: number;
|
|
427
|
+
* cursor?: string;
|
|
428
|
+
* alternativeMethod?: boolean;
|
|
429
|
+
* }} params
|
|
430
|
+
* @param {Record<string, any>} extraParams
|
|
431
|
+
* @returns {Promise<EDResponse>}
|
|
432
|
+
*/
|
|
433
|
+
userPosts({ userId, depth, oldestTimestamp, chunkSize, cursor, alternativeMethod, }: {
|
|
434
|
+
userId: number;
|
|
435
|
+
depth: number;
|
|
436
|
+
oldestTimestamp?: number;
|
|
437
|
+
chunkSize?: number;
|
|
438
|
+
cursor?: string;
|
|
439
|
+
alternativeMethod?: boolean;
|
|
440
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
441
|
+
/**
|
|
442
|
+
* @param {{ userId: number }} params
|
|
443
|
+
* @param {Record<string, any>} extraParams
|
|
444
|
+
* @returns {Promise<EDResponse>}
|
|
445
|
+
*/
|
|
446
|
+
userBasicStats({ userId }: {
|
|
447
|
+
userId: number;
|
|
448
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
449
|
+
/**
|
|
450
|
+
* @param {{ username: string }} params
|
|
451
|
+
* @param {Record<string, any>} extraParams
|
|
452
|
+
* @returns {Promise<EDResponse>}
|
|
453
|
+
*/
|
|
454
|
+
userInfo({ username }: {
|
|
455
|
+
username: string;
|
|
456
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
457
|
+
/**
|
|
458
|
+
* @param {{ username: string }} params
|
|
459
|
+
* @param {Record<string, any>} extraParams
|
|
460
|
+
* @returns {Promise<EDResponse>}
|
|
461
|
+
*/
|
|
462
|
+
userDetailedInfo({ username }: {
|
|
463
|
+
username: string;
|
|
464
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
465
|
+
/**
|
|
466
|
+
* @param {{ userId: number }} params
|
|
467
|
+
* @param {Record<string, any>} extraParams
|
|
468
|
+
* @returns {Promise<EDResponse>}
|
|
469
|
+
*/
|
|
470
|
+
userFollowers({ userId }: {
|
|
471
|
+
userId: number;
|
|
472
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
473
|
+
/**
|
|
474
|
+
* @param {{
|
|
475
|
+
* userId: number;
|
|
476
|
+
* depth: number;
|
|
477
|
+
* includeFeedVideo?: boolean;
|
|
478
|
+
* oldestTimestamp?: number;
|
|
479
|
+
* cursor?: string;
|
|
480
|
+
* chunkSize?: number;
|
|
481
|
+
* }} params
|
|
482
|
+
* @param {Record<string, any>} extraParams
|
|
483
|
+
* @returns {Promise<EDResponse>}
|
|
484
|
+
*/
|
|
485
|
+
userReels({ userId, depth, includeFeedVideo, oldestTimestamp, cursor, chunkSize, }: {
|
|
486
|
+
userId: number;
|
|
487
|
+
depth: number;
|
|
488
|
+
includeFeedVideo?: boolean;
|
|
489
|
+
oldestTimestamp?: number;
|
|
490
|
+
cursor?: string;
|
|
491
|
+
chunkSize?: number;
|
|
492
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
493
|
+
/**
|
|
494
|
+
* @param {{ userId: number; cursor?: string; chunkSize?: number }} params
|
|
495
|
+
* @param {Record<string, any>} extraParams
|
|
496
|
+
* @returns {Promise<EDResponse>}
|
|
497
|
+
*/
|
|
498
|
+
userTaggedPosts({ userId, cursor, chunkSize }: {
|
|
499
|
+
userId: number;
|
|
500
|
+
cursor?: string;
|
|
501
|
+
chunkSize?: number;
|
|
502
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
503
|
+
/**
|
|
504
|
+
* @param {{ code: string; numComments?: number }} params
|
|
505
|
+
* @param {Record<string, any>} extraParams
|
|
506
|
+
* @returns {Promise<EDResponse>}
|
|
507
|
+
*/
|
|
508
|
+
postInfoAndComments({ code, numComments }: {
|
|
509
|
+
code: string;
|
|
510
|
+
numComments?: number;
|
|
511
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
512
|
+
/**
|
|
513
|
+
* @param {{
|
|
514
|
+
* hashtag: string;
|
|
515
|
+
* cursor?: string;
|
|
516
|
+
* chunkSize?: number;
|
|
517
|
+
* getAuthorInfo?: boolean;
|
|
518
|
+
* alternativeMethod?: boolean;
|
|
519
|
+
* }} params
|
|
520
|
+
* @param {Record<string, any>} extraParams
|
|
521
|
+
* @returns {Promise<EDResponse>}
|
|
522
|
+
*/
|
|
523
|
+
hashtagPosts({ hashtag, cursor, chunkSize, getAuthorInfo, alternativeMethod, }: {
|
|
524
|
+
hashtag: string;
|
|
525
|
+
cursor?: string;
|
|
526
|
+
chunkSize?: number;
|
|
527
|
+
getAuthorInfo?: boolean;
|
|
528
|
+
alternativeMethod?: boolean;
|
|
529
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
530
|
+
/**
|
|
531
|
+
* @param {{ musicId: string; cursor?: string }} params
|
|
532
|
+
* @param {Record<string, any>} extraParams
|
|
533
|
+
* @returns {Promise<EDResponse>}
|
|
534
|
+
*/
|
|
535
|
+
musicPosts({ musicId, cursor }: {
|
|
536
|
+
musicId: string;
|
|
537
|
+
cursor?: string;
|
|
538
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
539
|
+
/**
|
|
540
|
+
* @param {{ text: string }} params
|
|
541
|
+
* @param {Record<string, any>} extraParams
|
|
542
|
+
* @returns {Promise<EDResponse>}
|
|
543
|
+
*/
|
|
544
|
+
search({ text }: {
|
|
545
|
+
text: string;
|
|
546
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
547
|
+
#private;
|
|
548
|
+
}
|
|
549
|
+
declare class TwitchEndpoints {
|
|
550
|
+
/** @param {{ requester: Requester }} options */
|
|
551
|
+
constructor({ requester }: {
|
|
552
|
+
requester: Requester;
|
|
553
|
+
});
|
|
554
|
+
/**
|
|
555
|
+
* @param {{
|
|
556
|
+
* keyword: string;
|
|
557
|
+
* depth: number;
|
|
558
|
+
* type: "videos" | "channels" | "games";
|
|
559
|
+
* }} params
|
|
560
|
+
* @param {Record<string, any>} extraParams
|
|
561
|
+
* @returns {Promise<EDResponse>}
|
|
562
|
+
*/
|
|
563
|
+
keywordSearch({ keyword, depth, type }: {
|
|
564
|
+
keyword: string;
|
|
565
|
+
depth: number;
|
|
566
|
+
type: "videos" | "channels" | "games";
|
|
567
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
568
|
+
/**
|
|
569
|
+
* @param {{ username: string }} params
|
|
570
|
+
* @param {Record<string, any>} extraParams
|
|
571
|
+
* @returns {Promise<EDResponse>}
|
|
572
|
+
*/
|
|
573
|
+
userFollowers({ username }: {
|
|
574
|
+
username: string;
|
|
575
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
576
|
+
#private;
|
|
577
|
+
}
|
|
578
|
+
declare class RedditEndpoints {
|
|
579
|
+
/** @param {{ requester: Requester }} options */
|
|
580
|
+
constructor({ requester }: {
|
|
581
|
+
requester: Requester;
|
|
582
|
+
});
|
|
583
|
+
/**
|
|
584
|
+
* @param {{
|
|
585
|
+
* name: string;
|
|
586
|
+
* sort: "hot" | "new" | "top" | "rising";
|
|
587
|
+
* period: "hour" | "day" | "week" | "month" | "year" | "all";
|
|
588
|
+
* cursor?: string;
|
|
589
|
+
* }} params
|
|
590
|
+
* @param {Record<string, any>} extraParams
|
|
591
|
+
* @returns {Promise<EDResponse>}
|
|
592
|
+
*/
|
|
593
|
+
subredditPosts({ name, sort, period, cursor }: {
|
|
594
|
+
name: string;
|
|
595
|
+
sort: "hot" | "new" | "top" | "rising";
|
|
596
|
+
period: "hour" | "day" | "week" | "month" | "year" | "all";
|
|
597
|
+
cursor?: string;
|
|
598
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
599
|
+
/**
|
|
600
|
+
* @param {{ id: string; cursor?: string }} params
|
|
601
|
+
* @param {Record<string, any>} extraParams
|
|
602
|
+
* @returns {Promise<EDResponse>}
|
|
603
|
+
*/
|
|
604
|
+
postComments({ id, cursor }: {
|
|
605
|
+
id: string;
|
|
606
|
+
cursor?: string;
|
|
607
|
+
}, extraParams?: Record<string, any>): Promise<EDResponse>;
|
|
608
|
+
#private;
|
|
609
|
+
}
|
|
610
|
+
import { Requester } from "./requester.js";
|
|
611
|
+
export {};
|
|
612
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.js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sources":["../src/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export class Requester {
|
|
2
|
+
/** @param {{ token: string }} options */
|
|
3
|
+
constructor({ token }: {
|
|
4
|
+
token: string;
|
|
5
|
+
});
|
|
6
|
+
/**
|
|
7
|
+
* @param {string} path
|
|
8
|
+
* @param {Record<string, any>} params
|
|
9
|
+
* @param {boolean} returnTopLevelData
|
|
10
|
+
* @returns {Promise<EDResponse>}
|
|
11
|
+
*/
|
|
12
|
+
get(path: string, params: Record<string, any>, returnTopLevelData?: boolean): Promise<EDResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* @param {Response} response
|
|
15
|
+
* @param {boolean} returnTopLevelData
|
|
16
|
+
* @returns {Promise<EDResponse>}
|
|
17
|
+
*/
|
|
18
|
+
handle_response(response: Response, returnTopLevelData: boolean): Promise<EDResponse>;
|
|
19
|
+
#private;
|
|
20
|
+
}
|
|
21
|
+
export class EDResponse {
|
|
22
|
+
/**
|
|
23
|
+
* @param {number} statusCode
|
|
24
|
+
* @param {any} data
|
|
25
|
+
* @param {number} unitsCharged
|
|
26
|
+
*/
|
|
27
|
+
constructor(statusCode: number, data: any, unitsCharged: number);
|
|
28
|
+
/** @type {number} */
|
|
29
|
+
statusCode: number;
|
|
30
|
+
/** @type {any} */
|
|
31
|
+
data: any;
|
|
32
|
+
/** @type {number} */
|
|
33
|
+
unitsCharged: number;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=requester.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requester.d.ts","sourceRoot":"","sources":["../src/requester.js"],"names":[],"mappings":"AAEA;IAOI,yCAAyC;IACzC,uBADY;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,EAG5B;IAED;;;;;OAKG;IACH,UALW,MAAM,UACN,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,uBACnB,OAAO,GACL,OAAO,CAAC,UAAU,CAAC,CAQ/B;IAED;;;;OAIG;IACH,0BAJW,QAAQ,sBACR,OAAO,GACL,OAAO,CAAC,UAAU,CAAC,CAc/B;;CACJ;AAED;IACI;;;;OAIG;IACH,wBAJW,MAAM,QACN,GAAG,gBACH,MAAM,EAWhB;IARG,qBAAqB;IACrB,YADW,MAAM,CACW;IAE5B,kBAAkB;IAClB,MADW,GAAG,CACE;IAEhB,qBAAqB;IACrB,cADW,MAAM,CACe;CAEvC"}
|
package/types/utils.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {Record<string, any>} obj
|
|
3
|
+
* @returns {Record<string, any>}
|
|
4
|
+
*/
|
|
5
|
+
export function toSnakeCaseObject(obj: Record<string, any>): Record<string, any>;
|
|
6
|
+
/**
|
|
7
|
+
* @param {Record<string, any>} obj
|
|
8
|
+
* @returns {Record<string, any>}
|
|
9
|
+
*/
|
|
10
|
+
export function filterUndefinedValues(obj: Record<string, any>): Record<string, any>;
|
|
11
|
+
//# sourceMappingURL=utils.d.ts.map
|