test(bruno): Add API tests for Kobo, Koreader, OPDS, collections

- Add Kobo bookmark/markup sync tests
- Add Koreader progress/bookmark sync tests
- Add OPDS feed tests
- Add collection tests
- Add sync tests for book linking
This commit is contained in:
2026-01-31 22:32:56 -05:00
parent 0a97b679a6
commit d6d208c3d1
33 changed files with 936 additions and 0 deletions
@@ -0,0 +1,25 @@
meta {
name: Add Books to Collection
type: http
seq: 6
}
post {
url: {{base_url}}/api/collections/{{collection_id}}/books
body: json
auth: bearer
}
auth:bearer {
token: {{token}}
}
body:json {
{
"book_ids": [
"{{book_id_1}}",
"{{book_id_2}}",
"{{book_id_3}}"
]
}
}
+37
View File
@@ -0,0 +1,37 @@
meta {
name: Create Collection
type: http
seq: 1
}
post {
url: {{base_url}}/api/collections
body: json
auth: bearer
}
auth:bearer {
token: {{token}}
}
body:json {
{
"name": "Science Fiction",
"description": "My favorite sci-fi books",
"color": "#ff0000",
"icon": "🚀",
"auto_assign_rules": [
{
"id": "rule-1",
"field": "genre",
"operator": "equals",
"value": "Science Fiction",
"priority": 8
}
],
"view_settings": {
"sort_by": "title",
"view_mode": "grid"
}
}
}
@@ -0,0 +1,23 @@
meta {
name: Create Device Mapping
type: http
seq: 9
}
post {
url: {{base_url}}/api/devices/{{device_id}}/collections
body: json
auth: bearer
}
auth:bearer {
token: {{token}}
}
body:json {
{
"collection_id": "{{collection_id}}",
"device_shelf_name": "Sci-Fi",
"sync_direction": "bidirectional"
}
}
+14
View File
@@ -0,0 +1,14 @@
meta {
name: Delete Collection
type: http
seq: 5
}
delete {
url: {{base_url}}/api/collections/{{collection_id}}
auth: bearer
}
auth:bearer {
token: {{token}}
}
@@ -0,0 +1,14 @@
meta {
name: Delete Device Mapping
type: http
seq: 11
}
delete {
url: {{base_url}}/api/devices/{{device_id}}/collections/{{mapping_id}}
auth: bearer
}
auth:bearer {
token: {{token}}
}
@@ -0,0 +1,14 @@
meta {
name: Get Book Collections
type: http
seq: 12
}
get {
url: {{base_url}}/api/collections/books/{{book_id}}
auth: bearer
}
auth:bearer {
token: {{token}}
}
+14
View File
@@ -0,0 +1,14 @@
meta {
name: Get Collection
type: http
seq: 3
}
get {
url: {{base_url}}/api/collections/{{collection_id}}
auth: bearer
}
auth:bearer {
token: {{token}}
}
+14
View File
@@ -0,0 +1,14 @@
meta {
name: Get Collections
type: http
seq: 2
}
get {
url: {{base_url}}/api/collections?include_auto=true&sort_by=name
auth: bearer
}
auth:bearer {
token: {{token}}
}
+14
View File
@@ -0,0 +1,14 @@
meta {
name: Get Device Mappings
type: http
seq: 8
}
get {
url: {{base_url}}/api/devices/{{device_id}}/collections
auth: bearer
}
auth:bearer {
token: {{token}}
}
@@ -0,0 +1,14 @@
meta {
name: Remove Book from Collection
type: http
seq: 7
}
delete {
url: {{base_url}}/api/collections/{{collection_id}}/books/{{book_id}}
auth: bearer
}
auth:bearer {
token: {{token}}
}
+37
View File
@@ -0,0 +1,37 @@
meta {
name: Update Collection
type: http
seq: 4
}
put {
url: {{base_url}}/api/collections/{{collection_id}}
body: json
auth: bearer
}
auth:bearer {
token: {{token}}
}
body:json {
{
"name": "Sci-Fi Favorites",
"description": "Updated description",
"color": "#00ff00",
"icon": "⭐",
"auto_assign_rules": [
{
"id": "rule-2",
"field": "series",
"operator": "equals",
"value": "Foundation",
"priority": 9
}
],
"view_settings": {
"sort_by": "author",
"view_mode": "list"
}
}
}
@@ -0,0 +1,22 @@
meta {
name: Update Device Mapping
type: http
seq: 10
}
put {
url: {{base_url}}/api/devices/{{device_id}}/collections/{{mapping_id}}
body: json
auth: bearer
}
auth:bearer {
token: {{token}}
}
body:json {
{
"device_shelf_name": "Science Fiction",
"sync_direction": "book_to_device"
}
}