cuteRadio Data API
About
The cuteRadio Data API is a free internet radio service providing access to a large database of internet radio stations.Features of the cuteRadio Data API include:
- Browse stations by country, genre or language.
- Search stations.
- Access your recently played stations (requires authentication).
- Add stations to your favourites for easy access (requires authentication).
- Create/edit stations (requires authentication).
Authentication
Access to user-specific resources (favourites, played stations, searches) requires authentication. Since no personal data is stored, the cuteRadio Data API keeps things simple by using basic authentication. However, rather than provide a username and password for each request, authentication is performed by supplying an access token as the username.Obtaining an access token
Access tokens are obtained by making a POST request to /token with a username and password:
curl -d 'username=$USERNAME&password=$PASSWORD' -H 'Content-Type: application/www-form-urlencoded' \
http://marxoft.co.uk/api/cuteradio/token
If the request is successful, the server will repsond with token in JSON format:
{"id": $USER_ID, "token": $ACCESS_TOKEN, "roles": "user"}
The token can then be store by the application.
Using the access token
To authenticate, provide the access token as the username (leave the password empty) using basic authentication:
curl -u '$ACCESS_TOKEN:' http://marxoft.co.uk/api/cuteradio/favourites
Resources
Below are the various different resource types accessible via the cuteRadio Data API:
Name | Description |
---|---|
Countries | Identifies a country to which one or more stations belong. |
Favourites | Identifies a station resource favourited by an authenticated user. |
Genres | Identifies a genre to which one or more stations belong. |
Languages | Identifies a country to which one or more stations belong. |
Played stations | Identifies a station resource marked as played by an authenticated user. |
Searches | Identifies a keyword search performed by an authenticated user. |
Stations | Identifies a station resource. |