Dropbox .NET SDK
Show / Hide Table of Contents

Class AccountUserRoutes

The routes for the Dropbox.Api.Account namespace

Inheritance
object
AccountUserRoutes
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Dropbox.Api.Account.Routes
Assembly: Dropbox.Api.dll
Syntax
public class AccountUserRoutes

Methods

View Source

BeginDeleteProfilePhoto(DeleteProfilePhotoArg, AsyncCallback, object)

Begins an asynchronous send to the delete profile photo route.

Declaration
public IAsyncResult BeginDeleteProfilePhoto(DeleteProfilePhotoArg deleteProfilePhotoArg, AsyncCallback callback, object state = null)
Parameters
Type Name Description
DeleteProfilePhotoArg deleteProfilePhotoArg

The request parameters.

AsyncCallback callback

The method to be called when the asynchronous send is completed.

object state

A user provided object that distinguished this send from other send requests.

Returns
Type Description
IAsyncResult

An object that represents the asynchronous send request.

View Source

BeginGetPhoto(AccountPhotoGetArg, AsyncCallback, object)

Begins an asynchronous send to the get photo route.

Declaration
public IAsyncResult BeginGetPhoto(AccountPhotoGetArg accountPhotoGetArg, AsyncCallback callback, object state = null)
Parameters
Type Name Description
AccountPhotoGetArg accountPhotoGetArg

The request parameters.

AsyncCallback callback

The method to be called when the asynchronous send is completed.

object state

A user provided object that distinguished this send from other send requests.

Returns
Type Description
IAsyncResult

An object that represents the asynchronous send request.

View Source

BeginGetPhoto(string, string, bool, bool, AsyncCallback, object)

Begins an asynchronous send to the get photo route.

Declaration
public IAsyncResult BeginGetPhoto(string dbxAccountId, string size, bool circleCrop, bool expectAccountPhoto, AsyncCallback callback, object callbackState = null)
Parameters
Type Name Description
string dbxAccountId

Encoded ID of the user. Must start either with 'dbid:' or 'dbaphid:'.

string size

A string representing the size of the photo.

bool circleCrop

True if the photo should be cropped and false otherwise.

bool expectAccountPhoto

True if we expect account photo to exist.

AsyncCallback callback

The method to be called when the asynchronous send is completed.

object callbackState

A user provided object that distinguished this send from other send requests.

Returns
Type Description
IAsyncResult

An object that represents the asynchronous send request.

View Source

BeginSetProfilePhoto(PhotoSourceArg, AsyncCallback, object)

Begins an asynchronous send to the set profile photo route.

Declaration
public IAsyncResult BeginSetProfilePhoto(PhotoSourceArg photo, AsyncCallback callback, object callbackState = null)
Parameters
Type Name Description
PhotoSourceArg photo

Image to set as the user's new profile photo.

AsyncCallback callback

The method to be called when the asynchronous send is completed.

object callbackState

A user provided object that distinguished this send from other send requests.

Returns
Type Description
IAsyncResult

An object that represents the asynchronous send request.

View Source

BeginSetProfilePhoto(SetProfilePhotoArg, AsyncCallback, object)

Begins an asynchronous send to the set profile photo route.

Declaration
public IAsyncResult BeginSetProfilePhoto(SetProfilePhotoArg setProfilePhotoArg, AsyncCallback callback, object state = null)
Parameters
Type Name Description
SetProfilePhotoArg setProfilePhotoArg

The request parameters.

AsyncCallback callback

The method to be called when the asynchronous send is completed.

object state

A user provided object that distinguished this send from other send requests.

Returns
Type Description
IAsyncResult

An object that represents the asynchronous send request.

View Source

DeleteProfilePhotoAsync(DeleteProfilePhotoArg)

Deletes the current user's profile photo.

Declaration
public Task<DeleteProfilePhotoResult> DeleteProfilePhotoAsync(DeleteProfilePhotoArg deleteProfilePhotoArg)
Parameters
Type Name Description
DeleteProfilePhotoArg deleteProfilePhotoArg

The request parameters

Returns
Type Description
Task<DeleteProfilePhotoResult>

The task that represents the asynchronous send operation. The TResult parameter contains the response from the server.

Exceptions
Type Condition
ApiException<TError>

Thrown if there is an error processing the request; This will contain a DeleteProfilePhotoError.

View Source

EndDeleteProfilePhoto(IAsyncResult)

