的SoundCloud API不明确支持使用JSON分页 [英] Soundcloud API doesn't explicitly support pagination with json
问题描述
具体例子,我正在同:
http://api.soundcloud.com/users/dubstep/ tracks.json?CLIENT_ID = YOUR_CLIENT_ID
您会得到他们的第50轨道,但没有下的href对象像你在的 XML版本。
You'll get their first 50 tracks, but there is not next-href object like what you see in the xml version.
不过,您可以用偏移和限制,它可以作为expected-但我需要盲目,通过轨道爬行,直到没有更多的轨道,不像XML版本,让你的下一页的结果。我根本不会注意到它除了分页偶然的机会,当我在寻找JSON对象,发现有整整50轨(这是可疑偶数)。
However, you can use offset and limit and it works as expected- but then I would need to "blindly" crawl through tracks until there are no more tracks, unlike with the XML version which gives you the "next page" of results. I wouldn't have even noticed it was paginated except by chance when I was searching the json object and noticed there was exactly 50 tracks (which is suspiciously even).
有支持JSON下一href标记的计划?我缺少的东西吗?难道是它缺少一个bug?
Is there a plan to support the next-href tag in json? Am I missing something? is it a bug that it's missing?
推荐答案
有是你可以使用一个未公开的参数 linked_partitioning = 1
,这将增加 next_href
来响应。
There is an undocumented parameter you can use linked_partitioning=1
, that will add next_href
to the response.
<一个href=\"http://api.soundcloud.com/users/dubstep/tracks.json?client_id=YOUR_CLIENT_ID&linked_partitioning=1\">http://api.soundcloud.com/users/dubstep/tracks.json?client_id=YOUR_CLIENT_ID&linked_partitioning=1
这篇关于的SoundCloud API不明确支持使用JSON分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!