fix(route): mastodon user timeline by acct id route

This commit is contained in:
pseudoyu
2024-09-24 17:41:16 +08:00
parent cc460c4011
commit 1b66070a68
+26 -3
View File
@@ -1,12 +1,35 @@
import { Route } from '@/types';
import { Route, ViewType } from '@/types';
import utils from './utils';
import { config } from '@/config';
import ConfigNotFoundError from '@/errors/types/config-not-found';
export const route: Route = {
path: '/account_id/:site/:account_id/statuses/:only_media?',
name: 'Unknown',
maintainers: ['notofoe'],
categories: ['social-media', 'popular'],
view: ViewType.SocialMedia,
example: '/mastodon/account_id/mas.to/109300507275095341/statuses/false',
parameters: {
site: 'instance address, only domain, no `http://` or `https://` protocol header',
account_id: 'account ID, you can get it from `https://INSTANCE/api/v1/accounts/lookup?acct=USERNAME` api',
only_media: {
description: 'whether only display media content, default to false, any value to true',
options: [
{ value: 'true', label: 'true' },
{ value: 'false', label: 'false' },
],
default: 'false',
},
},
features: {
requireConfig: false,
requirePuppeteer: false,
antiCrawler: false,
supportBT: false,
supportPodcast: false,
supportScihub: false,
},
name: 'User timeline (by account ID)',
maintainers: ['notofoe', 'pseudoyu'],
handler,
};