feat: add Kobo device sync support and fix device route protection
- Add Kobo sync handler with markup, bookmark, analytics, and initialization endpoints - Add Kobo integration tests and Bruno API test collection - Move device approve/reject routes from public to protected routes - Enhance test infrastructure with DATABASE_URL support and helper functions - Fix device GetDevice handler nil pointer handling - Clean up test reports and session files
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
meta {
|
||||
name: Bookmann Kobo Sync
|
||||
type: collection
|
||||
environment: Bookmann
|
||||
}
|
||||
|
||||
### Kobo Initialization Endpoint
|
||||
|
||||
GET {{baseURL}}/api/sync/kobo/v1/initialization
|
||||
Authorization: Bearer {{koboToken}}
|
||||
x-kobo-device: {"DeviceId":"kobo-clara-test","Model":"Kobo Clara","SerialNumber":"N123456789"}
|
||||
|
||||
{
|
||||
"meta": {
|
||||
"name": "Kobo Initialization",
|
||||
"description": "Initialize Kobo sync by returning device resources and account page"
|
||||
}
|
||||
}
|
||||
|
||||
### Kobo Library Sync Endpoint
|
||||
|
||||
POST {{baseURL}}/api/sync/kobo/markup
|
||||
Authorization: Bearer {{koboToken}}
|
||||
x-kobo-device: {"DeviceId":"kobo-clara-test","Model":"Kobo Clara","SerialNumber":"N123456789"}
|
||||
|
||||
{
|
||||
"ReadingSync": [
|
||||
{
|
||||
"ContentId": "book-uuid-here",
|
||||
"PercentRead": 45.6,
|
||||
"EntitlementId": "entitlement-id",
|
||||
"RemainingTimeMinutes": 120,
|
||||
"LastModified": "2026-01-30T20:00:00Z"
|
||||
}
|
||||
],
|
||||
"BookmarkSync": [
|
||||
{
|
||||
"BookmarkId": "bookmark-id-1",
|
||||
"ContentId": "book-uuid-here",
|
||||
"BookmarkText": "highlighted text here",
|
||||
"BookmarkType": "annotation",
|
||||
"BookmarkTitle": "Chapter 3"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
### Kobo Bookmark Sync Endpoint
|
||||
|
||||
POST {{baseURL}}/api/sync/kobo/bookmark
|
||||
Authorization: Bearer {{koboToken}}
|
||||
x-kobo-device: {"DeviceId":"kobo-clara-test","Model":"Kobo Clara","SerialNumber":"N123456789"}
|
||||
|
||||
{
|
||||
"BookmarkSync": [
|
||||
{
|
||||
"BookmarkId": "bookmark-id-2",
|
||||
"ContentId": "book-uuid-here",
|
||||
"BookmarkText": "This is my note abouts book",
|
||||
"BookmarkType": "bookmark",
|
||||
"BookmarkTitle": "Important note"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
### Kobo Analytics Tests Endpoint
|
||||
|
||||
POST {{baseURL}}/api/sync/kobo/v1/analytics/gettests
|
||||
Authorization: Bearer {{koboToken}}
|
||||
x-kobo-device: {"DeviceId":"kobo-clara-test","Model":"Kobo Clara","SerialNumber":"N123456789"}
|
||||
|
||||
{
|
||||
"ContentId": "book-uuid-here",
|
||||
"ReadingEvent": "Reading",
|
||||
"RemainingTimeMin": 180,
|
||||
"PercentRead": 67.8
|
||||
}
|
||||
Reference in New Issue
Block a user