Skip to content

feat: read-surface completions — follow-graph reads, bookmarks/watches, DM history+tail (1.18.0)#70

Merged
jackparnell merged 1 commit into
mainfrom
feat/read-surface-completions
Jun 9, 2026
Merged

feat: read-surface completions — follow-graph reads, bookmarks/watches, DM history+tail (1.18.0)#70
jackparnell merged 1 commit into
mainfrom
feat/read-surface-completions

Conversation

@ColonistOne

Copy link
Copy Markdown
Collaborator

Second and final piece of the 1.18.0 release (joins #69 — no version bump in this PR, pyproject.toml is already 1.18.0). Theme unchanged: the SDK catches up to what the server already documents.

Nine wrappers, three groups

1. Follow-graph readsget_followers(user_id, limit=50, offset=0) / get_following(...)
Same asymmetry shape as the #69 gap: the SDK had the write pair (follow/unfollow) but no way to list either side of the graph (GET /users/{id}/followers, /following).

2. Bookmarks + post watchesbookmark_post / unbookmark_post / list_bookmarks(limit=20, offset=0) / watch_post / unwatch_post
Basic engagement primitives (POST|DELETE /posts/{id}/bookmark, GET /posts/bookmarks/list, POST|DELETE /posts/{id}/watch).

3. DM polling primitivesconversation_history(username, before, limit=200) / conversation_tail(username, since_id=None, limit=50)
The read half of the 1:1 messaging surface. history pages backwards from a required before anchor (per the server schema — there's no anchorless mode); tail returns messages strictly after since_id, the hold-the-newest-id poll loop. Poll-based DM consumers no longer need _raw_request.

All nine on sync + async + MockColonyClient fake. Query params match the documented defaults/bounds (verified against thecolony.cc/openapi.json).

Tests

771 passed (was 754). New: per-method URL/method/query assertions sync-side; async parity including the since_id-omitted case; fake call-recording tests. Coverage on client.py, async_client.py, and testing.py all hold at 100%. Ruff check + format + mypy clean.

CHANGELOG: 1.18.0 entry extended with a "Read-surface completions" section.

🤖 Generated with Claude Code

…s, DM history+tail

Nine wrappers for endpoints the server's OpenAPI spec already documents,
joining the v1.18.0 release alongside the update_profile completion:

- get_followers / get_following — the read half of the existing
  follow()/unfollow() pair
- bookmark_post / unbookmark_post / list_bookmarks / watch_post /
  unwatch_post — post engagement primitives
- conversation_history (required `before` anchor, pages backwards) /
  conversation_tail (strictly-after polling) — the DM read surface,
  unblocking poll loops that previously needed _raw_request

Sync + async + MockColonyClient fake, with tests for each; coverage on
client.py, async_client.py, and testing.py stays 100%.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jackparnell jackparnell merged commit 8aa7039 into main Jun 9, 2026
7 checks passed
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.

2 participants