feat: add comprehensive Bruno API tests for annotations
- Add complete Bruno collection for notes API (5 endpoints) - Add complete Bruno collection for highlights API (5 endpoints) - Include detailed request/response documentation - Add proper validation examples and error cases - Support both media-items and ebook endpoint testing - Add environment variable support for dynamic IDs
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
meta {
|
||||
name: Create Media Highlight
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{base_url}}/api/media-items/{{media_item_id}}/highlights
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"selection_text": "This is the highlighted text from the media item.",
|
||||
"start_position": "page:45:offset:120",
|
||||
"end_position": "page:45:offset:145",
|
||||
"color": "#ffff00",
|
||||
"note_id": ""
|
||||
}
|
||||
}
|
||||
|
||||
script:post-response {
|
||||
onResponse(res);
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
|
||||
docs {
|
||||
## Create Media Highlight
|
||||
|
||||
Creates a new highlight for a specific media item.
|
||||
|
||||
**Method:** POST
|
||||
|
||||
**Endpoint:** /api/media-items/:id/highlights
|
||||
|
||||
**Path Parameters:**
|
||||
- `id` (string): Media item ID
|
||||
|
||||
**Request Body:**
|
||||
- `selection_text` (string): Highlighted text (required, 1-5000 chars)
|
||||
- `start_position` (string): Start position (required, max 100 chars)
|
||||
- `end_position` (string): End position (required, max 100 chars)
|
||||
- `color` (string): Highlight color in hex format (optional, default #ffff00)
|
||||
- `note_id` (string): Optional associated note ID
|
||||
|
||||
**Response:**
|
||||
- Highlight object with all fields including generated ID and timestamps
|
||||
|
||||
**Status Codes:**
|
||||
- 201: Created
|
||||
- 400: Invalid request
|
||||
- 401: Unauthorized
|
||||
- 404: Media item not found
|
||||
}
|
||||
Reference in New Issue
Block a user