Files
hoilc 1114f7e157 feat(route): add twitch (#13464)
* add twitch channel

* add video&schedule

* update docs

* update radar

* fix typo

* update router

---------
2023-10-12 21:11:08 +08:00

38 lines
1.3 KiB
JavaScript

module.exports = {
'twitch.tv': {
_name: 'Twitch',
www: [
{
title: 'Live',
docs: 'https://docs.rsshub.app/routes/live#twitch-live',
source: '/:login',
target: (params) => {
if (
params.login !== 'directory' &&
params.login !== 'downloads' &&
params.login !== 'store' &&
params.login !== 'turbo' &&
params.login !== 'search' &&
params.login !== 'subscriptions' &&
params.login !== 'wallet'
) {
return '/twitch/live/:login';
}
},
},
{
title: 'Channel Video',
docs: 'https://docs.rsshub.app/routes/live#twitch-channel-video',
source: '/:login/videos',
target: '/twitch/video/:login',
},
{
title: 'Stream Schedule',
docs: 'https://docs.rsshub.app/routes/live#twitch-stream-schedule',
source: '/:login/schedule',
target: '/twitch/schedule/:login',
},
],
},
};