获取用户的最新SoundCloud Track链接 [英] Get a user's Most Recent SoundCloud Track Links
问题描述
我只想自动拉5个最最近的音轨从我的SoundCloud页面放到我的网站上的'最新音频'部分。
SoundCloud甚至自己也这样做。如果您转到特定曲目,在页面的右下角有一个'按USERNAME更多曲目',请查看:
http://soundcloud.com/goldenstatewarriors/mark-jackson-on-the-dan
<我发现的最接近的是这样的:
http://api.soundcloud.com/tracks?client_id= { client_id}
但是,您需要一个client_id,它用于soundcloud应用程序。我尝试注册一个应用程序,但是当我输入给我的 client_id
时,我收到了一堆不是我的音轨:
http://api.soundcloud.com/tracks?client_id= 02b8e29aa2fb5bf590f478b73137c67
我只知道必须有一种方法来做到这一点......
答案很简单
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
$ c $ [{
kind:track,id:3481075,created_at:2010/06/16 12:27:20 +0000,user_id:1187050,duration:1331,commentable:true, 状态: 完了, original_content_size:15835, 共享:p ublic, tag_list: , 永久: NL-LUL, 说明: , 流化:真正的 下载:假的, 流派: , 放: , PURCHASE_URL:空, purchase_title:空, label_id:空, LABEL_NAME: , ISRC: , VIDEO_URL:空, track_type: ,key_signature ...
按 created_at
和利润:)
干杯!希望这有助于
I've been looking for a way to do this for a while because it seems like their should be one.
I just want to automatically pull the 5 most recent tracks from my SoundCloud page and put them on my website under a 'Newest Audio' section.
SoundCloud even does this themselves. If you go to a specific track, on the right bottom of the page it has a 'More tracks by USERNAME,' take a look:
http://soundcloud.com/goldenstatewarriors/mark-jackson-on-the-dan
The closest thing I have found is this:
http://api.soundcloud.com/tracks?client_id={client_id}
But for that you need a client_id, which is for soundcloud apps. I tried registering an app, but when I input the client_id
given to me into the above, I get a bunch of tracks that aren't mine:
http://api.soundcloud.com/tracks?client_id=02db8e29aa2fb5bf590f478b73137c67
I just know there has to be a way to do this...
解决方案 The answer is simple
http://api.soundcloud.com/users/<USER_ID>/tracks.json?client_id=APP_ID
hitting it like this:
http://api.soundcloud.com/users/jakuboboza/tracks.json?client_id=APP_ID
you get:
[{"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"...
sort it by created_at
and profit :)
Cheers! Hope this helps
这篇关于获取用户的最新SoundCloud Track链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!