I'm trying to get a complete listing of files from a dropbox folder using the /delta endpoint. The folder contains around 3400 files, and it seems a call to /delta returns 2000 items, with has_more set to true. I'm assuming then, that I would need to make 1 more call to get the remaining 1400 files.
However, no matter how many times I call /delta using the returned cursor, it always returns 2000 entries with a has_more set to true.
I'm assuming this means I'm using the cursor incorrectly. Can someone point me to some example code for this?
I'm using the HTTP endpoints. And making calls using jquery ajax. It looks something like this:
has_more = true;
deltacursor = "";
while (has_more) {
var settings = {
"async": true,
"crossDomain": true,
"url": deltaurl,
"method": "POST",
"headers": headers,
"data": {
"path_prefix": "/acip",
"cursor": deltacursor
},
"dataType": "json"
};
$.ajax(settings).done(function (data) {
deltacursor = data.cursor;
has_more = data.has_more;
}).fail(function(error) {
console.log("In error");
});
}