This commit updates all documentation files throughout the project: - Updated IMPLEMENTATION_PLAN.md with new implementation details - Updated PROJECT_GUIDELINES.md with coding standards and practices - Updated README.md with current project information - Updated SCREENSHOT_AUTOMATION.md with new automation details - Added TEST_DATA.md with test fixtures data - Updated cover_image_serving_plan.md with static URL patterns Documentation API updates: - Updated API reference documentation for all endpoints including: - Authentication (login, logout, register, refresh_token) - Book matching (auto_link, bulk_link, link_book, search) - Collections (CRUD operations, shelf mappings, auto-assign rules) - Conflicts (bulk operations, resolve/dismiss) - Devices (registration, approval, shelf management) - Highlights (create, update, delete, get) - Kobo sync (bookmark, markup, initialization, sync) - KOReader sync (library, metadata, bookmarks, progress) - Libraries (CRUD, folders, media items, stats) - Media items (bulk operations, CRUD) - Notes (CRUD operations) - OPDS (acquisition, feeds, publication) - Progress (reading progress tracking) - Queue (device queue management) - Ratings (star ratings) - Scanner (watch mode, scan operations) - Sync protocols (Kobo, KOReader) - Users (profile, password, admin operations) - WebSocket protocols - Updated user guides (admin, dashboard, settings, sync) - Updated device setup guides (Kobo, KOReader) - Updated developer guides (testing, contributing, operations) - Updated scripts/README.md
89 lines
2.0 KiB
Markdown
89 lines
2.0 KiB
Markdown
# Link Book
|
|
|
|
Link a device book to a Bookhoard media item. Supports bulk linking.
|
|
|
|
**Endpoint**: `POST /api/sync/bulk-link-books` or `POST /api/sync/auto-link-books`
|
|
**Auth**: Required
|
|
**Content-Type**: `application/json`
|
|
|
|
## Manual Link Request Body
|
|
|
|
| Field | Type | Required | Description |
|
|
| ------------------------ | ------ | -------- | ------------------------- |
|
|
| links | array | Yes | List of book links |
|
|
| links[].unlinked_book_id | string | Yes | Device book UUID |
|
|
| links[].media_item_id | string | Yes | Bookhoard media item UUID |
|
|
| links[].confidence_score | float | No | Match confidence (0-1) |
|
|
|
|
### Example Manual Link Request
|
|
|
|
```json
|
|
{
|
|
"links": [
|
|
{
|
|
"unlinked_book_id": "uuid-1",
|
|
"media_item_id": "uuid-2",
|
|
"confidence_score": 1.0
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
## Auto-Link Request Body
|
|
|
|
| Field | Type | Required | Description |
|
|
| -------------------- | ------- | -------- | ----------------------------------------------- |
|
|
| confidence_threshold | float | No | Minimum confidence for auto-link (default: 0.8) |
|
|
| limit | integer | No | Maximum books to auto-link (default: 50) |
|
|
|
|
### Example Auto-Link Request
|
|
|
|
```json
|
|
{
|
|
"confidence_threshold": 0.8,
|
|
"limit": 50
|
|
}
|
|
```
|
|
|
|
## Response (200 OK) - Manual Link
|
|
|
|
```json
|
|
{
|
|
"results": [
|
|
{
|
|
"unlinked_book_id": "uuid-1",
|
|
"status": "success",
|
|
"media_item_id": "uuid-2"
|
|
}
|
|
],
|
|
"total": 1,
|
|
"successful": 1,
|
|
"failed": 0
|
|
}
|
|
```
|
|
|
|
## Response (200 OK) - Auto-Link
|
|
|
|
```json
|
|
{
|
|
"auto_linked": 15,
|
|
"results": [
|
|
{
|
|
"unlinked_book_id": "uuid-1",
|
|
"title": "The Hobbit",
|
|
"matched_media_item_id": "uuid-2",
|
|
"confidence": 0.95,
|
|
"match_method": "sha256_match"
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
## Error Responses
|
|
|
|
| Code | Description |
|
|
| ---- | ------------------------ |
|
|
| 400 | Invalid link data |
|
|
| 401 | Invalid or expired token |
|
|
| 404 | Media item not found |
|