Repository navigation
docs: fix send_message, CallOptions and rewake samples in the README - #17
Merged
Merged
Conversation
- send_message(content="...") posts a bare string and the server rejects
it (400): the samples now use text= (the SDK wraps it in {"text": ...}).
The file sample uses type="file" + attachment_id= instead of a content
dict with a "type" key the server strips.
- opts={"idempotency_key": ...} raises AttributeError: CallOptions is a
dataclass. The sample imports and passes CallOptions(idempotency_key=...).
- The wake-frame sample notes that "unanswered" wakes come only on a
socket created with capabilities={"rewake": True} (default False).
- The package docstring and the send tests use text= too; the sync test
now asserts the wrapped {"text": ...} body.
1 of 3 tasks
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.
The README samples didn't run as written. Each fix was checked against the SDK and the server.
send_message(content="...")posts a bare string, and the server rejects it with 400. The samples now usetext=, which the SDK wraps as{"text": ...}. The file sample usestype="file"plusattachment_id=instead of a content dict with a"type"key, which the server strips.opts={"idempotency_key": ...}raisesAttributeError, becauseCallOptionsis a dataclass. The sample importsCallOptionsand passesCallOptions(idempotency_key=...).unansweredwakes come only on a socket created withcapabilities={"rewake": True}(off by default).text=too. The sync test now asserts the wrapped{"text": ...}body.No behaviour change in the SDK itself.