docs: document snapshot and event-manager APIs in README#288
Draft
bluetoothbot wants to merge 1 commit into
Draft
docs: document snapshot and event-manager APIs in README#288bluetoothbot wants to merge 1 commit into
bluetoothbot wants to merge 1 commit into
Conversation
The snapshot helpers (get_snapshot/get_snapshot_uri) and the pull-point and notification event managers are core public features consumed by downstream callers but had no README coverage. Add usage sections for both, with the digest/basic auth and subscription-renewal caveats spelled out.
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.
What: Document the snapshot helpers and the event (pull-point / notification) managers in the README.
Why:
get_snapshot/get_snapshot_uriandcreate_pullpoint_manager/create_notification_managerare core public features — used by downstream callers such as Home Assistant — but the README only covered the constructor and generic service creation. With the code at 100% coverage and every constructor option already documented, these two public API families were the remaining user-facing gap: source-only and invisible to users.How: Added two sections after "Use other services":
get_snapshot(profile_token, basic_auth=...)returning JPEG bytes orNone, the per-profile URI cache, and the digest-vs-basic auth choice.set_synchronization_point→get_service().PullMessages→stop) plus a pointer to the push-based notification manager and itsprocess()parser.Idioms verified against
tests/test_managers.py(set_synchronization_point,get_service,PullMessages).Testing: Docs-only. README.rst parses cleanly through docutils with no warnings/errors.
Quality Report
Changes: 87 files changed, 9610 insertions(+), 1473 deletions(-)
Code scan: 22 issue(s) found
README.rst:61— debug print statementREADME.rst:111— debug print statementREADME.rst:203— debug print statementREADME.rst:217— debug print statementexamples/events.py:20— debug print statementexamples/events.py:24— debug print statementexamples/events.py:25— debug print statementexamples/events.py:27— debug print statementexamples/events.py:29— debug print statementexamples/events.py:62— debug print statementTests: failed (FAILED)
Branch hygiene: clean
Generated by Kōan