I have gone through this thread and it is really helpful, but I have a few doubts which I would like to clear.
I want to get the list of all files and folders on a given Dropbox account and segregate by their type. For example, team folder structure will be saved to a local DB table called team_folders and similarly users' personal folders will be saved to personal_folders. The format of the personal_folders will be "/{username}/{folder_path}".
I understand I can use /2/files/list_folder[/continue] with Dropbox-API-Select-User to get the folder listing, but how am I guaranteed to get each and every folder that resides inside the team folder I am listing? I mean if the user 'Dropbox-API-Select-User' does not have permission to a particular folder inside a team folder, then apparently that folder will not be returned in listing call. Would using 'Dropbox-API-Select-Admin' solve this?
Also, when I list folders I am going to get duplicates. For example, member A and member B have access to a team folder called 'team_folder'. When I use /2/files/list_folder[/continue] with member A, I get the listing of all folders (including recursive listing of 'team_folder'). Then I use /2/files/list_folder[/continue] with member B and I will again get the listing of 'team_folder'. Am I wrong here? Moreover, if member A and member also have access to a shared folder, then I'll list that shared folder twice.
Although, I have read through the doc that explains team space and non-team space, but I am not sure how would that affect my coz I am not checking/considering whether or not the account I am operating on has a team space.
Also, a shared folder can be mounted with different name in members' folders. How would I find the original name of that mounted folder and then generate a list of aliases (i.e. mount points to that folder in members' folder)
I'd appreciate if someone can help me clear my doubts and perhaps explain/suggest an approach.
Apologies for this lengthy post.