Jamendo Api Documentation
POST /v3.0/setuser/favorite
Description
Use this method to add a given track to the user's preferites (/users/tracks?relation='preferite') (also called 'Favorites' playlist in Jamendo.com). Note that if the track doesn't exist, no error will be raised, but the track will not appear in any read request of api and website.
Required parameters
client_id && access_token && track_id
Parameter List
Name | Type | Description |
---|---|---|
client_id | string | A Client Id provided by devportal.jamendo.com |
format | enum: {xml, json, jsonpretty} | The results formatting type |
fullcount | boolean | Setting this parameter to true, the document header will be enriched with the 'results_fullcount' value, that is, the absolute number of rows the query would return if there was no limit and offset parameter. This value is of course very useful for pagination, but please: use it only if you really need it, as it affects performances! For this performance reasons such parameter is not available in most heavy methods. |
access_token | string | A valid access token (with 'music' scope authorized) corresponding to the Jamendo user you want to update. You can get it with the OAuth2 process |
track_id | integer | The trackid which should be added to favorite |
Sample
Call:
curl -X POST -d client_id="your_client_id" -d format="jsonpretty" -d access_token="your_access_token" -d track_id="10" "https://api.jamendo.com/v3.0/setuser/favorite/"
Response:
{ "headers":{ "status":"success", "code":0, "error_message":"", "warnings":"", "results_count":0 }, "results":[ ] }