Add get_transfer() and cancel_transfer() for file transfer monitoring#160
Merged
Merged
Conversation
f96f89f to
ab295ba
Compare
agners
requested changes
Apr 28, 2026
Contributor
Author
|
Pushed c37af23 — Required: |
c37af23 to
4af5699
Compare
agners
requested changes
May 7, 2026
Contributor
agners
left a comment
There was a problem hiding this comment.
This needs rebasing/merge now.
agners
requested changes
May 7, 2026
Exposes GET /api/v1/transfer as get_transfer() -> Transfer | None,
returning None on 204 (no active transfer). Also exposes
DELETE /api/v1/transfer/{id} as cancel_transfer(transfer_id).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4af5699 to
7c42fb0
Compare
Contributor
Author
|
Pushed 7c42fb0:
|
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.
Summary
Adds two methods wrapping the
/api/v1/transferendpoint:get_transfer() -> Transfer | None— returns the active transfer, orNoneon 204 (no transfer in progress)cancel_transfer(transfer_id: int) -> None— stops an active transfer viaDELETE /api/v1/transfer/{id}The
TransferTypedDict covers all fields from the OpenAPI spec. All fields are optional (total=False) since availability varies by transfer state and direction. Theidfield is not in the spec schema but is included as it is needed to callcancel_transfer().Test plan
test_get_transfer— verifies fields from a 200 responsetest_get_transfer_none— verifiesNoneis returned on 204test_cancel_transfer— verifies correct URL is called🤖 Generated with Claude Code