Start 2025 on time and up to date. Seamlessly integrate your calendars into Dropbox with these simple steps.

Forum Discussion

af11's avatar
af11
Explorer | Level 4
3 years ago

dbx.files_list_folder_continue(cursor)

Hi,

When I use dropbox.files_list_folder_continue(), it returns this sort of thing to me: 

ListFolderResult(cursor='AAGFrYNdNFVvj-P1WPjcSIta4RG5MPP0MkUNGBqnduUowq2AZgFjW3D70O6j_c63VjG_qJ_5djJP5RmgugkeKiBbXNM8RQD-Bh5bvLaRCuG037iK4MVz-CiIxTm_XuPuI4BWHd6buxIv_Df4TjImbHBmBa4E1KJhIAcmXh4-2Z6i4Qik3PVeTqTzoBRD8XEWOIE', entries=[DeletedMetadata(name='yes', parent_shared_folder_id=NOT_SET, path_display='/yes', path_lower='/yes')], has_more=False)

 What is it returning?  In the documentation, it seemed to say that calling this method would return a json object, not this thing.

I would like to access the data it's returning but don't know how to.

Thank yo


  • af11 wrote:

    ...  In the documentation, it seemed to say that calling this method would return a json object, not this thing.

    I would like to access the data it's returning but don't know how to.

    ...


    Hi af11,

    Yes and No!

    I don't know what kind of documentation you have read, but seems you have mixed different things. When you call API access point 2/files/list_folder or 2/files/list_folder/continue, yes, resulting response body contains JSON formatted info about listed folder(s) content. Seems you aren't using direct call to API access points, but Python SDK instead. Isn't so?! 😜 There you are using provided functions/methods. In particular dropbox.dropbox_client.Dropbox's methods files_list_folder (initially probably) and files_list_folder_continue (to complete a long list, if any). Using any SDK the same information gets represented in corresponding native form. In the particular case result is represented as a ListFolderResult object. Here you can retrieve interested folder content by inspecting "entries" field. 😉 You may need to start once again from beginning (files_list_folder) since you might have touched the folder end, if you are not inspecting an empty folder. Read more carefully the applicable documentation, but not just so - something!

    Hope this gives direction.


  • af11 wrote:

    ...  In the documentation, it seemed to say that calling this method would return a json object, not this thing.

    I would like to access the data it's returning but don't know how to.

    ...


    Hi af11,

    Yes and No!

    I don't know what kind of documentation you have read, but seems you have mixed different things. When you call API access point 2/files/list_folder or 2/files/list_folder/continue, yes, resulting response body contains JSON formatted info about listed folder(s) content. Seems you aren't using direct call to API access points, but Python SDK instead. Isn't so?! 😜 There you are using provided functions/methods. In particular dropbox.dropbox_client.Dropbox's methods files_list_folder (initially probably) and files_list_folder_continue (to complete a long list, if any). Using any SDK the same information gets represented in corresponding native form. In the particular case result is represented as a ListFolderResult object. Here you can retrieve interested folder content by inspecting "entries" field. 😉 You may need to start once again from beginning (files_list_folder) since you might have touched the folder end, if you are not inspecting an empty folder. Read more carefully the applicable documentation, but not just so - something!

    Hope this gives direction.