feat: add GET /shows/by-episode/{episode_number} endpoint
Allows looking up shows by episode number instead of internal DB ID, enabling IRC bot commands like !playlist 530 to resolve directly. Made-with: Cursor
This commit is contained in:
32
docs/api.md
32
docs/api.md
@@ -117,9 +117,39 @@ Lists all shows, ordered by week start date (newest first).
|
||||
|
||||
---
|
||||
|
||||
### `GET /shows/by-episode/{episode_number}`
|
||||
|
||||
Look up a show by its episode number. This is the recommended endpoint for IRC bot integrations (e.g. `!playlist 530`).
|
||||
|
||||
**Path Parameters**
|
||||
|
||||
| Parameter | Type | Description |
|
||||
|-----------|------|-------------|
|
||||
| `episode_number` | integer | The episode number (e.g. 530) |
|
||||
|
||||
**Response**
|
||||
|
||||
```json
|
||||
{
|
||||
"show_id": 10,
|
||||
"episode_number": 530,
|
||||
"week_start": "2026-03-05T02:00:00+00:00",
|
||||
"week_end": "2026-03-12T02:00:00+00:00",
|
||||
"tracks": [...]
|
||||
}
|
||||
```
|
||||
|
||||
**Errors**
|
||||
|
||||
| Status | Detail |
|
||||
|--------|--------|
|
||||
| 404 | `"No show with episode number {n}"` |
|
||||
|
||||
---
|
||||
|
||||
### `GET /shows/{show_id}`
|
||||
|
||||
Returns a specific show with its full track listing.
|
||||
Returns a specific show by internal database ID.
|
||||
|
||||
**Path Parameters**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user