Dropbox Api v2-光标和分页list_folders的混淆 [英] Dropbox Api v2 - confusion with cursor and paging for list_folders
问题描述
api docs中的files / list _folders方法具有以下有关游标参数的描述:
The files/list _folders method in api docs has the following for the description of the cursor parameter:
光标-传递游标进入list_folder /继续,以查看自上次查询以来文件夹中发生的变化。
cursor - Pass the cursor into list_folder/continue to see what's changed in the folder since your previous query.
has_more -如果为true,那么会有更多条目可用。将光标移到list_folder / continue以检索其余内容。
has_more - If true, then there are more entries available. Pass the cursor to list_folder/continue to retrieve the rest.
https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder
那是什么如果我再次要求list_folders_continue传递令牌,是否要请求另一页结果或文件夹更改?如果我要求另一页结果,那么该限制是什么?并且我可以控制吗?
Which is it then? If I make another request to list_folders_continue passing in the token, am I requesting another page of results or changes to the folder? If I am requesting another page of results, what is the limit that was applied? And can I control that?
文档在 sharing 下也具有list_folder方法,该方法似乎对光标和支持限制参数
https://www.dropbox。 com / developers / documentation / http / documentation#sharing-list_folders
The docs also have the list_folder method under sharing, which appears to have more precise definition of the cursor and the support for the limit parameter https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_folders
文件下的方法也有吗?
推荐答案
那是什么?如果我再次要求list_folders_continue传递令牌,是否要请求另一页结果或文件夹更改?
Which is it then? If I make another request to list_folders_continue passing in the token, am I requesting another page of results or changes to the folder?
两者都是。 / files / list_folder / continue端点既用于返回项目的其他页面,又用于将来进行进一步的更新。
It's both. The /files/list_folder/continue endpoint is used both for returning additional pages of items, as well as getting further updates in the future.
/ files /返回的每个页面list_folder [/ continue]的大小受到限制,但是没有保证的限制,也无法控制该限制。您的应用程序应该始终检查 has_more
,如果它是 true
,则应回调到/files/list_folder/continue。
Each page returned by /files/list_folder[/continue] is limited in size, but there is no guaranteed limit, nor can you control that limit. Your app should just always check has_more
and call back to /files/list_folder/continue if it is true
.
此外,端点 / files / list_folder 和 / sharing / list_folders 是具有不同功能的不同端点。
Also, the endpoints /files/list_folder and /sharing/list_folders are different endpoints with different functionality.
/ files / list_folder端点记录为:
The /files/list_folder endpoint is documented as:
返回文件夹的内容。
Returns the contents of a folder.
/ sharing / list_folders端点记录为:
The /sharing/list_folders endpoint is documented as:
返回当前用户有权访问的所有共享文件夹的列表。
Return the list of all shared folders the current user has access to.
两个端点使用不同的游标,以与 / files / list_folder / continue 和 / sharing / list_folders / continue 。
The two endpoints use different cursors, for use with /files/list_folder/continue and /sharing/list_folders/continue, respectively.
这篇关于Dropbox Api v2-光标和分页list_folders的混淆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!