pinakes/docs/api/subtitles.md
NotAShelf 9e5eb41d39
nix: set up project-wide formatter
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I4806c58aa0a17f504c9312723ad770166a6a6964
2026-03-22 23:58:28 +03:00

119 lines
2.3 KiB
Markdown
Vendored

# 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 |
---