feat: create Bruno requests for library system API
- Add library management requests (CRUD operations) - Create media items API requests for library content - Implement library visibility controls - Add user library access management - Update deprecated ebook folder endpoints with migration guide - Include comprehensive documentation and test cases - Replace collection.bru with proper dashboard request Complete Bruno collection supporting new multi-library architecture
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
meta {
|
||||
name: Add Library Folder,
|
||||
type: http,
|
||||
seq: 1
|
||||
}
|
||||
|
||||
post {
|
||||
url: "/api/libraries/{{ _.libraryId }}/folders"
|
||||
headers: {
|
||||
Authorization: "Bearer {{ _.token }}",
|
||||
Content-Type: "application/json"
|
||||
}
|
||||
body: {
|
||||
folder_path: "/path/to/library/media"
|
||||
}
|
||||
}
|
||||
|
||||
tests: {
|
||||
test_add_folder_success: {
|
||||
status: 201,
|
||||
headers: {
|
||||
"content-type": "application/json"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
meta {
|
||||
name: Create Library,
|
||||
type: http,
|
||||
seq: 1
|
||||
}
|
||||
|
||||
post {
|
||||
url: "/api/libraries"
|
||||
headers: {
|
||||
Authorization: "Bearer {{ _.token }}",
|
||||
Content-Type: "application/json"
|
||||
}
|
||||
body: {
|
||||
name: "My Ebook Library",
|
||||
description: "A collection of technical books and novels",
|
||||
type: "ebooks"
|
||||
}
|
||||
}
|
||||
|
||||
tests: {
|
||||
test_create_library_success: {
|
||||
status: 201,
|
||||
headers: {
|
||||
"content-type": "application/json"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
meta {
|
||||
name: Get Libraries (Admin),
|
||||
type: http,
|
||||
seq: 1
|
||||
}
|
||||
|
||||
get {
|
||||
url: "/api/libraries"
|
||||
headers: {
|
||||
Authorization: "Bearer {{ _.token }}",
|
||||
Content-Type: "application/json"
|
||||
}
|
||||
}
|
||||
|
||||
tests: {
|
||||
test_get_libraries_success: {
|
||||
status: 200,
|
||||
headers: {
|
||||
"content-type": "application/json"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
meta {
|
||||
name: Get Library Folders,
|
||||
type: http,
|
||||
seq: 1
|
||||
}
|
||||
|
||||
get {
|
||||
url: "/api/libraries/{{ _.libraryId }}/folders"
|
||||
headers: {
|
||||
Authorization: "Bearer {{ _.token }}",
|
||||
Content-Type: "application/json"
|
||||
}
|
||||
}
|
||||
|
||||
tests: {
|
||||
test_get_folders_success: {
|
||||
status: 200,
|
||||
headers: {
|
||||
"content-type": "application/json"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
meta {
|
||||
name: Get Library Types
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
get {
|
||||
url: "/api/libraries/types"
|
||||
headers: {
|
||||
Authorization: "Bearer {{ _.token }}",
|
||||
Content-Type: "application/json"
|
||||
}
|
||||
}
|
||||
|
||||
tests: {
|
||||
test_library_types_success: {
|
||||
status: 200,
|
||||
headers: {
|
||||
"content-type": "application/json"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
meta {
|
||||
name: Get User Visible Libraries,
|
||||
type: http,
|
||||
seq: 1
|
||||
}
|
||||
|
||||
get {
|
||||
url: "/api/libraries/visible"
|
||||
headers: {
|
||||
Authorization: "Bearer {{ _.token }}",
|
||||
Content-Type: "application/json"
|
||||
}
|
||||
}
|
||||
|
||||
tests: {
|
||||
test_get_visible_libraries_success: {
|
||||
status: 200,
|
||||
headers: {
|
||||
"content-type": "application/json"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Set Library Visibility,
|
||||
type: http,
|
||||
seq: 1
|
||||
}
|
||||
|
||||
post {
|
||||
url: "/api/libraries/visibility"
|
||||
headers: {
|
||||
Authorization: "Bearer {{ _.token }}",
|
||||
Content-Type: "application/json"
|
||||
}
|
||||
body: {
|
||||
library_id: "{{ _.libraryId }}",
|
||||
is_visible: {{ _.isVisible }}
|
||||
}
|
||||
}
|
||||
|
||||
tests: {
|
||||
test_set_visibility_success: {
|
||||
status: 200,
|
||||
headers: {
|
||||
"content-type": "application/json"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user