pinakes/docs/api/subtitles.md
NotAShelf 934691c0f9
docs: auto-generate API route documentation
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Id0d1f9769b7ccdbf83d5fa78adef62e46a6a6964
2026-03-22 22:04:52 +03:00

120 lines
2.1 KiB
Markdown

# Subtitles
Media subtitle management
## Endpoints
### GET /api/v1/media/{id}/subtitles
**Authentication:** Required (Bearer JWT)
#### Parameters
| Name | In | Required | Description |
|------|----|----------|-------------|
| `id` | path | Yes | Media item ID |
#### Responses
| Status | Description |
|--------|-------------|
| 200 | Subtitles |
| 401 | Unauthorized |
| 404 | Not found |
---
### POST /api/v1/media/{id}/subtitles
**Authentication:** Required (Bearer JWT)
#### Parameters
| Name | In | Required | Description |
|------|----|----------|-------------|
| `id` | path | Yes | Media item ID |
#### Request Body
`Content-Type: application/json`
See `docs/api/openapi.json` for the full schema.
#### Responses
| Status | Description |
|--------|-------------|
| 200 | Subtitle added |
| 400 | Bad request |
| 401 | Unauthorized |
| 500 | Internal server error |
---
### GET /api/v1/media/{media_id}/subtitles/{subtitle_id}/content
**Authentication:** Required (Bearer JWT)
#### Parameters
| Name | In | Required | Description |
|------|----|----------|-------------|
| `media_id` | path | Yes | Media item ID |
| `subtitle_id` | path | Yes | Subtitle ID |
#### Responses
| Status | Description |
|--------|-------------|
| 200 | Subtitle content |
| 401 | Unauthorized |
| 404 | Not found |
---
### DELETE /api/v1/subtitles/{id}
**Authentication:** Required (Bearer JWT)
#### Parameters
| Name | In | Required | Description |
|------|----|----------|-------------|
| `id` | path | Yes | Subtitle ID |
#### Responses
| Status | Description |
|--------|-------------|
| 200 | Subtitle deleted |
| 401 | Unauthorized |
| 404 | Not found |
---
### PATCH /api/v1/subtitles/{id}/offset
**Authentication:** Required (Bearer JWT)
#### Parameters
| Name | In | Required | Description |
|------|----|----------|-------------|
| `id` | path | Yes | Subtitle ID |
#### Request Body
`Content-Type: application/json`
See `docs/api/openapi.json` for the full schema.
#### Responses
| Status | Description |
|--------|-------------|
| 200 | Offset updated |
| 401 | Unauthorized |
| 404 | Not found |
---