SoundCloud API 的新手。
假设我是注册用户。我上传了几首曲目,当我登录 soundcloud 时它们出现在我的页面上:https ://soundcloud.com/stream
使用 API,我现在可以访问我上传的曲目的数据。
如果我随后关注其他用户,这些用户的曲目也会出现在https://soundcloud.com/stream上。但是,我在 API Docs 中找不到任何方法来访问我的曲目 + 我关注的用户的曲目的数据。有什么办法可以做到这一点?
SoundCloud API 的新手。
假设我是注册用户。我上传了几首曲目,当我登录 soundcloud 时它们出现在我的页面上:https ://soundcloud.com/stream
使用 API,我现在可以访问我上传的曲目的数据。
如果我随后关注其他用户,这些用户的曲目也会出现在https://soundcloud.com/stream上。但是,我在 API Docs 中找不到任何方法来访问我的曲目 + 我关注的用户的曲目的数据。有什么办法可以做到这一点?
It seems the SoundCloud documentation got updated: the user's activities, quoted as being "the items on the logged in user's dashboard" can be fetched. You can even get specific types of items on this Dashboard.
When you process a GET
request with this URL
$ curl 'https://api.soundcloud.com/me/activities?limit=1&oauth_token=A_VALID_TOKEN'
, you have a JSON or XML file (see at the bottom of the answer) that contains the informations you requested. In this URL, you can replace /me/activities
by these expressions:
/me/activities
gives you user's recent activities
/me/activities/all
is the same as the one above (Recent activities)
/me/activities/tracks/affiliated
is the recent tracks from users the logged-in user follows (the stream)
/me/activities/tracks/exclusive
is recent exclusively shared tracks
/me/activities/all/own
is recent activities on the logged-in users tracks
JSON responses follow this scheme:
{
"next_href": "https://api.soundcloud.com/...?cursor=81923e19...",
"collection": [
{
"type": "comment",
"created_at": "2011/07/21 09:55:19 +0000",
"tags": "own, affiliated",
"origin": {
...
}
},
...
]
}
XML responses follow this one:
<?xml version="1.0" encoding="UTF-8"?>
<activities next-href="https://api.soundcloud.com/me/activities?cursor=0fc02662-1d76-11e0-8c9a-48ea6afb1384" type="array">
<activity>
...
</activity>
...
</activities>
For deeper and more precise informations about this functionnality, check SoundCloud's API Reference documentation.
谢谢你的问题。我们目前不为此类混合数据提供公共 API。