Completely rewrites the news command to fetch from multiple Explore tabs (For You, News, Sports, Entertainment) using GenericTimelineById GraphQL API instead of just the ExplorePage initialTimeline. This delivers 15+ AI-curated headlines instead of 3, a 5x improvement in content discovery. Key Changes: - Add GenericTimelineById query ID support with auto-refresh capability - Implement multi-tab fetching with cross-tab headline deduplication - Add CLI flags for granular tab filtering (--for-you, --news-only, --sports, --entertainment, --trending-only) - Fetch from 4 tabs by default (excludes trending to reduce noise) - Add early stopping optimization when count is reached - Handle tab-level errors gracefully without failing entire request Implementation: - Added TIMELINE_IDS constant with base64 timeline identifiers - Created fetchTimelineTab() method for GenericTimelineById requests - Created parseTimelineTabItems() for new response structure - Removed old parseNewsItems() and extractNewsItemsFromInstructions() - Updated all 7 tests to mock GenericTimelineById responses API Changes: - NewsFetchOptions: Added `tabs?: ExploreTab[]` option - ExploreTab type exported for library consumers - Backward compatible - existing code continues to work Documentation: - Added comprehensive "News & Trending" section with examples - Updated command reference with all new flags - Added library usage examples with tab filtering - Updated JSON schema documentation Testing: - All 268 tests passing - Real-world verified: fetches 15+ AI headlines across tabs - Tab filtering verified: --sports, --entertainment, etc all work Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
18 lines
669 B
JSON
18 lines
669 B
JSON
{
|
|
"CreateTweet": "nmdAQXJDxw6-0KKF2on7eA",
|
|
"CreateRetweet": "LFho5rIi4xcKO90p9jwG7A",
|
|
"FavoriteTweet": "lI07N6Otwv1PhnEgXILM7A",
|
|
"DeleteBookmark": "Wlmlj2-xzyS1GN3a6cj-mQ",
|
|
"TweetDetail": "_NvJCnIjOW__EP5-RF197A",
|
|
"SearchTimeline": "6AAys3t42mosm_yTI_QENg",
|
|
"Bookmarks": "RV1g3b8n_SGOHwkqKYSCFw",
|
|
"BookmarkFolderTimeline": "KJIQpsvxrTfRIlbaRIySHQ",
|
|
"Following": "mWYeougg_ocJS2Vr1Vt28w",
|
|
"Followers": "SFYY3WsgwjlXSLlfnEUE4A",
|
|
"Likes": "ETJflBunfqNa1uE1mBPCaw",
|
|
"ExploreSidebar": "lpSN4M6qpimkF4nRFPE3nQ",
|
|
"ExplorePage": "kheAINB_4pzRDqkzG3K-ng",
|
|
"GenericTimelineById": "uGSr7alSjR9v6QJAIaqSKQ",
|
|
"TrendHistory": "Sj4T-jSB9pr0Mxtsc1UKZQ"
|
|
}
|