- 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
56 lines
1.1 KiB
Plaintext
56 lines
1.1 KiB
Plaintext
meta {
|
|
name: Kobo Initialization
|
|
type: http
|
|
seq: 1
|
|
}
|
|
|
|
get {
|
|
url: {{base_url}}/api/v1/kobo/initialization
|
|
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('Has ContentId', body.ContentId !== undefined);
|
|
tests('Has Categories', body.Categories !== undefined);
|
|
tests('Has BookhoardUUID', body.BookhoardUUID !== undefined);
|
|
}
|
|
}
|
|
onResponse(res);
|
|
}
|
|
|
|
settings {
|
|
encodeUrl: true
|
|
timeout: 0
|
|
}
|
|
|
|
docs {
|
|
## Kobo Initialization
|
|
|
|
Initializes Kobo device sync, returning device resources and account information.
|
|
|
|
**Method:** GET
|
|
|
|
**Endpoint:** /api/v1/kobo/initialization
|
|
|
|
**Authentication:** Bearer token (device token)
|
|
|
|
**Response:**
|
|
- `ContentId` (string): Device content ID
|
|
- `Categories` (array): Available categories/collections
|
|
- `BookhoardUUID` (string): Bookhoard instance UUID
|
|
|
|
**Status Codes:**
|
|
- 200: Success
|
|
- 401: Unauthorized
|
|
- 500: Internal server error
|
|
}
|