的SoundCloud API支持分页? [英] Soundcloud API support pagination?
本文介绍了的SoundCloud API支持分页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将如何使用linked_partitioning = 1来回应关于next_href打电话?我看到在响应中的next_href,但我不知道下一步该怎么做?
How would I use the "linked_partitioning=1" to call on the "next_href" in the response? I see the next_href in the response, but I don't know what to do next?
:\\请帮助
预先感谢您:)
:\ Please help Thank you in advance :)
推荐答案
您只需要对这个URL的调用。
You just have to make a call to this url.
在这里阅读更多:
- https://developers.soundcloud.com/blog/offset-分页德precated
- https://developers.soundcloud.com/docs/api/guide#errors
- https://developers.soundcloud.com/blog/offset-pagination-deprecated
- https://developers.soundcloud.com/docs/api/guide#errors
编辑:
根据您的意见,我已经添加了一些JS code,它打印从Boilerroom所有曲目。
According to your comments, i have added some code in JS, which print all tracks from Boilerroom.
使用的SoundCloud SDK + jQuery的,这是一个摘录。
Using SoundCloud SDK + jquery, this is an excerpt.
function linked(obj){
if(obj.next_href)
{
loadMore(obj.next_href);
console.log(obj.next_href)
}
$.each(obj.collection, function( key, val ) {
$('#result').append(val.title + '<br/>');
});
}
function loadMore(url){
$.getJSON( url, function( tracks ) {
linked (tracks);
});
}
http://jsfiddle.net/iambnz/tehd02y6/
这篇关于的SoundCloud API支持分页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文