docs: auto-generate API route documentation
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Id0d1f9769b7ccdbf83d5fa78adef62e46a6a6964
This commit is contained in:
parent
9d58927cb4
commit
934691c0f9
40 changed files with 17444 additions and 1 deletions
57
docs/api/photos.md
Normal file
57
docs/api/photos.md
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
# Photos
|
||||
|
||||
Photo timeline and map view
|
||||
|
||||
## Endpoints
|
||||
|
||||
### GET /api/v1/photos/map
|
||||
|
||||
Get photos in a bounding box for map view
|
||||
|
||||
**Authentication:** Required (Bearer JWT)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | In | Required | Description |
|
||||
|------|----|----------|-------------|
|
||||
| `lat1` | query | Yes | Bounding box latitude 1 |
|
||||
| `lon1` | query | Yes | Bounding box longitude 1 |
|
||||
| `lat2` | query | Yes | Bounding box latitude 2 |
|
||||
| `lon2` | query | Yes | Bounding box longitude 2 |
|
||||
|
||||
#### Responses
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 200 | Map markers |
|
||||
| 400 | Bad request |
|
||||
| 401 | Unauthorized |
|
||||
| 500 | Internal server error |
|
||||
|
||||
---
|
||||
|
||||
### GET /api/v1/photos/timeline
|
||||
|
||||
Get timeline of photos grouped by date
|
||||
|
||||
**Authentication:** Required (Bearer JWT)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | In | Required | Description |
|
||||
|------|----|----------|-------------|
|
||||
| `group_by` | query | No | Grouping: day, month, year |
|
||||
| `year` | query | No | Filter by year |
|
||||
| `month` | query | No | Filter by month |
|
||||
| `limit` | query | No | Max items (default 10000) |
|
||||
|
||||
#### Responses
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 200 | Photo timeline groups |
|
||||
| 401 | Unauthorized |
|
||||
| 500 | Internal server error |
|
||||
|
||||
---
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue