+16
-3
api.js
+16
-3
api.js
···
328
328
}
329
329
330
330
/**
331
+
@typedef
332
+
{'posts_with_replies' | 'posts_no_replies' | 'posts_and_author_threads' | 'posts_with_media' | 'posts_with_video'}
333
+
AuthorFeedFilter
334
+
335
+
Filters:
336
+
- posts_with_replies: posts, replies and reposts (default)
337
+
- posts_no_replies: posts and reposts (no replies)
338
+
- posts_and_author_threads: posts, reposts, and replies in your own threads
339
+
- posts_with_media: posts and replies, but only with images (no reposts)
340
+
- posts_with_video: posts and replies, but only with videos (no reposts)
341
+
*/
342
+
343
+
/**
331
344
* @param {string} did
332
345
* @param {number} days
333
-
* @param {{ onPageLoad?: FetchAllOnPageLoad }} [options]
346
+
* @param {{ onPageLoad?: FetchAllOnPageLoad, filter: AuthorFeedFilter }} options
334
347
* @returns {Promise<json[]>}
335
348
*/
336
349
337
-
async loadUserTimeline(did, days, options = {}) {
350
+
async loadUserTimeline(did, days, options) {
338
351
let now = new Date();
339
352
let timeLimit = now.getTime() - days * 86400 * 1000;
340
353
341
354
return await this.fetchAll('app.bsky.feed.getAuthorFeed', {
342
355
params: {
343
356
actor: did,
344
-
filter: 'posts_no_replies',
357
+
filter: options.filter,
345
358
limit: 100
346
359
},
347
360
field: 'feed',
+1
like_stats_page.js
+1
like_stats_page.js