Bruno API test updates: - Update test assertions: X-Bookmann-* → X-Bookhoard-* - Update variable names and references in test scripts - Update documentation and comments in API tests This is part 4 of the project rename to Bookhoard.
231 lines
5.9 KiB
Plaintext
231 lines
5.9 KiB
Plaintext
meta {
|
|
name: "Bookhoard Kobo Sync API"
|
|
type: "collection"
|
|
environment: {
|
|
development: {
|
|
base_url: "http://localhost:8765/api"
|
|
},
|
|
production: {
|
|
base_url: "https://your-domain.com/api"
|
|
}
|
|
}
|
|
}
|
|
|
|
# Authentication Headers
|
|
@name("Kobo Device Token")
|
|
@AuthorizationHeader({
|
|
name: "Authorization",
|
|
value: "Bearer {{kobo_device_token}}"
|
|
})
|
|
{
|
|
"token": "{{kobo_device_token}}"
|
|
}
|
|
|
|
@name("Kobo Device Info Header")
|
|
@Request({
|
|
name: "x-kobo-device",
|
|
value: '{"DeviceId":"{{kobo_device_id}}","Model":"Kobo Clara","SerialNumber":"{{kobo_serial}}"}'
|
|
})
|
|
{
|
|
"test": "data"
|
|
}
|
|
|
|
# Sync Markup (Reading Progress + Annotations)
|
|
@name("Sync Reading Progress")
|
|
POST {{environment.base_url}}/sync/kobo/markup
|
|
Authorization: Bearer {{kobo_device_token}}
|
|
x-kobo-device: {"DeviceId":"{{kobo_device_id}}","Model":"Kobo Clara"}
|
|
Content-Type: application/json
|
|
{
|
|
"ReadingSync": [
|
|
{
|
|
"ContentId": "book-uuid-here",
|
|
"PercentRead": 45.6,
|
|
"EntitlementId": "entitlement-id-here",
|
|
"RemainingTimeMinutes": 120,
|
|
"FirstReadTime": "2026-01-25T10:00:00Z",
|
|
"LastModified": "2026-01-30T20:00:00Z"
|
|
}
|
|
],
|
|
"BookmarkSync": []
|
|
}
|
|
|
|
@name("Sync Progress with Bookmarks")
|
|
POST {{environment.base_url}}/sync/kobo/markup
|
|
Authorization: Bearer {{kobo_device_token}}
|
|
x-kobo-device: {"DeviceId":"{{kobo_device_id}}","Model":"Kobo Clara"}
|
|
Content-Type: application/json
|
|
{
|
|
"ReadingSync": [
|
|
{
|
|
"ContentId": "book-uuid",
|
|
"PercentRead": 42.3,
|
|
"EntitlementId": "entitlement-id",
|
|
"RemainingTimeMinutes": 138,
|
|
"FirstReadTime": "2026-01-25T10:00:00Z",
|
|
"LastModified": "2026-01-30T20:00:00Z"
|
|
}
|
|
],
|
|
"BookmarkSync": [
|
|
{
|
|
"ContentId": "book-uuid",
|
|
"BookmarkText": "highlighted text passage",
|
|
"BookmarkType": "annotation",
|
|
"BookmarkTitle": "Chapter 3"
|
|
}
|
|
]
|
|
}
|
|
|
|
@name("Sync Multiple Books Progress")
|
|
POST {{environment.base_url}}/sync/kobo/markup
|
|
Authorization: Bearer {{kobo_device_token}}
|
|
x-kobo-device: {"DeviceId":"{{kobo_device_id}}","Model":"Kobo Aura"}
|
|
Content-Type: application/json
|
|
{
|
|
"ReadingSync": [
|
|
{
|
|
"ContentId": "book-1-uuid",
|
|
"PercentRead": 25.0,
|
|
"EntitlementId": "entitlement-1",
|
|
"RemainingTimeMinutes": 240,
|
|
"FirstReadTime": "2026-01-25T10:00:00Z",
|
|
"LastModified": "2026-01-30T18:00:00Z"
|
|
},
|
|
{
|
|
"ContentId": "book-2-uuid",
|
|
"PercentRead": 78.5,
|
|
"EntitlementId": "entitlement-2",
|
|
"RemainingTimeMinutes": 45,
|
|
"FirstReadTime": "2026-01-25T14:00:00Z",
|
|
"LastModified": "2026-01-30T20:00:00Z"
|
|
}
|
|
],
|
|
"BookmarkSync": []
|
|
}
|
|
|
|
@name("Sync with Annotations")
|
|
POST {{environment.base_url}}/sync/kobo/markup
|
|
Authorization: Bearer {{kobo_device_token}}
|
|
x-kobo-device: {"DeviceId":"{{kobo_device_id}}","Model":"Kobo Libra"}
|
|
Content-Type: application/json
|
|
{
|
|
"ReadingSync": [
|
|
{
|
|
"ContentId": "book-uuid",
|
|
"PercentRead": 55.0,
|
|
"EntitlementId": "entitlement-id",
|
|
"RemainingTimeMinutes": 120,
|
|
"FirstReadTime": "2026-01-25T10:00:00Z",
|
|
"LastModified": "2026-01-30T20:00:00Z"
|
|
}
|
|
],
|
|
"BookmarkSync": [
|
|
{
|
|
"ContentId": "book-uuid",
|
|
"BookmarkText": "Important quote",
|
|
"BookmarkType": "annotation",
|
|
"BookmarkTitle": "Chapter 4 - The Truth"
|
|
},
|
|
{
|
|
"ContentId": "book-uuid",
|
|
"BookmarkText": "Another quote",
|
|
"BookmarkType": "annotation",
|
|
"BookmarkTitle": "Chapter 5"
|
|
},
|
|
{
|
|
"ContentId": "book-uuid",
|
|
"BookmarkText": "Note to myself",
|
|
"BookmarkType": "note",
|
|
"BookmarkTitle": "Personal note"
|
|
}
|
|
]
|
|
}
|
|
|
|
# Sync Bookmark
|
|
@name("Sync Single Bookmark")
|
|
POST {{environment.base_url}}/sync/kobo/bookmark
|
|
Authorization: Bearer {{kobo_device_token}}
|
|
x-kobo-device: {"DeviceId":"{{kobo_device_id}}","Model":"Kobo Clara"}
|
|
Content-Type: application/json
|
|
{
|
|
"ContentId": "book-uuid",
|
|
"BookmarkText": "Bookmarked passage",
|
|
"BookmarkType": "annotation",
|
|
"BookmarkTitle": "Chapter 3"
|
|
}
|
|
|
|
# Get Library
|
|
@name("Get Kobo Library")
|
|
GET {{environment.base_url}}/sync/kobo/library
|
|
Authorization: Bearer {{kobo_device_token}}
|
|
|
|
@name("Get Library for Book")
|
|
GET {{environment.base_url}}/sync/kobo/library
|
|
Authorization: Bearer {{kobo_device_token}}
|
|
Content-Type: application/json
|
|
{
|
|
"ContentId": "book-uuid"
|
|
}
|
|
|
|
# Analytics Get Tests
|
|
@name("Get Analytics Tests")
|
|
POST {{environment.base_url}}/sync/kobo/v1/analytics/gettests
|
|
Authorization: Bearer {{kobo_device_token}}
|
|
Content-Type: application/json
|
|
{
|
|
"platform": "android"
|
|
"firmware_version": "4.30.19023"
|
|
}
|
|
|
|
# Initialization
|
|
@name("Kobo Initialization")
|
|
GET {{environment.base_url}}/sync/kobo/v1/initialization
|
|
Authorization: Bearer {{kobo_device_token}}
|
|
|
|
@name("Initialization with Device Info")
|
|
GET {{environment.base_url}}/sync/kobo/v1/initialization?Platform=android&FirmwareVersion=4.30.19023
|
|
Authorization: Bearer {{kobo_device_token}}
|
|
|
|
# Sync from Server
|
|
@name("Sync Books from Server to Kobo")
|
|
POST {{environment.base_url}}/sync/kobo/sync-from-server
|
|
Authorization: Bearer {{kobo_device_token}}
|
|
Content-Type: application/json
|
|
{
|
|
"force_sync": true,
|
|
"books": ["book-uuid-1", "book-uuid-2"]
|
|
}
|
|
|
|
@name("Sync Specific Book from Server")
|
|
POST {{environment.base_url}}/sync/kobo/sync-from-server
|
|
Authorization: Bearer {{kobo_device_token}}
|
|
Content-Type: application/json
|
|
{
|
|
"ContentId": "book-uuid",
|
|
"EntitlementId": "entitlement-id"
|
|
}
|
|
|
|
@name("Partial Sync - Since Date")
|
|
POST {{environment.base_url}}/sync/kobo/sync-from-server
|
|
Authorization: Bearer {{kobo_device_token}}
|
|
Content-Type: application/json
|
|
{
|
|
"books": ["book-1", "book-2"],
|
|
"sync_options": {
|
|
"since_date": "2026-01-30T00:00:00Z",
|
|
"include_annotations": true
|
|
}
|
|
}
|
|
|
|
@name("Sync with Conflict Resolution Preference")
|
|
POST {{environment.base_url}}/sync/kobo/sync-from-server
|
|
Authorization: Bearer {{kobo_device_token}}
|
|
Content-Type: application/json
|
|
{
|
|
"books": ["book-1", "book-2", "book-3"],
|
|
"sync_options": {
|
|
"conflict_resolution": "most_recent",
|
|
"force_annotations": false
|
|
}
|
|
}
|