4 Commits
Author SHA1 Message Date
jackwener f4a36f2358 refactor: fix all code review issues
Bug fixes (P0):
- _extract_cursor: both branches now check cursorType=='Bottom',
  preventing Top cursor from corrupting pagination state
- _api_get: add retry loop with exponential backoff for HTTP 429
  and JSON error code 88 rate limits

Improvements (P1):
- _deep_get: support int keys for list index access
- Extract BEARER_TOKEN/USER_AGENT into constants.py (was duplicated
  in auth.py and client.py)

Code quality (P2):
- fetch_likes: add override_base_variables=True to avoid sending
  latestControlAvailable/requestContext which Likes endpoint rejects
- CLI: extract _fetch_and_display() helper to dedup favorite/likes
- _get_client(): remove useless try/except that re-raised same error
- formatter: remove no-op tweets_to_json wrapper
- _as_int/_as_float: filter.py now imports from config.py

Polish (P3):
- _parse_tweet_result: split into _extract_media + _extract_author
- CLI module docstring: add likes command
- verify_cookies: increase timeout from 3s to 10s
2026-03-07 21:41:33 +08:00
jackwener 4c08d09304 refactor: harden CLI/client/config and centralize serialization 2026-03-05 16:13:54 +08:00
jackwener 7238b932ab feat: add user commands, auto-detect browser, optimize performance
- Add user/user-posts/followers/following commands
- Add UserProfile model and GraphQL API methods
- Add print_user_profile and print_user_table formatters
- Auto-detect browser for cookies (Chrome → Edge → Firefox → Brave)
- Remove --browser option from all commands
- Remove cookie verification (v1.1 endpoints are gone)
- Use hardcoded fallback query IDs first (skip slow JS bundle scan)
- Update FEATURES from latest twitter-openapi config
- Fix user-posts: add required withVoice variable
- Add tweet URL links in feed output
- Add error handling to all user commands
2026-03-05 00:41:26 +08:00
jackwener 16752c3115 Initial commit: twitter-cli v0.1.0 2026-03-04 17:56:42 +08:00