docs(media-items,collections,koreader,admin): Beam batch 11 — final backfill
All remaining endpoint docs frontmatter'd: media-item bulk ops + audio surface, collections book-listing/preview, koreader rating/review/stats plugin protocol, hash-conflicts JSON list. Scope call (Claude): resolve_hash_conflict.md DELETED — the resolve POST renders an htmx fragment (renderResolved), a web-admin flow under rule 3; only the GET list is a JSON API. update_media_review skipped by Beam (correct): ratings/upsert_media_review.md already covers the PUT. Registry: 16 entries. koreader rating/review/stats all bind koreaderBookRef (query or body) — odd=half-star rating scale; audio track endpoint serves raw bytes (ServeContent, Range) — response nil. Fixed drift: deleted_annotations doc's secondary restore/purge fences unlabeled (gate validates labeled blocks against the ONE frontmatter route); chapters example labeled. UNVERIFIED: 1 (koreader book-ref fields, push_stats). make test 9/9.
This commit is contained in:
1 parent
18084de7a6
commit
e21e1facde
17 files changed
+515
-6
No files matched your search
@@ -0,0 +1,21 @@
|
||||
---
|
||||
method: GET
|
||||
path: /api/sync/koreader/rating
|
||||
auth: device-token
|
||||
area: koreader
|
||||
---
|
||||
<!-- source: internal/handlers/koreader.go:1715 KOReaderHandler.GetKOReaderRating -->
|
||||
|
||||
# Get KOReader Rating
|
||||
|
||||
Returns the stored rating for a book (koreader device-token auth).
|
||||
|
||||
## Example response
|
||||
|
||||
```json example-response
|
||||
{
|
||||
"rating": 8
|
||||
}
|
||||
```
|
||||
|
||||
When unrated, `rating` is `null`.
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
method: GET
|
||||
path: /api/sync/koreader/review
|
||||
auth: device-token
|
||||
area: koreader
|
||||
---
|
||||
<!-- source: internal/handlers/koreader.go:1783 KOReaderHandler.GetKOReaderReview -->
|
||||
|
||||
# Get KOReader Review
|
||||
|
||||
Returns the raw markdown review for a book.
|
||||
|
||||
## Example response
|
||||
|
||||
```json example-response
|
||||
{
|
||||
"review": "A slow start, but the second act earns it."
|
||||
}
|
||||
```
|
||||
|
||||
When no review exists, `review` is `null`.
|
||||
@@ -0,0 +1,34 @@
|
||||
---
|
||||
method: POST
|
||||
path: /api/sync/koreader/stats
|
||||
auth: device-token
|
||||
area: koreader
|
||||
---
|
||||
<!-- source: internal/handlers/koreader.go:1854 KOReaderHandler.PushKOReaderStats -->
|
||||
|
||||
# Push KOReader Stats
|
||||
|
||||
Pushes cumulative reading seconds for a book; only the delta above the
|
||||
stored watermark becomes a reading_history session.
|
||||
|
||||
## Example request
|
||||
|
||||
```json example-request
|
||||
{
|
||||
"total_seconds": 3600
|
||||
}
|
||||
```
|
||||
|
||||
## Example response
|
||||
|
||||
```json example-response
|
||||
{
|
||||
"total_seconds": 3600,
|
||||
"watermark": 0,
|
||||
"delta_seconds": 3600,
|
||||
"session_recorded": true,
|
||||
"session_seconds": 3600
|
||||
}
|
||||
```
|
||||
|
||||
UNVERIFIED: the request body also carries the koreader book reference fields (md5, title, etc.) used to resolve the book; field set not copied here.
|
||||
@@ -0,0 +1,29 @@
|
||||
---
|
||||
method: POST
|
||||
path: /api/sync/koreader/rating
|
||||
auth: device-token
|
||||
area: koreader
|
||||
---
|
||||
<!-- source: internal/handlers/koreader.go:1740 KOReaderHandler.SetKOReaderRating -->
|
||||
|
||||
# Set KOReader Rating
|
||||
|
||||
Sets (or clears, when rating is 0) the rating for a book.
|
||||
|
||||
## Example request
|
||||
|
||||
```json example-request
|
||||
{
|
||||
"rating": 8
|
||||
}
|
||||
```
|
||||
|
||||
## Example response
|
||||
|
||||
```json example-response
|
||||
{
|
||||
"rating": 8
|
||||
}
|
||||
```
|
||||
|
||||
A rating of 0 clears the stored rating and returns `{"rating": null}`.
|
||||
@@ -0,0 +1,29 @@
|
||||
---
|
||||
method: POST
|
||||
path: /api/sync/koreader/review
|
||||
auth: device-token
|
||||
area: koreader
|
||||
---
|
||||
<!-- source: internal/handlers/koreader.go:1808 KOReaderHandler.SetKOReaderReview -->
|
||||
|
||||
# Set KOReader Review
|
||||
|
||||
Sets (or clears, when empty) the review for a book.
|
||||
|
||||
## Example request
|
||||
|
||||
```json example-request
|
||||
{
|
||||
"review": "A slow start, but the second act earns it."
|
||||
}
|
||||
```
|
||||
|
||||
## Example response
|
||||
|
||||
```json example-response
|
||||
{
|
||||
"review": "A slow start, but the second act earns it."
|
||||
}
|
||||
```
|
||||
|
||||
An empty review clears the stored review and returns `{"review": null}`.
|
||||
Reference in new issue
Block a user