jamendo.get2 : Home | Crash course | Useful queries | Formats | Parameters | Fields | Orders | Joins
| Name | Description | Sample output |
|---|---|---|
| json | http://www.json.org/ | [{"id":33,"name":"Simple Exercice"},{"id":46,"name":"Compilation classique"}] (query) |
| jsonpretty | Whitespaced JSON | Same as above with whitespace (query) |
| jsoncallback | same with a callback | jsonCallback(42,[{"id":33,"name":"Simple Exercice"},{"id":46,"name":"Compilation classique"}]); (query) |
| plain | Plain text | 33 Simple Exercice (query) |
| redirect | HTTP redirect | query |
| m3u | M3U playlist | N/A |
| xspf | XSPF playlist ( http://xspf.org/ ) | N/A |
This is the recommended format. It is both efficient and well-supported in most programming languages.
You can find details and libraries here: http://json.org/
The returned value is always a list, even if there is only one item.
Same as json but with a nicely formatted output so that you can test your queries easily.
Please use this formatter only for debugging purposes.
Similar to JSONP : return data as JSON wrapped in a function call.
It is useful if you want to include a jamendo.get2 call as javascript include, or as an argument to eval().
There are two parameters : jsoncallbackfunction and jsoncallbackid. You can use the later to re-order query results on the client side after several AJAX calls.
Without jsoncallbackid : http://api.jamendo.com/get2/id+name/album/jsoncallback/?id=33+46&jsoncallbackfunction=jsonCallback
With jsoncallbackid : http://api.jamendo.com/get2/id+name/album/jsoncallback/?id=33+46&jsoncallbackfunction=MyClass.jsonCallback&jsoncallbackid=42
This format is suited to very simple queries. Rows are separated by a \n linebreak. In each row, fields are separated by a \t tab.
Complex data structures and values containing linebreaks or tabs will break this format, please use JSON in these cases.
This is a special format that will redirect you to the first URL returned by the query.
For instance, it is useful for album covers. If you want to display the cover of the album with id=116, you can get its URL in plaintext with:
http://api.jamendo.com/get2/image/album/plain/?id=116&imagesize=200
But in most cases, you will just send a redirecting URL to the client :
http://api.jamendo.com/get2/image/album/redirect/?id=116&imagesize=200
This format is suitable for outputing a playlist that clients can directly open with their desktop audio player.
While not widely adopted yet, this is a promising and extensible playlist format that contains more data than a simple M3U playlist.