Reputation: 7
I am trying to get the JSON
for the following soundcloud
track listing page.
http://soundcloud.com/tags/Hiphop
The query I try to perform is
http://api.soundcloud.com/tracks.json?order=hotness&limit=20&created_at[from]=2012-05-18&tags=hiphop + consumer key.
All of the songs on that tags page are less than 3 days old, and I am ordering by hotness. The filters doesn't seem to work at all. The results of the query and the tags/Hiphop
page are not even close. Am I missing something?
Upvotes: 0
Views: 1532
Reputation: 4117
Unfortunately the created_at filter cannot be used with the order parameter. If you'd like to replicate the listing in the URL you provided, just make the following API request:
https://api.soundcloud.com/tracks.json?client_id=YOUR_CLIENT_ID&tags=hiphop&order=hotness
Or, in JavaScript, assuming you have a ul element with an id 'tracks':
var url = 'https://api.soundcloud.com/tracks.json?client_id=YOUR_CLIENT_ID&tags=Hiphop&order_by=hotness';
$.getJSON(url, function(data) {
$.each(data, function(index, track) {
$('<li />', { text: track.title }).appendTo('#tracks');
});
});
Upvotes: 2