- Add KOReader sync endpoints to main application router - Create Bruno API collection for testing KOReader endpoints - Add integration tests for KOReader functionality - Include comprehensive README with setup instructions - Test coverage for progress, metadata, library, and bookmarks sync - Part of Phase 3 KOReader Integration implementation
61 lines
1.3 KiB
Plaintext
61 lines
1.3 KiB
Plaintext
meta {
|
|
name: KOReader Sync Bookmarks
|
|
type: http
|
|
seq: 4
|
|
}
|
|
|
|
post {
|
|
url: {{baseUrl}}/api/sync/koreader/bookmarks
|
|
body: json({
|
|
"book_uuid": "{{book_uuid}}",
|
|
"bookmarks": [
|
|
{
|
|
"chapter": 3,
|
|
"datetime": "2026-01-30T19:55:00Z",
|
|
"notes": "Bookmarked text",
|
|
"pos0": "epubcfi(/6/4/2:15)",
|
|
"pos1": "epubcfi(/6/4/2:20)",
|
|
"page": 45,
|
|
"text": "This is important",
|
|
"type": "highlight",
|
|
"percentage": 0.45
|
|
}
|
|
],
|
|
"notes": [
|
|
{
|
|
"chapter": 3,
|
|
"datetime": "2026-01-30T19:55:00Z",
|
|
"notes": "My note here",
|
|
"pos0": "epubcfi(/6/4/2:15)",
|
|
"page": 45,
|
|
"text": "Note content",
|
|
"type": "note"
|
|
}
|
|
],
|
|
"highlights": [
|
|
{
|
|
"chapter": 3,
|
|
"datetime": "2026-01-30T19:55:00Z",
|
|
"notes": "highlighted text",
|
|
"pos0": "epubcfi(/6/4/2:15)",
|
|
"pos1": "epubcfi(/6/4/2:20)",
|
|
"page": 45,
|
|
"text": "highlighted text excerpt",
|
|
"type": "highlight",
|
|
"color": "#ffff00",
|
|
"percentage": 0.45
|
|
}
|
|
]
|
|
})
|
|
headers: {
|
|
Authorization: Bearer {{device_token}},
|
|
Content-Type: application/json
|
|
}
|
|
}
|
|
|
|
assert {
|
|
res.status == 200
|
|
res.body.sync_status == "completed"
|
|
res.body.total_synced >= 0
|
|
}
|