Commit Graph
93 Commits
Author SHA1 Message Date
Peter Steinberger 94773c66dc fix: harden home timeline pagination (#31) (thanks @odysseus0) 2026-01-11 11:36:59 +00:00
George Zhang 73b8cff1b2 test: add home timeline API tests
- getHomeTimeline: success, error, API error handling
- getHomeLatestTimeline: success, error handling
- pagination: deduplication across pages

Uses realistic fixture structure based on actual API responses.
2026-01-11 11:35:57 +00:00
Peter Steinberger 6cf177f92f fix: list timeline pagination (#30) (thanks @zheli) 2026-01-11 11:27:46 +00:00
Zhe LiandClaude Sonnet 4.5 803bd25b0c feat: add pagination support to list-timeline command
Adds --all, --max-pages, and --cursor options to list-timeline command, enabling users to fetch all tweets from a list through automatic pagination. Follows the same pattern as bookmarks pagination for consistency.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
2026-01-11 11:17:27 +00:00
Peter Steinberger 0a4699711f fix: sanitize hyperlink OSC output (#29) (thanks @mafulafunk) 2026-01-11 11:11:21 +00:00
Martin FunkandClaude Opus 4.5 837b09fcad feat: add clickable hyperlinks for URLs in terminal output
Use OSC 8 escape sequences to make tweet and list URLs clickable
in supported terminals (iTerm2, Ghostty, Kitty, WezTerm, VS Code, etc.).

- Add hyperlink() helper function in output.ts
- Apply hyperlinks in printTweets() for tweet URLs
- Apply hyperlinks in printLists() for list URLs
- Add hyperlinks flag to OutputConfig (auto-disabled for non-TTY)
- Automatically falls back to plain text in --plain mode or when piped

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
2026-01-11 11:10:34 +00:00
Peter Steinberger e39b430beb test: add users command pagination cases 2026-01-11 11:09:44 +00:00
Peter Steinberger 092be1a782 fix: harden follow pagination output (#28) (thanks @malpern) 2026-01-11 11:02:09 +00:00
Micah AlpernandClaude Opus 4.5 39a477265c feat: add cursor-based pagination for following/followers commands
Add pagination support to `bird following` and `bird followers` commands,
similar to existing pagination in search/bookmarks/likes.

Changes:
- Add `cursor` parameter to `getFollowing()` and `getFollowers()` client methods
- Return `nextCursor` in `FollowingResult` for pagination continuation
- Add `--cursor <cursor>` CLI option for manual pagination
- Add `--all` CLI flag to automatically fetch all pages
- Add `--max-pages <number>` option to limit pages when using --all
- Add input validation for --max-pages (requires --all or --cursor)
- Add deduplication using Set to prevent duplicate users
- Add 1-second delay between pages to avoid overwhelming the API
- Update `-n/--count` description to clarify it's per-page
- Add unit tests for cursor parameter and nextCursor response

Usage examples:
  # Fetch first page (default 20 users)
  bird following

  # Fetch with specific page size
  bird following -n 50

  # Use cursor for next page
  bird following --cursor "CURSOR_FROM_PREVIOUS"

  # Fetch ALL following users automatically (with rate limiting)
  bird following --all --json

  # Limit to first 5 pages
  bird following --all --max-pages 5

  # Same options work for followers
  bird followers --all

Note: REST API fallback does not support cursor pagination.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
2026-01-11 10:59:35 +00:00
Peter Steinberger ad125348d6 test: expand lists feature coverage 2026-01-11 10:58:47 +00:00
Peter Steinberger ad1d5f24cd fix: add lists feature flags (#27) (thanks @zheli) 2026-01-11 10:43:33 +00:00
Peter Steinberger 2e03bd8c07 fix: paginate likes + avoid duplicate loops (#12) (thanks @titouv) 2026-01-11 10:31:47 +00:00
Peter Steinberger 6fbbaebb68 fix: improve unbookmark url handling 2026-01-05 03:51:56 +01:00
Peter Steinberger f5402f2b43 feat: add runtime feature overrides 2026-01-05 01:23:32 +01:00
Peter Steinberger f765955116 fix: stabilize bookmark pagination cursors 2026-01-04 23:42:34 +00:00
Peter Steinberger c4fa04e0b2 feat: include raw tweet data in mapping 2026-01-05 00:30:01 +01:00
Peter Steinberger 3728f7a4f5 test: add mapTweetResult media coverage 2026-01-03 18:40:05 +01:00
Peter Steinberger b83d065907 fix: restore list types and tidy tests 2026-01-03 18:34:32 +01:00
Peter Steinberger d8643ae1d1 fix: improve media extraction 2026-01-03 18:34:32 +01:00
Nikita b4542b2213 test: add comprehensive tests for extractMedia function 2026-01-03 18:34:32 +01:00
Peter Steinberger e537e102e3 fix: normalize list privacy parsing 2026-01-03 16:55:29 +01:00
Harper ReedandClaude Opus 4.5 0e8a1349c5 test(lists): add boundary and fragment tests for extractListId
- Test that 5-digit IDs (minimum length) are accepted
- Test that URLs with fragment identifiers work correctly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
2026-01-03 16:55:29 +01:00
Harper ReedandClaude Opus 4.5 59e827e153 test(lists): improve test coverage and extract list ID parsing
- Extract extractListId to src/lib/extract-list-id.ts with proper tests
- Add json-full/includeRaw test for list timeline
- Add 404 retry tests for getOwnedLists and getListMemberships
- Add tests for skipping invalid list entries and missing owner handling
- Use shared TwitterClientPrivate type from fixtures

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
2026-01-03 16:55:29 +01:00
Harper ReedandClaude Opus 4.5 7818440d65 feat(lists): add support for Twitter Lists
Add commands to fetch owned lists, list memberships, and list timelines:
- `bird lists` shows lists you own
- `bird lists --member-of` shows lists you're a member of
- `bird list-timeline <id-or-url>` fetches tweets from a list

Includes full --json and --json-full support for list timeline output.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
2026-01-03 16:55:29 +01:00
Peter Steinberger 3db3aca0a0 style: lint fixes 2026-01-03 15:51:49 +01:00
Peter Steinberger b27643edbb fix: harden bookmark retry handling 2026-01-03 15:51:49 +01:00
Haoli 56ca7b9841 Add paged bookmark export with gating and retries 2026-01-03 15:51:49 +01:00
Peter Steinberger 533db2d210 test: cover json-full timelines 2026-01-03 06:59:47 +01:00
cc-vpsandChristian Catalan 3815ebfa03 feat: add --json-full flag to include raw API response in _raw field
Add a new --json-full flag to tweet-fetching commands that outputs JSON
with an additional _raw field containing the full GraphQL response.

This provides power users access to additional data not exposed in the
curated TweetData interface (media, entities, hashtags, cards, etc.)
while maintaining backward compatibility with --json.

Supported commands:
- read, replies, thread (TweetDetail API)
- search, mentions (SearchTimeline API)
- bookmarks (Bookmarks API)
- likes (Likes API)

Not supported: following, followers (uses mixed GraphQL/REST fallback
with different response structures)

Implementation:
- Add _raw?: GraphqlTweetResult optional field to TweetData type
- Add includeRaw option to mapTweetResult() and parseTweetsFromInstructions()
- Add TweetFetchOptions, SearchFetchOptions, TimelineFetchOptions interfaces
- Update client methods to accept options parameter
- Add --json-full flag to CLI commands
- Update help text to document the new flag
- Add comprehensive test coverage (16 tests)

Co-authored-by: Christian Catalan <[email protected]>
2026-01-03 06:54:36 +01:00
Peter Steinberger a38de2b0a9 fix(following): fallback to internal API 2026-01-01 17:09:36 +01:00
Peter Steinberger 8ae5b9b5d4 test(live): add live CLI suite 2026-01-01 16:53:24 +01:00
Peter Steinberger 1a610c366a fix(followers): fallback to legacy API 2026-01-01 16:53:19 +01:00
Peter Steinberger 5551d5fa66 test(help): cover help output 2026-01-01 16:34:44 +01:00
Peter Steinberger c78be5d1ea chore: fix lint issues 2026-01-01 14:13:32 +01:00
Peter Steinberger f1663c8609 test: split twitter client tests 2026-01-01 14:09:18 +01:00
Peter Steinberger 7a4782ddc4 refactor: split twitter client 2026-01-01 13:58:08 +01:00
Peter Steinberger d8c2181dfb refactor: split cli and library entry 2026-01-01 12:31:02 +01:00
Peter Steinberger d7fd0f94a5 test: expand search pagination coverage 2026-01-01 12:17:52 +01:00
Peter Steinberger 3cca0ee989 fix: paginate search results 2026-01-01 12:15:23 +01:00
Peter Steinberger cfd4045d3e test: cover default cookie timeout 2026-01-01 12:11:39 +01:00
Peter Steinberger 14ad6cf73f fix: allow cookie timeout config 2026-01-01 12:00:02 +01:00
Peter Steinberger 11f8c8cb19 refactor: camelcase user json output 2026-01-01 11:42:36 +01:00
Peter Steinberger f3977509dc style: satisfy formatting in tests 2026-01-01 11:32:41 +01:00
Peter Steinberger 9dccb6a3b9 chore: merge origin/main 2026-01-01 11:31:29 +01:00
Peter Steinberger 97c73e939f test: cover following/followers 2026-01-01 11:25:32 +01:00
Peter Steinberger 9b7dab7643 style: satisfy lint for quote depth 2026-01-01 10:48:34 +01:00
Peter Steinberger 48722d8462 chore: merge origin/main 2026-01-01 10:46:10 +01:00
Peter Steinberger df6b92e39c test: cover quoted tweet depth 2026-01-01 10:45:20 +01:00
Peter Steinberger d1a3d1f289 chore: merge origin/main 2026-01-01 10:00:06 +01:00
Peter Steinberger 1e6dda961d test: cover likes timeline handling 2026-01-01 09:54:53 +01:00