Amazon Music Device API
Ratings
Some tracks allow the customer to assign thumbs-up and thumbs-down ratings in order to personalize and improve the selection of music presented to them through the service. These tracks will have a non-null trackRating
member in their TrackDefinition, which provides the current rating and a URL to which rating modifications should be reported.
Amazon Music uses a simple thumbs-up/thumbs-down rating system. While a track that support ratings is playing, the client should present the track’s current rating (if any), as given in the track rating object’s thumbRating
member, and provide controls to modify the rating.
“track_def_2”: {
“title”: “Roses (Imanbek Remix) [Explicit]“,
“trackRating”: {
“thumbRating”: “neutral”,
“ratingURI”: “../rating/f85658b1-a6ca-4f3c-87f2-7c13993ea46f/828b3354-03bb-43fb-a96f-182bb61de0c0/n/UNLIMITED_HD/20b38402-3454-4d48-9fdb-3a18a79d8b73/B08DNHRWN2/UNLIMITED_STATION”
},
},
When the user modifies a track’s rating, the client should report it by sending a TrackRatingRequest to the URI specified by the track rating object’s ratingURI
member. The TrackRatingResponse provides a confirmation message for the client to display to the customer and indicates whether the client should immediately skip to the next track with shouldSkip
, a boolean value.
Currently, only tracks belonging to Amazon Stations support ratings, but clients should not assume that this will always be the case.
Sample TrackRatingRequest
{
"thumbRating": "thumbs_up",
"trackPosition": 1000,
"wallClockTime": "2015-08-31T18:45:00.000Z"
}
Sample TrackRatingResponse
{
shouldSkip: false,
message: "We'll play more songs like this"
}
###
The next step is error handling. Click here to learn more.