First Commit. AI Generated App.

This commit is contained in:
2026-01-21 21:17:22 -05:00
parent ea70d85f9d
commit 4345b7bcdd
22 changed files with 449 additions and 208 deletions
+37
View File
@@ -0,0 +1,37 @@
meta {
name: Get Profile
type: http
seq: 1
}
get {
url: {{base_url}}/api/auth/profile
body: none
auth: inherit
}
settings {
encodeUrl: true
timeout: 0
}
docs {
## Get User Profile
Retrieves the authenticated user's profile.
**Method:** GET
**Endpoint:** /api/auth/profile
**Authentication:** Required
**Response:**
- `id` (string): User ID
- `email` (string): Email
- `username` (string): Username
**Status Codes:**
- 200: Success
- 401: Unauthorized
}
-23
View File
@@ -1,23 +0,0 @@
meta:
name: Get Profile
seq: 3
http:
method: get
url: "{{base_url}}/api/auth/profile"
auth:
type: bearer
docs: |
## Get User Profile
Retrieves the profile of the authenticated user.
**Authentication:** Required (Bearer token)
**Response:**
- `id` (string): User UUID
- `email` (string): User's email address
- `username` (string): User's username
**Error Responses:**
- 401: Invalid or missing JWT token
- 404: User not found
+45
View File
@@ -0,0 +1,45 @@
meta {
name: Login User
type: http
seq: 2
}
post {
url: {{base_url}}/api/auth/login
body: json
auth: inherit
}
body:json {
{
"login": "test@example.com",
"password": "password123"
}
}
docs {
## Login User
Authenticates a user with email/username and password.
**Method:** POST
**Endpoint:** /api/auth/login
**Request Body:**
- `login` (string): Email or username
- `password` (string): Password
**Response:**
- `token` (string): JWT token
- `user` (object): User details
**Status Codes:**
- 200: Success
- 401: Invalid credentials
}
settings {
encodeUrl: true
timeout: 0
}
-29
View File
@@ -1,29 +0,0 @@
meta:
name: Login User
seq: 2
http:
method: post
url: "{{base_url}}/api/auth/login"
body:
type: json
data: |
{
"login": "test@example.com",
"password": "password123"
}
docs: |
## Login User
Authenticates a user and returns a JWT token.
**Request Body:**
- `login` (string, required): Email address or username
- `password` (string, required): User's password
**Response:**
- `token` (string): JWT authentication token (24h expiry)
- `user` (object): User profile with id, email, username
**Error Responses:**
- 401: Invalid credentials
- 400: Invalid request data
+47
View File
@@ -0,0 +1,47 @@
meta {
name: Register User
type: http
seq: 3
}
post {
url: {{base_url}}/api/auth/register
body: json
auth: inherit
}
body:json {
{
"email": "test@example.com",
"username": "testuser",
"password": "password123"
}
}
settings {
encodeUrl: true
timeout: 0
}
docs {
## Register User
Creates a new user account.
**Method:** POST
**Endpoint:** /api/auth/register
**Request Body:**
- `email` (string): Email address
- `username` (string): Username
- `password` (string): Password
**Response:**
- `token` (string): JWT token
- `user` (object): User details
**Status Codes:**
- 201: Created
- 409: User exists
}
-31
View File
@@ -1,31 +0,0 @@
meta:
name: Register User
seq: 1
http:
method: post
url: "{{base_url}}/api/auth/register"
body:
type: json
data: |
{
"email": "test@example.com",
"username": "testuser",
"password": "password123"
}
docs: |
## Register User
Creates a new user account with email, username, and password.
**Request Body:**
- `email` (string, required): Valid email address
- `username` (string, required): Unique username (3-50 chars)
- `password` (string, required): Password (min 6 chars)
**Response:**
- `token` (string): JWT authentication token
- `user` (object): User profile with id, email, username
**Error Responses:**
- 409: Email or username already exists
- 400: Invalid request data
+5
View File
@@ -0,0 +1,5 @@
{
"version": "1",
"name": "Bookmann API",
"type": "collection"
}
-4
View File
@@ -1,4 +0,0 @@
version: "1"
name: "Bookmann API"
type: collection
items: []
@@ -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
}
+3
View File
@@ -0,0 +1,3 @@
vars {
base_url: http://localhost:8765
}
-4
View File
@@ -1,4 +0,0 @@
name: localhost
variables:
- name: base_url
value: http://localhost:8765
@@ -1,16 +1,20 @@
meta:
meta {
name: Get Reading Progress
type: http
seq: 6
http:
method: get
url: "{{base_url}}/api/ebooks/{{ebook_id}}/progress"
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/progress
auth: inherit
}
settings {
encodeUrl: true
timeout: 0
}
docs {
## Get Reading Progress
Retrieves the authenticated user's reading progress for an ebook.
@@ -28,4 +32,5 @@ docs: |
- `last_read_at` (string): Last read timestamp
**Error Responses:**
- 401: Invalid authentication
- 401: Invalid authentication
}
@@ -1,23 +1,28 @@
meta:
meta {
name: Update Reading Progress
type: http
seq: 7
http:
method: put
url: "{{base_url}}/api/ebooks/{{ebook_id}}/progress"
auth:
type: bearer
body:
type: json
data: |
{
"current_page": 45,
"total_pages": 200
}
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/progress
body: json
auth: inherit
}
body:json {
{
"current_page": 45,
"total_pages": 200
}
}
settings {
encodeUrl: true
timeout: 0
}
docs {
## Update Reading Progress
Updates the authenticated user's reading progress for an ebook.
@@ -35,4 +40,5 @@ docs: |
**Error Responses:**
- 401: Invalid authentication
- 400: Invalid request data
- 400: Invalid request data
}
-3
View File
@@ -1,3 +0,0 @@
version: "1"
name: "Bookmann API Workspace"
type: workspace