feat(route): Twitter用户时间线和用户媒体时间线不再需要开发者账户 (#7739)

This commit is contained in:
Howard Yin
2021-10-05 17:40:31 +08:00
committed by GitHub
parent e09393e15d
commit 8875fb127f
16 changed files with 418 additions and 95 deletions
+14 -4
View File
@@ -85,17 +85,27 @@
docs: 'https://docs.rsshub.app/social-media.html#twitter',
source: '/:id',
target: (params) => {
if (params.id !== 'home' && params.id !== 'explore' && params.id !== 'notifications' && params.id !== 'messages' && params.id !== 'explore' && params.id !== 'search') {
if (!['home', 'explore', 'notifications', 'messages', 'explore', 'search'].includes(params.id)) {
return '/twitter/user/:id';
}
},
},
{
title: '用户媒体时间线',
docs: 'https://docs.rsshub.app/social-media.html#twitter',
source: '/:id/media',
target: (params) => {
if (!['home', 'explore', 'notifications', 'messages', 'explore', 'search'].includes(params.id)) {
return '/twitter/media/:id';
}
},
},
{
title: '用户关注时间线',
docs: 'https://docs.rsshub.app/social-media.html#twitter',
source: '/:id',
target: (params) => {
if (params.id !== 'home' && params.id !== 'explore' && params.id !== 'notifications' && params.id !== 'messages' && params.id !== 'explore' && params.id !== 'search') {
if (!['home', 'explore', 'notifications', 'messages', 'explore', 'search'].includes(params.id)) {
return '/twitter/followings/:id';
}
},
@@ -105,7 +115,7 @@
docs: 'https://docs.rsshub.app/social-media.html#twitter',
source: '/:id',
target: (params) => {
if (params.id !== 'home' && params.id !== 'explore' && params.id !== 'notifications' && params.id !== 'messages' && params.id !== 'explore' && params.id !== 'search') {
if (!['home', 'explore', 'notifications', 'messages', 'explore', 'search'].includes(params.id)) {
return '/twitter/likes/:id';
}
},
@@ -115,7 +125,7 @@
docs: 'https://docs.rsshub.app/social-media.html#twitter',
source: '/:id/lists/:name',
target: (params) => {
if (params.id !== 'home' && params.id !== 'explore' && params.id !== 'notifications' && params.id !== 'messages' && params.id !== 'explore' && params.id !== 'search') {
if (!['home', 'explore', 'notifications', 'messages', 'explore', 'search'].includes(params.id)) {
return '/twitter/list/:id/:name';
}
},