I am trying to go through all the members of my Dropbox and find out their permissions on every folder, but I'm not sure how to do this. I am new to the API, so help would be appreciated. I am writing in C# as seen in my code:
public MainPage()
{
this.InitializeComponent();
var task = Task.Run((Func<Task>)MainPage.Run);
task.Wait();
}
//Async task to
static async Task Run()
{
//use dropbox client with access token from app console
using (DropboxTeamClient DBTeamClient = new DropboxTeamClient("MYACCESSKEY"))
{
//get all the dropbox members
var members = await DBTeamClient.Team.MembersListAsync();
//loop through all members ordered by email alphabetical
foreach (var member in members.Members.OrderBy(a => a.Profile.Email))
{
//get each user
var userClient = DBTeamClient.AsMember(member.Profile.TeamMemberId);
//get each user's file information
var list = await userClient.Files.ListFolderAsync(string.Empty);
//loop through the list of file and show permissions on folders
foreach (var item in list.Entries.OrderBy(b => b.PathDisplay))
{
//only display folder information
if (item.IsFolder)
{
//get folder permissions here??
}
}
}
}
}
I'd appreciate more of an explanation or example rather than a link to API documentation (as they contain no implementation examples so are not much help).