First Commit. AI Generated App.
This commit is contained in:
@@ -1,25 +1,34 @@
|
||||
meta:
|
||||
meta {
|
||||
name: Create Ebook
|
||||
type: http
|
||||
seq: 3
|
||||
http:
|
||||
method: post
|
||||
url: "{{base_url}}/api/ebooks"
|
||||
auth:
|
||||
type: bearer
|
||||
body:
|
||||
type: json
|
||||
data: |
|
||||
{
|
||||
"title": "Sample Book",
|
||||
"author": "Sample Author",
|
||||
"isbn": "1234567890",
|
||||
"description": "A sample ebook",
|
||||
"file_path": "/uploads/sample.epub",
|
||||
"file_size": 1024000,
|
||||
"mime_type": "application/epub+zip",
|
||||
"cover_image_path": "/uploads/cover.jpg"
|
||||
}
|
||||
docs: |
|
||||
}
|
||||
|
||||
post {
|
||||
url: http://localhost:8765/api/ebooks
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"title": "Sample Book",
|
||||
"author": "Sample Author",
|
||||
"isbn": "1234567890",
|
||||
"description": "A sample ebook",
|
||||
"file_path": "/uploads/sample.epub",
|
||||
"file_size": 1024000,
|
||||
"mime_type": "application/epub+zip",
|
||||
"cover_image_path": "/uploads/cover.jpg"
|
||||
}
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
|
||||
docs {
|
||||
## Create Ebook
|
||||
|
||||
Creates a new ebook entry in the library.
|
||||
@@ -40,4 +49,5 @@ docs: |
|
||||
|
||||
**Error Responses:**
|
||||
- 401: Invalid authentication
|
||||
- 400: Invalid request data
|
||||
- 400: Invalid request data
|
||||
}
|
||||
@@ -1,16 +1,24 @@
|
||||
meta:
|
||||
meta {
|
||||
name: Delete Ebook
|
||||
type: http
|
||||
seq: 5
|
||||
http:
|
||||
method: delete
|
||||
url: "{{base_url}}/api/ebooks/{{ebook_id}}"
|
||||
auth:
|
||||
type: bearer
|
||||
vars:
|
||||
pre-request:
|
||||
- name: ebook_id
|
||||
value: "123e4567-e89b-12d3-a456-426614174000"
|
||||
docs: |
|
||||
}
|
||||
|
||||
delete {
|
||||
url: http://localhost:8765/api/ebooks/123e4567-e89b-12d3-a456-426614174000
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
docs {
|
||||
## Delete Ebook
|
||||
|
||||
Removes an ebook from the library.
|
||||
@@ -24,4 +32,5 @@ docs: |
|
||||
|
||||
**Error Responses:**
|
||||
- 401: Invalid authentication
|
||||
- 404: Ebook not found
|
||||
- 404: Ebook not found
|
||||
}
|
||||
@@ -1,16 +1,24 @@
|
||||
meta:
|
||||
meta {
|
||||
name: Get Ebook
|
||||
type: http
|
||||
seq: 2
|
||||
http:
|
||||
method: get
|
||||
url: "{{base_url}}/api/ebooks/{{ebook_id}}"
|
||||
auth:
|
||||
type: bearer
|
||||
vars:
|
||||
pre-request:
|
||||
- name: ebook_id
|
||||
value: "123e4567-e89b-12d3-a456-426614174000"
|
||||
docs: |
|
||||
}
|
||||
|
||||
get {
|
||||
url: http://localhost:8765/api/ebooks/123e4567-e89b-12d3-a456-426614174000
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
docs {
|
||||
## Get Ebook
|
||||
|
||||
Retrieves details of a specific ebook.
|
||||
@@ -24,4 +32,5 @@ docs: |
|
||||
|
||||
**Error Responses:**
|
||||
- 401: Invalid authentication
|
||||
- 404: Ebook not found
|
||||
- 404: Ebook not found
|
||||
}
|
||||
@@ -1,12 +1,22 @@
|
||||
meta:
|
||||
meta {
|
||||
name: List Ebooks
|
||||
type: http
|
||||
seq: 1
|
||||
http:
|
||||
method: get
|
||||
url: "{{base_url}}/api/ebooks"
|
||||
auth:
|
||||
type: bearer
|
||||
docs: |
|
||||
}
|
||||
|
||||
get {
|
||||
url: http://localhost:8765/api/ebooks
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
|
||||
|
||||
|
||||
docs {
|
||||
## List Ebooks
|
||||
|
||||
Retrieves a paginated list of ebooks.
|
||||
@@ -20,4 +30,5 @@ docs: |
|
||||
**Response:** Array of ebook objects with id, title, author, etc.
|
||||
|
||||
**Error Responses:**
|
||||
- 401: Invalid authentication
|
||||
- 401: Invalid authentication
|
||||
}
|
||||
@@ -1,24 +1,29 @@
|
||||
meta:
|
||||
meta {
|
||||
name: Update Ebook
|
||||
type: http
|
||||
seq: 4
|
||||
http:
|
||||
method: put
|
||||
url: "{{base_url}}/api/ebooks/{{ebook_id}}"
|
||||
auth:
|
||||
type: bearer
|
||||
body:
|
||||
type: json
|
||||
data: |
|
||||
{
|
||||
"title": "Updated Book Title",
|
||||
"author": "Updated Author",
|
||||
"description": "Updated description"
|
||||
}
|
||||
vars:
|
||||
pre-request:
|
||||
- name: ebook_id
|
||||
value: "123e4567-e89b-12d3-a456-426614174000"
|
||||
docs: |
|
||||
}
|
||||
|
||||
put {
|
||||
url: http://localhost:8765/api/ebooks/123e4567-e89b-12d3-a456-426614174000
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"title": "Updated Book Title",
|
||||
"author": "Updated Author",
|
||||
"description": "Updated description"
|
||||
}
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
|
||||
docs {
|
||||
## Update Ebook
|
||||
|
||||
Updates an existing ebook's metadata.
|
||||
@@ -40,4 +45,5 @@ docs: |
|
||||
**Error Responses:**
|
||||
- 401: Invalid authentication
|
||||
- 404: Ebook not found
|
||||
- 400: Invalid request data
|
||||
- 400: Invalid request data
|
||||
}
|
||||
Reference in New Issue
Block a user