refactor: update Bruno API collection for media-items system

- Remove all ebook-specific API requests (15 files deleted)
- Rename Scan Ebooks.bru to Scan Media Items.bru
- Update API paths from /api/ebooks to /api/media-items
- Update base URL and environment configuration
- Maintain all existing media-items, library, auth, and progress tests

Aligns Bruno collection with unified media-items API architecture
This commit is contained in:
2026-01-30 13:52:06 -05:00
parent dc820dfb92
commit ba31e1491e
33 changed files with 81 additions and 1290 deletions
+9 -91
View File
@@ -6,8 +6,8 @@ meta {
put {
url: {{base_url}}/api/library/scan-settings
auth: inherit
body: json
auth: inherit
}
headers {
@@ -21,38 +21,6 @@ body:json {
}
}
tests {
test_update_scan_settings_success(status, headers, body) {
if (status !== 200) {
throw new Error("Expected status 200, got " + status);
}
const contentType = headers["content-type"];
if (!contentType || !contentType.includes("application/json")) {
throw new Error("Expected content-type to contain application/json, got " + contentType);
}
// Verify response body is valid JSON and has expected structure
let data;
try {
data = JSON.parse(body);
} catch (e) {
throw new Error("Response body is not valid JSON");
}
if (!data || typeof data !== "object") {
throw new Error("Expected response body to be an object");
}
// Check for success message or updated settings
if (!data.message && typeof data.scan_frequency_minutes !== "number") {
throw new Error("Response missing expected fields");
}
return true;
}
}
settings {
encodeUrl: true
timeout: 0
@@ -60,74 +28,24 @@ settings {
docs {
## Update Scan Settings
Updates user's library scanning settings.
**Method:** PUT
**Endpoint:** /api/library/scan-settings
**Authentication:** Required (Bearer token)
**Request Body:**
- `scan_frequency_minutes` (number, required): Minutes between automatic scans (1-1440)
- `auto_scan_enabled` (boolean, required): Whether automatic scanning is enabled
- `library_id` (string, optional): Specific library ID to update (if not provided, updates global)
**Response:** Updated scan settings object
- `scan_frequency_minutes` (number): Updated frequency
- `auto_scan_enabled` (boolean): Updated enabled status
- `last_scan_at` (string, optional): Timestamp of last scan
- `next_scan_at` (string, optional): Timestamp of next scheduled scan
- `updated_at` (string): Timestamp of settings update
**Status Codes:**
- 200: Success
- 400: Invalid settings (frequency out of range)
- 401: Unauthorized
- 403: Forbidden (access denied)
- 404: Library not found (if library_id provided)
- 500: Internal server error
}
put {
url: {{base_url}}/api/library/scan-settings
body: json
auth: inherit
}
body {
{
"scan_frequency_minutes": 60,
"auto_scan_enabled": true
}
}
settings {
encodeUrl: true
timeout: 0
}
docs {
## Update Scan Settings
Updates the user's ebook scanning settings.
**Method:** PUT
**Endpoint:** /api/library/scan-settings
**Authentication:** Required
**Request Body:**
- `scan_frequency_minutes` (integer, required): Minutes between automatic scans (15-1440)
- `auto_scan_enabled` (boolean, required): Whether automatic scanning is enabled
**Response:**
- `message` (string): Success message
**Status Codes:**
- 200: Success
- 400: Invalid settings
- 401: Unauthorized
}
}