Waits for the pending asynchronous send to the delete profile photo route to complete

Declaration
public DeleteProfilePhotoResult EndDeleteProfilePhoto(IAsyncResult asyncResult)
Parameters
Type Name Description
IAsyncResult asyncResult

The reference to the pending asynchronous send request

Returns
Type Description
DeleteProfilePhotoResult

The response to the send request

Exceptions
Type Condition
ApiException<TError>

Thrown if there is an error processing the request; This will contain a DeleteProfilePhotoError.

View Source

EndGetPhoto(IAsyncResult)

Waits for the pending asynchronous send to the get photo route to complete

Declaration
public IDownloadResponse<AccountPhotoGetResult> EndGetPhoto(IAsyncResult asyncResult)
Parameters
Type Name Description
IAsyncResult asyncResult

The reference to the pending asynchronous send request

Returns
Type Description
IDownloadResponse<AccountPhotoGetResult>

The response to the send request

Exceptions
Type Condition
ApiException<TError>

Thrown if there is an error processing the request; This will contain a AccountPhotoGetError.

View Source

EndSetProfilePhoto(IAsyncResult)

Waits for the pending asynchronous send to the set profile photo route to complete

Declaration
public SetProfilePhotoResult EndSetProfilePhoto(IAsyncResult asyncResult)
Parameters
Type Name Description
IAsyncResult asyncResult

The reference to the pending asynchronous send request

Returns
Type Description
SetProfilePhotoResult

The response to the send request

Exceptions
Type Condition
ApiException<TError>

Thrown if there is an error processing the request; This will contain a SetProfilePhotoError.

View Source

GetPhotoAsync(AccountPhotoGetArg)

This lovely endpoint gets the account photo of a given user.

Declaration
public Task<IDownloadResponse<AccountPhotoGetResult>> GetPhotoAsync(AccountPhotoGetArg accountPhotoGetArg)
Parameters
Type Name Description
AccountPhotoGetArg accountPhotoGetArg

The request parameters

Returns
Type Description
Task<IDownloadResponse<AccountPhotoGetResult>>

The task that represents the asynchronous send operation. The TResult parameter contains the response from the server.

Exceptions
Type Condition
ApiException<TError>

Thrown if there is an error processing the request; This will contain a AccountPhotoGetError.

View Source

GetPhotoAsync(string, string, bool, bool)

This lovely endpoint gets the account photo of a given user.

Declaration
public Task<IDownloadResponse<AccountPhotoGetResult>> GetPhotoAsync(string dbxAccountId, string size, bool circleCrop, bool expectAccountPhoto)
Parameters
Type Name Description
string dbxAccountId

Encoded ID of the user. Must start either with 'dbid:' or 'dbaphid:'.

string size

A string representing the size of the photo.

bool circleCrop

True if the photo should be cropped and false otherwise.

bool expectAccountPhoto

True if we expect account photo to exist.

Returns
Type Description
Task<IDownloadResponse<AccountPhotoGetResult>>

The task that represents the asynchronous send operation. The TResult parameter contains the response from the server.

Exceptions
Type Condition
ApiException<TError>

Thrown if there is an error processing the request; This will contain a AccountPhotoGetError.

View Source

SetProfilePhotoAsync(PhotoSourceArg)

Sets a user's profile photo.

Declaration
public Task<SetProfilePhotoResult> SetProfilePhotoAsync(PhotoSourceArg photo)
Parameters
Type Name Description
PhotoSourceArg photo

Image to set as the user's new profile photo.

Returns
Type Description
Task<SetProfilePhotoResult>

The task that represents the asynchronous send operation. The TResult parameter contains the response from the server.

Exceptions
Type Condition
ApiException<TError>

Thrown if there is an error processing the request; This will contain a SetProfilePhotoError.

View Source

SetProfilePhotoAsync(SetProfilePhotoArg)

Sets a user's profile photo.

Declaration
public Task<SetProfilePhotoResult> SetProfilePhotoAsync(SetProfilePhotoArg setProfilePhotoArg)
Parameters
Type Name Description
SetProfilePhotoArg setProfilePhotoArg

The request parameters

Returns
Type Description
Task<SetProfilePhotoResult>

The task that represents the asynchronous send operation. The TResult parameter contains the response from the server.

Exceptions
Type Condition
ApiException<TError>

Thrown if there is an error processing the request; This will contain a SetProfilePhotoError.

  • View Source
In this article
Back to top Dropbox .NET SDK