Skip to content

feat: add Explore News command#63

Open
ankitranjan7 wants to merge 1 commit into
public-clis:mainfrom
ankitranjan7:feature/explore-news-command
Open

feat: add Explore News command#63
ankitranjan7 wants to merge 1 commit into
public-clis:mainfrom
ankitranjan7:feature/explore-news-command

Conversation

@ankitranjan7

Copy link
Copy Markdown

Summary

Adds a new twitter news command to fetch personalized stories from the X/Twitter Explore > News page.

Changes

  • Adds twitter news with --max, --json, and --yaml support
  • Fetches the Explore page, resolves the News timeline ID, then loads story cards via GenericTimelineById
  • Normalizes story fields such as title, context, query, URL, post count, trend ID, and type
  • Adds fallback GraphQL query IDs for ExplorePage and GenericTimelineById
  • Documents the new command in the README
  • Adds CLI and client unit tests

Verification

  • uv run --project twitter-cli pytest -q
  • uv run --project twitter-cli ruff check .
  • uv run --project twitter-cli python -m py_compile twitter_cli/cli.py twitter_cli/client.py twitter_cli/graphql.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant