-
Notifications
You must be signed in to change notification settings - Fork 0
Playlists
Matthew Martin edited this page Jun 9, 2020
·
2 revisions
Returns a list of the playlists currently on the machine
Body: application/json
[
{
"label": string - a human readable title of the playlist
"uid": string - the unique identifier for the playlist
},
]
Uploads a new playlist to the machine
Body: application/json
{
"label": string - a human readable title of the playlist
"description": string - a description of the playlist
"files":
[
{
"uid": string - the unique identifier for the audio resource to play,
"times_to_play": integer - the number of times to play the audio resource. -1 = keep playing,
},...
]
}
The playlist has been uploaded successfully
Body: application/json
{
"result": boolean - true if this particular playlist was uploaded,
"uid": string - the unique id of the resource that has been uploaded
}
The data sent to the endpoint was incorrect in some way
Body: application/json
{
"result": boolean - false,
"reason":
[
an array of strings giving the reasons for the failure
],
"data":
{
the json that was sent to the server
}
}
A playlist already exists on the server with the given label or the server could not create a unique id
Body: application/json
{
"result": boolean - false,
"reason":
[
an array of strings giving the reasons for the failure
],
"data":
{
the json that was sent to the server
}
}
Returned when the system has been locked using the Status API endpoint
Body: application/json
{
"result": false,
"reason":
[
"the system is locked"
]
}