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
This commit is contained in:
@@ -1,16 +1,56 @@
|
||||
meta {
|
||||
name: Get Kobo Shelf
|
||||
name: Get Kobo Shelf Books
|
||||
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)."
|
||||
}
|
||||
get {
|
||||
url: {{baseURL}}/api/devices/{{deviceID}}/shelves?shelf={{shelfName}}
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
headers {
|
||||
Authorization: Bearer {{userToken}}
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
|
||||
docs {
|
||||
## Get Kobo Shelf Books
|
||||
|
||||
Get all books on a Kobo device shelf, optionally filter by shelf name.
|
||||
|
||||
**Method:** GET
|
||||
|
||||
**Endpoint:** /api/devices/{deviceID}/shelves?shelf={shelfName}
|
||||
|
||||
**Authentication:** Bearer token
|
||||
|
||||
**Path Parameters:**
|
||||
- `deviceID` (string): Device UUID
|
||||
|
||||
**Query Parameters:**
|
||||
- `shelf` (string, optional): Shelf name to filter by. If omitted, returns all shelves.
|
||||
|
||||
**Response:**
|
||||
- Array of books with:
|
||||
- `id` (string): Book UUID
|
||||
- `title` (string): Book title
|
||||
- `author` (string): Book author
|
||||
- `shelf_name` (string): Name of the shelf
|
||||
- `shelf_position` (number): Position on the shelf
|
||||
- `entitlement_id` (string): Kobo entitlement ID
|
||||
- `revision_id` (string): Kobo revision number
|
||||
|
||||
**Status Codes:**
|
||||
- 200: Success
|
||||
- 401: Unauthorized
|
||||
- 404: Device not found
|
||||
- 500: Internal server error
|
||||
|
||||
**Note:** Returns Kobo-specific metadata (entitlement ID, revision number) required for proper Kobo sync operations.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user