Skip to content

Add collection_patch method for updating collection item ratings#143

Merged
bpepple merged 1 commit into
mainfrom
rating-patch
Jul 12, 2026
Merged

Add collection_patch method for updating collection item ratings#143
bpepple merged 1 commit into
mainfrom
rating-patch

Conversation

@bpepple

@bpepple bpepple commented Jul 12, 2026

Copy link
Copy Markdown
Member

Summary

  • Add collection_patch(_id, data) to Session, mirroring the existing creator_patch/series_patch pattern via the generic _patch_resource helper.
  • Add CollectionUpdate (request) and CollectionUpdateResponse (response) schemas in mokkari/schemas/collection.py. These are intentionally lean rather than reusing CollectionRead, since Metron's PATCH response only returns id, rating, and modified — validating against the full read schema would fail on missing required fields.
  • Metron's PATCH endpoint only allows updating the rating field; read-tracking (is_read/date_read) is handled exclusively via the scrobble action, so CollectionUpdate only exposes rating.

Mirrors the creator_patch/series_patch pattern to support Metron's PATCH /collection/{id}/ endpoint, which only allows updating the rating field (read-tracking is handled via the scrobble action).
@bpepple bpepple self-assigned this Jul 12, 2026
@bpepple bpepple added the enhancement New feature or request label Jul 12, 2026
@bpepple
bpepple merged commit 6bb79aa into main Jul 12, 2026
11 checks passed
@bpepple
bpepple deleted the rating-patch branch July 12, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant