Onzr 0.1.0
Endpoints
GET /queue/
Queue List
Description
List queue tracks.
Response 200 OK
{
"playing": null,
"tracks": [
{
"current": true,
"position": 0,
"track": {
"id": 0,
"title": "string",
"album": "string",
"artist": "string"
}
}
]
}
Schema of the response body
{
"properties": {
"playing": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Playing"
},
"tracks": {
"items": {
"$ref": "#/components/schemas/QueuedTrack"
},
"type": "array",
"title": "Tracks"
}
},
"type": "object",
"required": [
"playing",
"tracks"
],
"title": "QueuedTracks",
"description": "Queued Tracks list."
}
POST /queue/
Queue Add
Description
Add tracks to queue given their identifiers.
Request body
Response 200 OK
Response 422 Unprocessable Entity
DELETE /queue/
Queue Clear
Description
Clear tracks queue.
Response 200 OK
GET /queue/{rank}/stream
Stream Track
Description
Stream Deezer track given its identifer.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
rank |
path | integer | No |
Response 200 OK
Response 422 Unprocessable Entity
GET /now
Now Playing
Description
Get info about current track.
Response 200 OK
Schema of the response body
POST /play
Play
Description
Start playing current queue.
Request body
Response 200 OK
Response 422 Unprocessable Entity
POST /pause
Pause
Description
Pause/resume playing.
Response 200 OK
POST /stop
Stop
Description
Stop playing.
Response 200 OK
POST /next
Next
Description
Play next track in queue.
Response 200 OK
POST /previous
Previous
Description
Play previous track in queue.
Response 200 OK
GET /state
State
Description
Server state.
Response 200 OK
GET /ping
Ping
Description
Server ping.
Response 200 OK
Schemas
HTTPValidationError
| Name | Type |
|---|---|
detail |
Array<ValidationError> |
PlayerControl
| Name | Type |
|---|---|
action |
string |
state |
ServerState |
PlayerState
| Name | Type |
|---|---|
length |
integer |
position |
number |
state |
string |
time |
integer |
PlayingState
| Name | Type |
|---|---|
player |
PlayerState |
track |
PlayQueryParams
| Name | Type |
|---|---|
rank |
QueuedTrack
| Name | Type |
|---|---|
current |
boolean |
position |
integer |
track |
TrackShort |
QueuedTracks
| Name | Type |
|---|---|
playing |
|
tracks |
Array<QueuedTrack> |
QueueState
| Name | Type |
|---|---|
playing |
|
queued |
integer |
ServerMessage
| Name | Type |
|---|---|
message |
string |
ServerState
| Name | Type |
|---|---|
player |
string |
queue |
QueueState |
TrackShort
| Name | Type |
|---|---|
album |
string |
artist |
string |
id |
integer |
title |
string |
ValidationError
| Name | Type |
|---|---|
loc |
Array<> |
msg |
string |
type |
string |