2024-02-02 18:36:47 +00:00
|
|
|
|
# Alt-Text Backend
|
|
|
|
|
|
|
|
|
|
## ROUTES
|
|
|
|
|
|
|
|
|
|
### /books
|
|
|
|
|
|
|
|
|
|
#### GET
|
|
|
|
|
|
|
|
|
|
##### FUNCTION
|
|
|
|
|
|
|
|
|
|
Gets a list of books from database
|
|
|
|
|
|
|
|
|
|
##### PARAMS
|
|
|
|
|
|
|
|
|
|
- query (string) | ensures book titles must have ‘query’ as a substring
|
|
|
|
|
- skip (int) | skips ‘skip’ amount of books from the result
|
|
|
|
|
- limit (int) | limits the amount of books returned to ‘limit’
|
|
|
|
|
|
|
|
|
|
##### RETURNS
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
[
|
|
|
|
|
{
|
2024-02-08 20:09:34 +00:00
|
|
|
|
uuid: string,
|
2024-02-02 18:36:47 +00:00
|
|
|
|
title: string,
|
|
|
|
|
description: string,
|
|
|
|
|
cover: string,
|
|
|
|
|
},
|
|
|
|
|
...
|
|
|
|
|
]
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### POST
|
|
|
|
|
|
|
|
|
|
##### FUNCTION
|
|
|
|
|
|
|
|
|
|
Adds a book to the database and starts initial processing
|
|
|
|
|
|
|
|
|
|
##### FIELDS
|
|
|
|
|
|
|
|
|
|
- title (string) | desired title for new book
|
|
|
|
|
- description (string) | desired description for new book
|
|
|
|
|
- cover (image_file) | desired cover image for new book
|
|
|
|
|
- file (file[.zip]) | book file (html and images bundled)
|
|
|
|
|
|
|
|
|
|
##### RETURNS
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
{
|
2024-02-08 20:09:34 +00:00
|
|
|
|
uuid: string,
|
2024-02-02 18:36:47 +00:00
|
|
|
|
title: string,
|
|
|
|
|
description: string,
|
|
|
|
|
cover: string,
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### /books/:bookid
|
|
|
|
|
|
|
|
|
|
#### GET
|
|
|
|
|
|
|
|
|
|
#### PATCH
|
|
|
|
|
|
|
|
|
|
#### DELETE
|
|
|
|
|
|
2024-02-08 20:09:34 +00:00
|
|
|
|
### /books/:bookid/export
|
|
|
|
|
|
|
|
|
|
#### GET
|
|
|
|
|
|
|
|
|
|
### /books/:bookid/analyze
|
|
|
|
|
|
|
|
|
|
#### GET
|
|
|
|
|
|
2024-02-02 18:36:47 +00:00
|
|
|
|
### /books/:bookid/images
|
|
|
|
|
|
|
|
|
|
#### GET
|
|
|
|
|
|
|
|
|
|
#### PATCH
|
|
|
|
|
|
|
|
|
|
### /books/:bookid/images/:imagesrc
|
|
|
|
|
|
|
|
|
|
#### GET
|
|
|
|
|
|
|
|
|
|
#### PATCH
|