Click or drag to resize

DropboxClient Class

The client which contains endpoints which perform user-level actions.
Inheritance Hierarchy

Namespace:  Dropbox.Api
Assembly:  Dropbox.Api (in Dropbox.Api.dll) Version: 4.0
Syntax
public sealed class DropboxClient : DropboxClientBase

The DropboxClient type exposes the following members.

Constructors
  NameDescription
Public methodDropboxClient(String)
Initializes a new instance of the DropboxClient class.
Public methodDropboxClient(String, DropboxClientConfig)
Initializes a new instance of the DropboxClient class.
Public methodDropboxClient(String, String) Obsolete.
Initializes a new instance of the DropboxClient class.
Top
Properties
  NameDescription
Public propertyAuth

Gets the Auth routes.

Public propertyContacts

Gets the Contacts routes.

Public propertyFileProperties

Gets the FileProperties routes.

Public propertyFileRequests

Gets the FileRequests routes.

Public propertyFiles

Gets the Files routes.

Public propertyPaper

Gets the Paper routes.

Public propertySharing

Gets the Sharing routes.

Public propertyUsers

Gets the Users routes.

Top
Methods
  NameDescription
Public methodWithPathRoot
Set the value for Dropbox-Api-Path-Root header. This allows accessing content outside of user's home namespace. Below is sample code of accessing content inside team space. See Namespace Guide for details about user space vs team space.
// Fetch root namespace info from user's account info.
var account = await client.Users.GetCurrentAccountAsync();

if (!account.RootInfo.IsTeam)
{
    Console.WriteLine("This user doesn't belong to a team with shared space.");
}
else
{
    try
    {
        // Point path root to namespace id of team space.
        client = client.WithPathRoot(new PathRoot.Root(account.RootInfo.RootNamespaceId));
        await client.Files.ListFolderAsync(path);
    }
    catch (PathRootException ex)
    {
        // Handle race condition when user switched team.
        Console.WriteLine(
            "The user's root namespace ID has changed to {0}",
            ex.ErrorResponse.AsInvalidRoot.Value);
    }
}
Top
See Also