Played stations
About
A played station resource identifies a station that has been marked as played by the authenticated user.Methods
The API supports the following methods, all of which require a valid access token:
Method | Endpoint | Description |
---|---|---|
GET | /playedstations | Retrieves a list of played stations on behalf of the authenticated user. |
POST | /playedstations | Marks a station as played on behalf of the authenticated user. |
DELETE | /playedstations/$STATION_ID | Removes a station from the authenticated user's played stations. |
GET /playedstations
Request
GET http://marxoft.co.uk/api/cuteradio/playedstations
Parameters
Name | Description |
---|---|
limit | integer The maximum number of results that should be returned. Must be between 1 and 50. The default is 20. |
offset | integer The index of the first result to be returned. The index is 0-based. |
Response
{
"items": [
$STATION
],
"next": "/playedstations?limit=20&offset=20"
}
Errors
Error type | Description |
---|---|
403 - Forbidden | No valid access token was provided. |
POST /playedstations
Request
POST http://marxoft.co.uk/api/cuteradio/playedstations
Request body
Name | Description |
---|---|
stationId | integer The unique identifier of the station to be marked as played. |
Response
The API will return a station resource.Errors
Error type | Description |
---|---|
403 - Forbidden | No valid access token was provided. |
404 - Not found | The station identified by 'stationId' could not be found. |
DELETE /playedstations/$STATION_ID
Request
DELETE http://marxoft.co.uk/api/cuteradio/playedstations/$STATION_ID
Response
The API will return a 204 response code.Errors
Error type | Description |
---|---|
403 - Forbidden | No valid access token was provided. |
404 - Not found | The station does not exist in the authenticated user's played stations. |