Files
bookhoard/bruno/koreader/Get Book Metadata.bru
T
john-okeefe 26070e4000 Refactor: rename baseUrl to base_url in .bru files
Update configuration key naming convention to use snake_case
consistently.
Applies changes recursively across all subdirectories.
2026-02-08 21:26:31 -05:00

62 lines
1.2 KiB
Plaintext

meta {
name: KOReader Get Book Metadata
type: http
seq: 2
}
get {
url: {{base_url}}/api/sync/koreader/metadata/{{book_uuid}}
body: none
auth: inherit
}
headers {
Authorization: Bearer {{device_token}}
Content-Type: application/json
}
script:post-response {
function onResponse(res) {
if (res.getStatus() === 200) {
const body = res.getBody();
tests['Status is 200'] = true;
tests['Has UUID'] = body.uuid !== null;
tests['Has title'] = body.title !== null;
tests['Has progress'] = body.progress !== null;
}
}
onResponse(res);
}
settings {
encodeUrl: true
timeout: 0
}
docs {
## KOReader Get Book Metadata
Retrieves metadata for a specific book from the KOReader sync endpoint.
**Method:** GET
**Endpoint:** /api/sync/koreader/metadata/{book_uuid}
**Authentication:** Bearer token (device token)
**Path Parameters:**
- `book_uuid` (string): Book UUID
**Response:**
- `uuid` (string): Book UUID
- `title` (string): Book title
- `progress` (object): Reading progress data
- `metadata` (object): Additional book metadata
**Status Codes:**
- 200: Success
- 401: Unauthorized
- 404: Book not found
- 500: Internal server error
}