Has order by hotness been removed from Soundclouds API [closed]

≡放荡痞女 提交于 2020-01-07 09:17:26

问题


I've seen the ability to order by hotness in some tutorials for the SoundCloud API. Eg the following in PHP:

// create a client object with your app credentials
$client = new Services_Soundcloud('APP KEY');

// find all sounds of buskers licensed under 'creative commons share alike'
$tracks = $client->get('tracks', array('genre' => json_encode($tag), 'limit' => '20', 'order' => 'hotness')); // array('q' => 'dubstep'));

$tracks=json_decode($tracks);

die(var_dump($tracks));

However this returns a list of tracks with 0 plays and there is no mention of this sorting in SoundClouds documentation:

http://developers.soundcloud.com/docs/api/sdks#methods


回答1:


Yes, the order parameter has recently been removed. From the API blog on April 16th, 2013:

Starting soon, GET requests to the /tracks endpoint will ignore the order parameter and default to ordering by creation date.
...
In the meantime, it is still possible to approximate the result sets previously returned by specifying order=hotness by manually sorting the returned tracks by a combination of favoritings_count and playback_count.

http://developers.soundcloud.com/blog/removing-hotness-param



来源:https://stackoverflow.com/questions/16697959/has-order-by-hotness-been-removed-from-soundclouds-api

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!