Curious about A, B, C, and D drives? Learn what they mean and how to use them effectively with Dropbox in this handy guide! - check it out now!

Forum Discussion

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

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_5djJP5Rmgu...
  • Здравко's avatar
    4 years ago

    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.