test: add Bruno API test collections for Kobo and media endpoints
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Add Books to Kobo Shelf
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
POST {{baseURL}}/api/devices/{{deviceID}}/shelves
|
||||
Authorization: Bearer {{userToken}}
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"media_item_ids": [
|
||||
"{{bookUUID1}}",
|
||||
"{{bookUUID2}}"
|
||||
],
|
||||
"shelf_name": "Reading List",
|
||||
"shelf_position": 0
|
||||
}
|
||||
|
||||
{
|
||||
"meta": {
|
||||
"name": "Add Books to Kobo Shelf",
|
||||
"description": "Add one or more books to a Kobo device shelf",
|
||||
"documentation": "Manages which books should be synced to a specific Kobo device. Supports multiple shelves for organization."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
meta {
|
||||
name: Clear Kobo Shelf
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
DELETE {{baseURL}}/api/devices/{{deviceID}}/shelves/clear?shelf={{shelfName}}
|
||||
Authorization: Bearer {{userToken}}
|
||||
|
||||
{
|
||||
"meta": {
|
||||
"name": "Clear Kobo Shelf",
|
||||
"description": "Clear all books from a Kobo device shelf (or all shelves if no shelf name specified)",
|
||||
"documentation": "Removes all books from the specified shelf. If no shelf name is provided, clears all shelves for the device."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
meta {
|
||||
name: Get Kobo Shelf
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
GET {{baseURL}}/api/devices/{{deviceID}}/shelves?shelf={{shelfName}}
|
||||
Authorization: Bearer {{userToken}}
|
||||
|
||||
{
|
||||
"meta": {
|
||||
"name": "Get Kobo Shelf Books",
|
||||
"description": "Get all books on a Kobo device shelf, optionally filter by shelf name",
|
||||
"documentation": "Returns a list of books with their shelf positions and Kobo-specific metadata (entitlement ID, revision number)."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
meta {
|
||||
name: Remove Book from Kobo Shelf
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
DELETE {{baseURL}}/api/devices/{{deviceID}}/shelves?media_item_id={{bookUUID}}
|
||||
Authorization: Bearer {{userToken}}
|
||||
|
||||
{
|
||||
"meta": {
|
||||
"name": "Remove Book from Kobo Shelf",
|
||||
"description": "Remove a specific book from a Kobo device shelf",
|
||||
"documentation": "Removes the book from the device's shelf, preventing it from syncing to that device."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
meta {
|
||||
name: Server Sync to Kobo
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
POST {{baseURL}}/api/sync/kobo/sync-from-server
|
||||
Authorization: Bearer {{koboToken}}
|
||||
x-kobo-device: {"DeviceId":"kobo-clara-test","Model":"Kobo Clara","SerialNumber":"N123456789"}
|
||||
Content-Type: application/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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
{
|
||||
"meta": {
|
||||
"name": "Sync from Bookmann to Kobo",
|
||||
"description": "Server-initiated sync pushing progress, bookmarks, and highlights from Bookmann to Kobo device",
|
||||
"documentation": "Two-way sync endpoint. Allows Bookmann server to push updates to Kobo device, including reading progress, bookmarks, and highlights."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
meta {
|
||||
name: EPUB Download
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
GET {{baseURL}}/api/books/{{bookUUID}}/download
|
||||
|
||||
{
|
||||
"meta": {
|
||||
"name": "Download EPUB Book",
|
||||
"description": "Download an EPUB book file from Bookmann server (no auth required - for Kobo device download)",
|
||||
"documentation": "Kobo devices can download books directly from Bookmann using this endpoint. The endpoint returns the book file with appropriate Content-Type headers."
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user