Files
RSSHub/lib/routes/twitter/user.ts
T
Tony d585a87daf fix: allow multiple radar rules per route (#14800)
* fix: allow multiple radar rules per route

* fix: github folder

* feat: add namespace to radar target

* docs: fix types url
2024-03-16 03:28:44 +08:00

44 lines
1.3 KiB
TypeScript

import { Route } from '@/types';
import webApiImpl from './web-api/user';
export const route: Route = {
path: '/user/:id/:routeParams?',
categories: ['social-media'],
example: '/twitter/user/DIYgod',
parameters: {
id: 'username; in particular, if starts with `+`, it will be recognized as a [unique ID](https://github.com/DIYgod/RSSHub/issues/12221), e.g. `+44196397`',
routeParams:
'extra parameters, see the table above; particularly when `routeParams=exclude_replies`, replies are excluded; `routeParams=exclude_rts` excludes retweets,`routeParams=exclude_rts_replies` exclude replies and retweets; for default include all.',
},
features: {
requireConfig: [
{
name: 'TWITTER_USERNAME',
description: '',
},
{
name: 'TWITTER_PASSWORD',
description: '',
},
],
requirePuppeteer: false,
antiCrawler: false,
supportBT: false,
supportPodcast: false,
supportScihub: false,
},
name: 'User timeline',
maintainers: ['DIYgod', 'yindaheng98', 'Rongronggg9'],
handler,
radar: [
{
source: ['twitter.com/:id'],
target: '/user/:id',
},
],
};
async function handler(ctx) {
return await webApiImpl(ctx);
}