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:
cottongin
2026-03-12 02:33:42 -04:00
parent b529edecc3
commit 1d08580a45
6 changed files with 99 additions and 2 deletions

View File

@@ -37,7 +37,8 @@ Full documentation: [`docs/api.md`](docs/api.md)
| `/playlist` | GET | -- | Current week's playlist |
| `/playlist/{position}` | GET | -- | Single track by position (1-indexed) |
| `/shows` | GET | -- | List all shows (paginated) |
| `/shows/{show_id}` | GET | -- | Specific show with tracks |
| `/shows/by-episode/{episode_number}` | GET | -- | Look up show by episode number |
| `/shows/{show_id}` | GET | -- | Specific show by internal ID |
| `/admin/refresh` | POST | Bearer | Trigger immediate SoundCloud fetch |
| `/admin/tracks` | POST | Bearer | Add track to current show |
| `/admin/tracks/{track_id}` | DELETE | Bearer | Remove track from current show |