Add recommended queue endpoint and audio feature methods for song model
This commit is contained in:
parent
98baaed484
commit
f99ae52c4a
4 changed files with 282 additions and 0 deletions
|
@ -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}¤tSongId={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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue