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
|
||||
auth: jwt
|
||||
area: media-items
|
||||
---
|
||||
<!-- source: internal/handlers/media.go:896 MediaHandler.GetMediaItem -->
|
||||
|
||||
# Get Media Item
|
||||
|
||||
Retrieve details of a specific media item.
|
||||
@@ -26,7 +34,7 @@ Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
|
||||
|
||||
## Response (200 OK)
|
||||
|
||||
```json
|
||||
```json example-response
|
||||
{
|
||||
"id": "uuid",
|
||||
"library_id": "uuid",
|
||||
@@ -39,15 +47,47 @@ Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
|
||||
"cover_image_path": "/path/to/cover.jpg",
|
||||
"series": "Series Name",
|
||||
"series_number": 1,
|
||||
"tags": ["sci-fi", "space opera"],
|
||||
"tags_search": ["sci fi", "space opera"],
|
||||
"contributors": ["Author Name", "ACME CORP."],
|
||||
"contributors_search": ["author name", "acme corp"],
|
||||
"tags": [
|
||||
"sci-fi",
|
||||
"space opera"
|
||||
],
|
||||
"contributors": [
|
||||
"Author Name",
|
||||
"ACME CORP."
|
||||
],
|
||||
"language": "en",
|
||||
"page_count": 350,
|
||||
"genre": "Science Fiction",
|
||||
"copyright_year": 2023,
|
||||
"created_at": "2026-01-31T10:00:00Z"
|
||||
"created_at": "2026-01-31T10:00:00Z",
|
||||
"abridged": null,
|
||||
"age_rating": null,
|
||||
"alternate_info": null,
|
||||
"asin": null,
|
||||
"authors": null,
|
||||
"community_rating": null,
|
||||
"date_published": null,
|
||||
"edition": null,
|
||||
"explicit": null,
|
||||
"format_group": null,
|
||||
"format_mimetype": null,
|
||||
"imprint": null,
|
||||
"is_black_and_white": null,
|
||||
"isbn": null,
|
||||
"library_type_name": null,
|
||||
"manga_type": null,
|
||||
"metadata_notes": null,
|
||||
"narrators": null,
|
||||
"publisher": null,
|
||||
"publishers": null,
|
||||
"reading_direction": null,
|
||||
"scan_information": null,
|
||||
"series_count": null,
|
||||
"story_arc": null,
|
||||
"subtitle": null,
|
||||
"summary": null,
|
||||
"updated_at": null,
|
||||
"volume": null,
|
||||
"web_url": null
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user