docs(media-items core): Beam WO5 batch 4 — 12 endpoints backfilled, registry pinned
Beam backfilled list/get/create/update/delete media-item, search, ratings
CRUD, progress GET/PUT. Beam correctly identified create/update/delete as
jwt+admin (admin group in the router — verified).
Claude registry: 12 entries. Notable pins:
- get_media_item: hand-built ~44-key map pinned verbatim from the handler
- create/update return the full database.MediaItems row (74 columns) —
examples merged up to the real shape via gate-driven merge script
- search returns []SearchMediaItemsRow (sqlc row — Real type pinned)
- rating scale is 1-10 int (odd = half-star); GET returns {rating: null} when
absent; update reuses the create handler (201)
- progress GET: 25 base keys + 4 CONDITIONAL position-authority keys
(css_selector/anchor_href/char_offset/context_text — added by the handler
for convertible formats with a valid CFI); PUT progress binds
sync.SaveProgressRequest and returns database.ReadingProgress
- Beam's examples were missing entirely on 4 files (list/search/progress
GET/PUT) — relabeled existing fences or inserted contract-shaped blocks
Gate-driven merge scripts (object + array variants) brought all examples to
the exact handler key sets. make test 9/9.
This commit is contained in:
1 parent
ae9588f1c6
commit
6f13dc2b63
13 files changed
+486
-34
No files matched your search
@@ -1,3 +1,11 @@
|
||||
---
|
||||
method: GET
|
||||
path: /api/media-items/:id/progress
|
||||
auth: jwt
|
||||
area: media-items
|
||||
---
|
||||
<!-- source: internal/handlers/media.go:1173 MediaHandler.GetMediaReadingProgress -->
|
||||
|
||||
# Get Media Item Progress
|
||||
|
||||
Get the stored reading progress for a media item, plus the
|
||||
@@ -37,7 +45,7 @@ returned (not 404):
|
||||
|
||||
## Response (200 OK) — progress stored
|
||||
|
||||
```json
|
||||
```json example-response
|
||||
{
|
||||
"id": "e8239659-0ed6-42ae-a946-8440d7655b42",
|
||||
"media_item_id": "774641f9-317b-4087-8e04-53bb4392ae56",
|
||||
@@ -59,7 +67,15 @@ returned (not 404):
|
||||
"css_selector": "body>div:nth-child(4)>p:nth-child(29)",
|
||||
"anchor_href": "1984.xhtml",
|
||||
"char_offset": 598,
|
||||
"context_text": "from day to day, but there was none in which Goldstein was not the principal figure. He was the prim"
|
||||
"context_text": "from day to day, but there was none in which Goldstein was not the principal figure. He was the prim",
|
||||
"audio_offset_seconds": null,
|
||||
"panel_number": null,
|
||||
"reading_mode": null,
|
||||
"scroll_position_x": null,
|
||||
"scroll_position_y": null,
|
||||
"viewport_x": null,
|
||||
"viewport_y": null,
|
||||
"zoom_level": null
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user