Skip to content

Fix X timeline pagination minimum - #16

Draft
splits-gerard wants to merge 1 commit into
mainfrom
centaur/fix-twitter-timeline-pagination-1785774648
Draft

Fix X timeline pagination minimum#16
splits-gerard wants to merge 1 commit into
mainfrom
centaur/fix-twitter-timeline-pagination-1785774648

Conversation

@splits-gerard

Copy link
Copy Markdown
Collaborator

Summary

  • enforce X's max_results=5 minimum for user timeline pagination
  • keep returning only the caller-requested number of posts
  • cover both one-post limits and a 59+1 paginated result

Tests

$ uvx ruff format --check tools/comms/twitter/client.py tools/comms/twitter/test_client.py
2 files already formatted

$ uvx ruff check tools/comms/twitter/client.py tools/comms/twitter/test_client.py
All checks passed!

$ uv run --no-project --with pytest --with httpx --with python-dotenv --with typer --with rich pytest tools/comms/twitter -q
..................                                                       [100%]
18 passed in 0.22s

The deployed CLI still reproduces the pre-fix failure for twitter timeline zherring --limit 60 --json: its second request sends max_results=1, and X rejects it because the allowed range is 5–100. Post-fix live verification requires deployment of this change.

Requested from Discord thread.

Prompted by: abram

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