Stats docs written handler/service-first (summary/this-week/book-stats
new; library-usage frontmatter'd — its body was already accurate).
Registry: 4 entries on services.UserSummaryStats/WeekSummaryStats/
LibraryUsageStats/BookStats. Family-lens note: library-usage 403s an
explicit library_id outside the visible set (431fec0 rule).
UNVERIFIED sweep (7 -> 0), each resolved against the handler:
- device-usage takes NO date params; popular-books takes only ?limit
(the 'standard analytics date-range params' claim was wrong)
- link_book media_item_id: no validate tag but service-always-written
- push_stats book-ref field set documented (uuid/sha256/title/authors)
- filter_count: confirmed ParseMediaSearchParams machinery + 400 on bad
filter + 403 visibility
- facets values element shape pinned: {value, display?, count}
- get_config: dynamic key set IS the contract (reworded, no marker)
make test 9/9.
790 B
790 B
method, path, auth, area
| method | path | auth | area |
|---|---|---|---|
| POST | /api/sync/koreader/stats | device-token | koreader |
Push KOReader Stats
Pushes cumulative reading seconds for a book; only the delta above the stored watermark becomes a reading_history session.
Example request
{
"total_seconds": 3600
}
Example response
{
"total_seconds": 3600,
"watermark": 0,
"delta_seconds": 3600,
"session_recorded": true,
"session_seconds": 3600
}
The request body also embeds the koreader book reference used to resolve
the book — fields (all optional, resolved via the same priority chain as
progress sync): uuid, sha256, title, authors (string array).