3

我一直在寻找一种方法来做到这一点,因为看起来他们应该是一个。

我只想自动从我的 SoundCloud 页面中提取 5 个最新的曲目,并将它们放在我的网站上的“最新音频”部分下。

SoundCloud 甚至自己做这件事。如果你去一个特定的轨道,在页面的右下角有一个“用户名的更多轨道”,看看: http ://soundcloud.com/goldenstatewarriors/mark-jackson-on-the-dan

我发现的最接近的是:

http://api.soundcloud.com/tracks?client_id={client_id}

但为此,您需要一个用于 soundcloud 应用程序的 client_id。我尝试注册一个应用程序,但是当我client_id在上面输入给我的信息时,我得到了一堆不属于我的曲目:

http://api.soundcloud.com/tracks?client_id=02db8e29aa2fb5bf590f478b73137c67

我只知道必须有办法做到这一点......

4

1 回答 1

7

答案很简单

http://api.soundcloud.com/users/<USER_ID>/tracks.json?client_id=APP_ID

像这样打它:

http://api.soundcloud.com/users/jakuboboza/tracks.json?client_id=APP_ID 

你得到:

[{"kind":"track","id":3481075,"created_at":"2010/06/16 12:27:20   +0000","user_id":1187050,"duration":1331,"commentable":true,"state":"finished","original_content_size":15835,"sharing":"public","tag_list":"","permalink":"nl-lul","description":"","streamable":true,"downloadable":false,"genre":"","release":"","purchase_url":null,"purchase_title":null,"label_id":null,"label_name":"","isrc":"","video_url":null,"track_type":"","key_signature"...

排序created_at并获利:)

干杯! 希望这可以帮助

于 2012-05-04T18:31:51.100 回答