Files
bookhoard/bruno/kobo/bookmark-sync.bru
T
john-okeefe 3117ce54ec refactor(bruno): migrate API tests to Bruno DSL format
- 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
2026-02-08 20:49:06 -05:00

76 lines
1.5 KiB
Plaintext

meta {
name: Kobo Bookmark Sync
type: http
seq: 3
}
post {
url: {{base_url}}/api/v1/kobo/bookmark
body: json
auth: inherit
}
headers {
Authorization: Bearer {{device_token}}
Content-Type: application/json
}
body:json {
{
"BookmarkSync": [
{
"BookmarkId": "bookmark_2",
"ContentId": "kobo_xyz789",
"BookmarkText": "Important note",
"BookmarkType": "bookmark",
"DateCreated": "2026-01-31T12:00:00Z"
}
]
}
}
script:post-response {
function onResponse(res) {
if (res.getStatus() === 200) {
const body = res.getBody();
tests('Status is Success', body.Status === "Success");
tests('BookmarksSynced >= 0', body.BookmarksSynced >= 0);
}
}
onResponse(res);
}
settings {
encodeUrl: true
timeout: 0
}
docs {
## Kobo Bookmark Sync
Synchronizes bookmarks from a Kobo device to the Bookhoard server.
**Method:** POST
**Endpoint:** /api/v1/kobo/bookmark
**Authentication:** Bearer token (device token)
**Request Body:**
- `BookmarkSync` (array): Array of bookmark objects
- `BookmarkId` (string): Unique bookmark ID
- `ContentId` (string): Book/content ID
- `BookmarkText` (string): Bookmark text or note
- `BookmarkType` (string): Type (bookmark, highlight, note)
- `DateCreated` (string): ISO 8601 timestamp
**Response:**
- `Status` (string): Sync status (Success, Partial)
- `BookmarksSynced` (number): Number of bookmarks synced
**Status Codes:**
- 200: Success
- 401: Unauthorized
- 500: Internal server error
}