Add recommended queue endpoint and audio feature methods for song model

This commit is contained in:
Lukas Weger 2025-08-02 03:54:44 +02:00
parent 98baaed484
commit f99ae52c4a
4 changed files with 282 additions and 0 deletions

View file

@ -39,6 +39,8 @@ Authorization: Bearer <token>
#### Get Radio Station Queue
#### Get Recommended Queue
## Radio Station Management
#### Create Radio Station
@ -274,6 +276,39 @@ Retrieves the main song queue for a radio station. Returns a list of song object
}
```
#### Get Recommended Queue
**Endpoint:** `GET /api/songs/queue/recommended?radioStationId={radioStationId}&currentSongId={currentSongId}`
**Query Parameters:**
- `radioStationId` (required): The ID of the radio station
- `currentSongId` (optional): The ID of the currently playing song for similarity analysis
**Response:**
```json
{
"success": true,
"message": "Recommended queue retrieved successfully",
"data": [
{
"id": "4iV5W9uYEdYUVa79Axb7Rh",
"popularity": 85,
"tempo": 120.5,
"audioFeatures": {
"danceability": 0.8,
"energy": 0.7,
"valence": 0.6,
"acousticness": 0.1,
"instrumentalness": 0.0,
"speechiness": 0.04
}
}
]
}
```
## Error Responses
All error responses follow this format: