- Convert all existing .bru files from JSON to Bruno DSL format - Remove obsolete files (conflicts/api.bru, kobo/Kobo Initialization.bru) - Update auth configuration to use 'inherit' instead of explicit bearer tokens - Add comprehensive documentation to all test files - Improve test scripts with proper assertions and error handling
91 lines
2.3 KiB
Plaintext
91 lines
2.3 KiB
Plaintext
meta {
|
|
name: Sync from Bookhoard to Kobo
|
|
type: http
|
|
seq: 1
|
|
}
|
|
|
|
post {
|
|
url: {{baseURL}}/api/sync/kobo/sync-from-server
|
|
body: json
|
|
auth: inherit
|
|
}
|
|
|
|
headers {
|
|
Authorization: Bearer {{koboToken}}
|
|
Content-Type: application/json
|
|
x-kobo-device: {"DeviceId":"kobo-clara-test","Model":"Kobo Clara","SerialNumber":"N123456789"}
|
|
}
|
|
|
|
body:json {
|
|
[
|
|
{
|
|
"ContentId": "{{bookUUID}}",
|
|
"PercentRead": 65.4,
|
|
"LastModified": "2026-01-31T12:00:00Z",
|
|
"Bookmarks": [
|
|
{
|
|
"BookmarkId": "bookmark-123",
|
|
"ContentId": "{{bookUUID}}",
|
|
"BookmarkText": "This is an important note",
|
|
"BookmarkType": "bookmark",
|
|
"BookmarkTitle": "Chapter 5 Note"
|
|
}
|
|
],
|
|
"Highlights": [
|
|
{
|
|
"BookmarkId": "highlight-456",
|
|
"ContentId": "{{bookUUID}}",
|
|
"BookmarkText": "highlighted passage text",
|
|
"BookmarkType": "annotation",
|
|
"BookmarkTitle": "Chapter 3 Highlight"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
|
|
settings {
|
|
encodeUrl: true
|
|
timeout: 0
|
|
}
|
|
|
|
docs {
|
|
## Sync from Bookhoard to Kobo
|
|
|
|
Server-initiated sync pushing progress, bookmarks, and highlights from Bookhoard to Kobo device. Two-way sync endpoint.
|
|
|
|
**Method:** POST
|
|
|
|
**Endpoint:** /api/sync/kobo/sync-from-server
|
|
|
|
**Authentication:** Bearer token with Kobo device identification
|
|
|
|
**Headers:**
|
|
- `x-kobo-device` (string): JSON string containing Kobo device info
|
|
- `DeviceId`: Kobo device ID
|
|
- `Model`: Kobo device model
|
|
- `SerialNumber`: Kobo device serial number
|
|
|
|
**Request Body:** Array of sync data objects
|
|
- `ContentId` (string): Book UUID
|
|
- `PercentRead` (number): Reading progress percentage (0-100)
|
|
- `LastModified` (string): ISO 8601 timestamp
|
|
- `Bookmarks` (array, optional): Array of bookmark objects
|
|
- `BookmarkId`: Unique bookmark ID
|
|
- `ContentId`: Book UUID
|
|
- `BookmarkText`: Bookmark text/note
|
|
- `BookmarkType`: Type (bookmark, annotation, etc.)
|
|
- `BookmarkTitle`: Bookmark title
|
|
- `Highlights` (array, optional): Array of highlight objects (same structure as bookmarks)
|
|
|
|
**Response:**
|
|
- Sync result confirmation
|
|
|
|
**Status Codes:**
|
|
- 200: Success
|
|
- 401: Unauthorized
|
|
- 500: Internal server error
|
|
|
|
**Note:** Allows Bookhoard server to push updates to Kobo device, including reading progress, bookmarks, and highlights.
|
|
}
|