Files
bookhoard/bruno/devices/Add Books to Kobo Shelf.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

66 lines
1.5 KiB
Plaintext

meta {
name: Add Books to Kobo Shelf
type: http
seq: 1
}
post {
url: {{baseURL}}/api/devices/{{deviceID}}/shelves
body: json
auth: inherit
}
headers {
Authorization: Bearer {{userToken}}
Content-Type: application/json
}
body:json {
{
"media_item_ids": [
"{{bookUUID1}}",
"{{bookUUID2}}"
],
"shelf_name": "Reading List",
"shelf_position": 0
}
}
settings {
encodeUrl: true
timeout: 0
}
docs {
## Add Books to Kobo Shelf
Add one or more books to a Kobo device shelf. Manages which books should be synced to a specific Kobo device. Supports multiple shelves for organization.
**Method:** POST
**Endpoint:** /api/devices/{deviceID}/shelves
**Authentication:** Bearer token
**Path Parameters:**
- `deviceID` (string): Device UUID
**Request Body:**
- `media_item_ids` (array): Array of book UUIDs to add
- `shelf_name` (string): Name of the shelf (e.g., "Reading List", "Favorites")
- `shelf_position` (number, optional): Position on the shelf (default: 0)
**Response:**
- `message` (string): Success message
- `added_count` (number): Number of books added
**Status Codes:**
- 200: Success - books added to shelf
- 400: Invalid request data
- 401: Unauthorized
- 404: Device or one or more books not found
- 500: Internal server error
**Note:** Adding a book that's already on the shelf updates its position if a new position is specified. Supports multiple shelves for organizing content on the Kobo device.
}