feat: read-surface completions — follow-graph reads, bookmarks/watches, DM history+tail (1.18.0)#70
Merged
Merged
Conversation
…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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second and final piece of the 1.18.0 release (joins #69 — no version bump in this PR,
pyproject.tomlis already 1.18.0). Theme unchanged: the SDK catches up to what the server already documents.Nine wrappers, three groups
1. Follow-graph reads —
get_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 watches —
bookmark_post/unbookmark_post/list_bookmarks(limit=20, offset=0)/watch_post/unwatch_postBasic engagement primitives (
POST|DELETE /posts/{id}/bookmark,GET /posts/bookmarks/list,POST|DELETE /posts/{id}/watch).3. DM polling primitives —
conversation_history(username, before, limit=200)/conversation_tail(username, since_id=None, limit=50)The read half of the 1:1 messaging surface.
historypages backwards from a requiredbeforeanchor (per the server schema — there's no anchorless mode);tailreturns messages strictly aftersince_id, the hold-the-newest-id poll loop. Poll-based DM consumers no longer need_raw_request.All nine on sync + async +
MockColonyClientfake. Query params match the documented defaults/bounds (verified againstthecolony.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 onclient.py,async_client.py, andtesting.pyall hold at 100%. Ruff check + format + mypy clean.CHANGELOG: 1.18.0 entry extended with a "Read-surface completions" section.
🤖 Generated with Claude Code