From 6deb2f57cf9ac96a87f1b8009f790ddd2af466af Mon Sep 17 00:00:00 2001 From: pseudoyu Date: Thu, 12 Dec 2024 13:53:50 +0800 Subject: [PATCH] feat(route/twitter): support twitter list third-party api --- lib/routes/twitter/api/web-api/constants.ts | 2 +- lib/routes/twitter/list.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/routes/twitter/api/web-api/constants.ts b/lib/routes/twitter/api/web-api/constants.ts index ade5b768c35c38..4b3d9880b7a70c 100644 --- a/lib/routes/twitter/api/web-api/constants.ts +++ b/lib/routes/twitter/api/web-api/constants.ts @@ -15,7 +15,7 @@ const graphQLEndpointsPlain = [ const gqlMap = Object.fromEntries(graphQLEndpointsPlain.map((endpoint) => [endpoint.split('/')[3].replace(/V2$|Query$|QueryV2$/, ''), endpoint])); -const thirdPartySupportedAPI = ['UserByScreenName', 'UserByRestId', 'UserTweets', 'UserTweetsAndReplies']; +const thirdPartySupportedAPI = ['UserByScreenName', 'UserByRestId', 'UserTweets', 'UserTweetsAndReplies', 'ListLatestTweetsTimeline']; const gqlFeatureUser = { hidden_profile_subscriptions_enabled: true, diff --git a/lib/routes/twitter/list.ts b/lib/routes/twitter/list.ts index c19e5feec3c6ff..1618f3920668ad 100644 --- a/lib/routes/twitter/list.ts +++ b/lib/routes/twitter/list.ts @@ -13,6 +13,10 @@ export const route: Route = { name: 'TWITTER_AUTH_TOKEN', description: 'Please see above for details.', }, + { + name: 'TWITTER_THIRD_PARTY_API', + description: 'Please see above for details.', + }, ], requirePuppeteer: false, antiCrawler: false,