refactor: reorganize Bruno API collection for better structure
- Remove obsolete scenarios/ folder and move requests to root media-items/ - Create new filters/ folder for field value autocomplete searches - Move Field Values Search requests from search/ to filters/ for clarity - Move Search Media Items from scenarios/ to search/ for consistency - Update sequence numbers across all media-items requests (2-13) - Remove redundant folder configuration files - Improve API collection organization for better discoverability
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
info:
|
info:
|
||||||
name: Create Media Item
|
name: Create Media Item
|
||||||
type: http
|
type: http
|
||||||
seq: 2
|
seq: 3
|
||||||
|
|
||||||
http:
|
http:
|
||||||
method: POST
|
method: POST
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
info:
|
info:
|
||||||
name: Create Media Rating
|
name: Create Media Rating
|
||||||
type: http
|
type: http
|
||||||
seq: 3
|
seq: 4
|
||||||
|
|
||||||
http:
|
http:
|
||||||
method: POST
|
method: POST
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
info:
|
info:
|
||||||
name: Delete Media Item
|
name: Delete Media Item
|
||||||
type: http
|
type: http
|
||||||
seq: 17
|
seq: 11
|
||||||
|
|
||||||
http:
|
http:
|
||||||
method: DELETE
|
method: DELETE
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
info:
|
info:
|
||||||
name: Delete Media Rating
|
name: Delete Media Rating
|
||||||
type: http
|
type: http
|
||||||
seq: 19
|
seq: 13
|
||||||
|
|
||||||
http:
|
http:
|
||||||
method: DELETE
|
method: DELETE
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
info:
|
info:
|
||||||
name: Download Media Item
|
name: Download Media Item
|
||||||
type: http
|
type: http
|
||||||
seq: 4
|
seq: 5
|
||||||
|
|
||||||
http:
|
http:
|
||||||
method: GET
|
method: GET
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
info:
|
info:
|
||||||
name: Get Media Item
|
name: Get Media Item
|
||||||
type: http
|
type: http
|
||||||
seq: 12
|
seq: 8
|
||||||
|
|
||||||
http:
|
http:
|
||||||
method: GET
|
method: GET
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
info:
|
info:
|
||||||
name: Get Media Rating
|
name: Get Media Rating
|
||||||
type: http
|
type: http
|
||||||
seq: 18
|
seq: 12
|
||||||
|
|
||||||
http:
|
http:
|
||||||
method: GET
|
method: GET
|
||||||
|
|||||||
+12
-7
@@ -1,16 +1,21 @@
|
|||||||
info:
|
info:
|
||||||
name: List Media Items with Sorting
|
name: List Media Items with Sorting
|
||||||
type: http
|
type: http
|
||||||
seq: 1
|
seq: 2
|
||||||
|
|
||||||
http:
|
http:
|
||||||
method: GET
|
method: GET
|
||||||
url: '{{base_url}}/api/media-items?library_id={{library_id}}&sort=title+ASC&limit=10&offset=0'
|
url: "{{base_url}}/api/media-items?library_id={{library_id}}&sort=title+ASC&limit=10&offset=0"
|
||||||
auth: inherit
|
|
||||||
body:
|
|
||||||
type: none
|
|
||||||
headers:
|
headers:
|
||||||
- key: Content-Type
|
- name: ""
|
||||||
value: application/json
|
value: application/json
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
|
|
||||||
docs: |-
|
docs: |-
|
||||||
## List Media Items with Sorting
|
## List Media Items with Sorting
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
info:
|
info:
|
||||||
name: Update Media Item
|
name: Update Media Item
|
||||||
type: http
|
type: http
|
||||||
seq: 16
|
seq: 10
|
||||||
|
|
||||||
http:
|
http:
|
||||||
method: PUT
|
method: PUT
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
info:
|
info:
|
||||||
name: Update Media Rating
|
name: Update Media Rating
|
||||||
type: http
|
type: http
|
||||||
seq: 14
|
seq: 9
|
||||||
|
|
||||||
http:
|
http:
|
||||||
method: PUT
|
method: PUT
|
||||||
|
|||||||
@@ -0,0 +1,89 @@
|
|||||||
|
info:
|
||||||
|
name: Field Values Search - Authors
|
||||||
|
type: http
|
||||||
|
seq: 6
|
||||||
|
|
||||||
|
http:
|
||||||
|
method: GET
|
||||||
|
url: "{{base_url}}/api/media-items/search?library_id={{library_id}}&author=orwell&limit=50"
|
||||||
|
params:
|
||||||
|
- name: library_id
|
||||||
|
value: "{{library_id}}"
|
||||||
|
type: query
|
||||||
|
- name: author
|
||||||
|
value: orwell
|
||||||
|
type: query
|
||||||
|
- name: limit
|
||||||
|
value: "50"
|
||||||
|
type: query
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
|
|
||||||
|
docs: |-
|
||||||
|
## Field Values Search - Authors
|
||||||
|
|
||||||
|
Fetches distinct author values for autocomplete dropdowns with counts and similarity scores.
|
||||||
|
|
||||||
|
**Method:** GET
|
||||||
|
|
||||||
|
**Endpoint:** /api/media-items/search
|
||||||
|
|
||||||
|
**Authentication:** Required (Bearer token)
|
||||||
|
|
||||||
|
**Query Parameters:**
|
||||||
|
- `library_id` (string, required): Library UUID to search within
|
||||||
|
- `author` (string, required): Author name to search for (fuzzy match)
|
||||||
|
- `limit` (integer, optional): Maximum results to return (default: 50)
|
||||||
|
|
||||||
|
**How It Works:**
|
||||||
|
- Returns distinct author names from the library
|
||||||
|
- Fuzzy matches the search query against author names
|
||||||
|
- Includes count of books per author
|
||||||
|
- Includes similarity score (0-1, higher = better match)
|
||||||
|
- Sorted by similarity score, then by count
|
||||||
|
|
||||||
|
**Use Case:**
|
||||||
|
- Populate autocomplete dropdown when user types in author filter field
|
||||||
|
- Show user available authors with book counts
|
||||||
|
- Help users discover similar author names
|
||||||
|
|
||||||
|
**Response:** HTTP 200 (OK)
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"results": [
|
||||||
|
{
|
||||||
|
"value": "Asimov, Isaac",
|
||||||
|
"count": 47,
|
||||||
|
"score": 0.8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "Asimov, Isaac & Robert Silverberg",
|
||||||
|
"count": 2,
|
||||||
|
"score": 0.75
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"total": 2
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Examples:**
|
||||||
|
- `author=asimov` → Returns "Asimov, Isaac" (47 books), "Asimov, Isaac & Robert Silverberg" (2 books)
|
||||||
|
- `author=rowling` → Returns "Rowling, J.K." (10 books)
|
||||||
|
- `author=tolkien` → Returns "Tolkien, J.R.R." (15 books)
|
||||||
|
|
||||||
|
**Frontend Integration:**
|
||||||
|
- Call this endpoint when user types ≥2 characters in author field
|
||||||
|
- Display results in `<datalist>` or custom dropdown
|
||||||
|
- Show: "Author Name (count)" format
|
||||||
|
- Allow user to select from suggestions
|
||||||
|
|
||||||
|
**Success Criteria:**
|
||||||
|
- Status: 200
|
||||||
|
- Returns array of author values with counts
|
||||||
|
- Results sorted by relevance (similarity score)
|
||||||
|
- Only returns authors matching the fuzzy search
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
info:
|
||||||
|
name: Field Values Search - Genres
|
||||||
|
type: http
|
||||||
|
seq: 3
|
||||||
|
|
||||||
|
http:
|
||||||
|
method: GET
|
||||||
|
url: "{{base_url}}/api/media-items/search?library_id={{library_id}}&tags=sci&limit=50"
|
||||||
|
params:
|
||||||
|
- name: library_id
|
||||||
|
value: "{{library_id}}"
|
||||||
|
type: query
|
||||||
|
- name: tags
|
||||||
|
value: sci
|
||||||
|
type: query
|
||||||
|
- name: limit
|
||||||
|
value: "50"
|
||||||
|
type: query
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
|
|
||||||
|
docs: |-
|
||||||
|
## Field Values Search - Genres
|
||||||
|
|
||||||
|
Fetches distinct tags values for autocomplete dropdowns with counts and similarity scores.
|
||||||
|
|
||||||
|
**Method:** GET
|
||||||
|
|
||||||
|
**Endpoint:** /api/media-items/search
|
||||||
|
|
||||||
|
**Authentication:** Required (Bearer token)
|
||||||
|
|
||||||
|
**Query Parameters:**
|
||||||
|
- `library_id` (string, required): Library UUID to search within
|
||||||
|
- `tags` (string, required): Genre name to search for (fuzzy match)
|
||||||
|
- `limit` (integer, optional): Maximum results to return (default: 50)
|
||||||
|
|
||||||
|
**How It Works:**
|
||||||
|
- Returns distinct tags names from the library
|
||||||
|
- Fuzzy matches the search query against tags names
|
||||||
|
- Includes count of books per tags
|
||||||
|
- Includes similarity score (0-1, higher = better match)
|
||||||
|
- Sorted by similarity score, then by count
|
||||||
|
|
||||||
|
**Use Case:**
|
||||||
|
- Populate autocomplete dropdown when user types in tags filter field
|
||||||
|
- Show user available tagss with book counts
|
||||||
|
- Help users discover similar tags names
|
||||||
|
|
||||||
|
**Response:** HTTP 200 (OK)
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"results": [
|
||||||
|
{
|
||||||
|
"value": "Sci-Fi",
|
||||||
|
"count": 234,
|
||||||
|
"score": 0.85
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "Science Fiction",
|
||||||
|
"count": 156,
|
||||||
|
"score": 0.82
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"total": 2
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Examples:**
|
||||||
|
- `tags=sci` → Returns "Sci-Fi" (234 books), "Science Fiction" (156 books)
|
||||||
|
- `tags=fant` → Returns "Fantasy" (345 books), "High Fantasy" (89 books)
|
||||||
|
- `tags=mystery` → Returns "Mystery" (123 books), "Mystery/Thriller" (45 books)
|
||||||
|
|
||||||
|
**Frontend Integration:**
|
||||||
|
- Call this endpoint when user types ≥2 characters in tags field
|
||||||
|
- Display results in `<datalist>` or custom dropdown
|
||||||
|
- Show: "Genre Name (count)" format
|
||||||
|
- Allow user to select from suggestions
|
||||||
|
|
||||||
|
**Success Criteria:**
|
||||||
|
- Status: 200
|
||||||
|
- Returns array of tags values with counts
|
||||||
|
- Results sorted by relevance (similarity score)
|
||||||
|
- Only returns tagss matching the fuzzy search
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
info:
|
||||||
|
name: Field Values Search - Languages
|
||||||
|
type: http
|
||||||
|
seq: 3
|
||||||
|
|
||||||
|
http:
|
||||||
|
method: GET
|
||||||
|
url: "{{base_url}}/api/media-items/search?library_id={{library_id}}&language=eng&limit=50"
|
||||||
|
params:
|
||||||
|
- name: library_id
|
||||||
|
value: "{{library_id}}"
|
||||||
|
type: query
|
||||||
|
- name: language
|
||||||
|
value: eng
|
||||||
|
type: query
|
||||||
|
- name: limit
|
||||||
|
value: "50"
|
||||||
|
type: query
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
|
|
||||||
|
docs: |-
|
||||||
|
## Field Values Search - Languages
|
||||||
|
|
||||||
|
Fetches distinct language values for autocomplete dropdowns with counts and similarity scores.
|
||||||
|
|
||||||
|
**Method:** GET
|
||||||
|
|
||||||
|
**Endpoint:** /api/media-items/search
|
||||||
|
|
||||||
|
**Authentication:** Required (Bearer token)
|
||||||
|
|
||||||
|
**Query Parameters:**
|
||||||
|
- `library_id` (string, required): Library UUID to search within
|
||||||
|
- `language` (string, required): Language name/code to search for (fuzzy match)
|
||||||
|
- `limit` (integer, optional): Maximum results to return (default: 50)
|
||||||
|
|
||||||
|
**How It Works:**
|
||||||
|
- Returns distinct language names from the library
|
||||||
|
- Fuzzy matches the search query against language names
|
||||||
|
- Includes count of books per language
|
||||||
|
- Includes similarity score (0-1, higher = better match)
|
||||||
|
- Sorted by similarity score, then by count
|
||||||
|
|
||||||
|
**Use Case:**
|
||||||
|
- Populate autocomplete dropdown when user types in language filter field
|
||||||
|
- Show user available languages with book counts
|
||||||
|
- Help users discover similar language codes/names
|
||||||
|
|
||||||
|
**Response:** HTTP 200 (OK)
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"results": [
|
||||||
|
{
|
||||||
|
"value": "English",
|
||||||
|
"count": 1245,
|
||||||
|
"score": 0.9
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "eng",
|
||||||
|
"count": 856,
|
||||||
|
"score": 0.85
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"total": 2
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Examples:**
|
||||||
|
- `language=eng` → Returns "English" (1245 books), "eng" (856 books)
|
||||||
|
- `language=fre` → Returns "French" (234 books), "fre" (123 books)
|
||||||
|
- `language=german` → Returns "German" (189 books), "deutsch" (45 books)
|
||||||
|
|
||||||
|
**Frontend Integration:**
|
||||||
|
- Call this endpoint when user types ≥2 characters in language field
|
||||||
|
- Display results in `<datalist>` or custom dropdown
|
||||||
|
- Show: "Language Name (count)" format
|
||||||
|
- Allow user to select from suggestions
|
||||||
|
|
||||||
|
**Success Criteria:**
|
||||||
|
- Status: 200
|
||||||
|
- Returns array of language values with counts
|
||||||
|
- Results sorted by relevance (similarity score)
|
||||||
|
- Only returns languages matching the fuzzy search
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
info:
|
||||||
|
name: Field Values Search - Series
|
||||||
|
type: http
|
||||||
|
seq: 3
|
||||||
|
|
||||||
|
http:
|
||||||
|
method: GET
|
||||||
|
url: "{{base_url}}/api/media-items/search?library_id={{library_id}}&series=haley&limit=50"
|
||||||
|
params:
|
||||||
|
- name: library_id
|
||||||
|
value: "{{library_id}}"
|
||||||
|
type: query
|
||||||
|
- name: series
|
||||||
|
value: haley
|
||||||
|
type: query
|
||||||
|
- name: limit
|
||||||
|
value: "50"
|
||||||
|
type: query
|
||||||
|
auth: inherit
|
||||||
|
|
||||||
|
settings:
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
followRedirects: true
|
||||||
|
maxRedirects: 5
|
||||||
|
|
||||||
|
docs: |-
|
||||||
|
## Field Values Search - Series
|
||||||
|
|
||||||
|
Fetches distinct series values for autocomplete dropdowns with counts and similarity scores.
|
||||||
|
|
||||||
|
**Method:** GET
|
||||||
|
|
||||||
|
**Endpoint:** /api/media-items/search
|
||||||
|
|
||||||
|
**Authentication:** Required (Bearer token)
|
||||||
|
|
||||||
|
**Query Parameters:**
|
||||||
|
- `library_id` (string, required): Library UUID to search within
|
||||||
|
- `series` (string, required): Series name to search for (fuzzy match)
|
||||||
|
- `limit` (integer, optional): Maximum results to return (default: 50)
|
||||||
|
|
||||||
|
**How It Works:**
|
||||||
|
- Returns distinct series names from the library
|
||||||
|
- Fuzzy matches the search query against series names
|
||||||
|
- Includes count of books per series
|
||||||
|
- Includes similarity score (0-1, higher = better match)
|
||||||
|
- Sorted by similarity score, then by count
|
||||||
|
|
||||||
|
**Use Case:**
|
||||||
|
- Populate autocomplete dropdown when user types in series filter field
|
||||||
|
- Show user available series with book counts
|
||||||
|
- Help users discover similar series names
|
||||||
|
|
||||||
|
**Response:** HTTP 200 (OK)
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"results": [
|
||||||
|
{
|
||||||
|
"value": "Foundation",
|
||||||
|
"count": 7,
|
||||||
|
"score": 0.9
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "Foundation Series",
|
||||||
|
"count": 7,
|
||||||
|
"score": 0.85
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"total": 2
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Examples:**
|
||||||
|
- `series=foundation` → Returns "Foundation" (7 books), "Foundation Series" (7 books)
|
||||||
|
- `series=harry` → Returns "Harry Potter" (10 books)
|
||||||
|
- `series=lord` → Returns "Lord of the Rings" (3 books)
|
||||||
|
|
||||||
|
**Frontend Integration:**
|
||||||
|
- Call this endpoint when user types ≥2 characters in series field
|
||||||
|
- Display results in `<datalist>` or custom dropdown
|
||||||
|
- Show: "Series Name (count)" format
|
||||||
|
- Allow user to select from suggestions
|
||||||
|
|
||||||
|
**Success Criteria:**
|
||||||
|
- Status: 200
|
||||||
|
- Returns array of series values with counts
|
||||||
|
- Results sorted by relevance (similarity score)
|
||||||
|
- Only returns series matching the fuzzy search
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
info:
|
||||||
|
name: filters
|
||||||
|
type: folder
|
||||||
|
seq: 7
|
||||||
|
|
||||||
|
request:
|
||||||
|
auth: inherit
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
info:
|
info:
|
||||||
name: Search Media Items
|
name: Search Media Items
|
||||||
type: http
|
type: http
|
||||||
seq: 1
|
seq: 2
|
||||||
|
|
||||||
http:
|
http:
|
||||||
method: GET
|
method: GET
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
info:
|
info:
|
||||||
name: scenarios
|
name: search
|
||||||
type: folder
|
type: folder
|
||||||
seq: 20
|
seq: 6
|
||||||
|
|
||||||
request: {}
|
request: {}
|
||||||
Reference in New Issue
Block a user