Package com.dropbox.core.v2.account
Class DbxUserAccountRequests
java.lang.Object
com.dropbox.core.v2.account.DbxUserAccountRequests
Routes in namespace "account".
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeletes the current user's profile photo.This lovely endpoint gets the account photo of a given user.getPhotoBuilder(String dbxAccountId, String size, boolean circleCrop, boolean expectAccountPhoto) This lovely endpoint gets the account photo of a given user.setProfilePhoto(PhotoSourceArg photo) Sets a user's profile photo.
-
Constructor Details
-
DbxUserAccountRequests
-
-
Method Details
-
deleteProfilePhoto
public DeleteProfilePhotoResult deleteProfilePhoto() throws DeleteProfilePhotoErrorException, DbxExceptionDeletes the current user's profile photo.- Returns:
- This struct is empty. The comment here is intentionally emitted to avoid indentation issues with Stone.
- Throws:
DeleteProfilePhotoErrorExceptionDbxException
-
getPhoto
public DbxDownloader<AccountPhotoGetResult> getPhoto(String dbxAccountId, String size, boolean circleCrop, boolean expectAccountPhoto) throws AccountPhotoGetErrorException, DbxException This lovely endpoint gets the account photo of a given user.- Parameters:
dbxAccountId- Encoded ID of the user. Must start either with 'dbid:' or 'dbaphid:'. Must not benull.size- A string representing the size of the photo. Must not benull.circleCrop- True if the photo should be cropped and false otherwise.expectAccountPhoto- True if we expect account photo to exist.- Returns:
- Downloader used to download the response body and view the server response.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.AccountPhotoGetErrorExceptionDbxException
-
getPhotoBuilder
public GetPhotoBuilder getPhotoBuilder(String dbxAccountId, String size, boolean circleCrop, boolean expectAccountPhoto) This lovely endpoint gets the account photo of a given user.- Parameters:
dbxAccountId- Encoded ID of the user. Must start either with 'dbid:' or 'dbaphid:'. Must not benull.size- A string representing the size of the photo. Must not benull.circleCrop- True if the photo should be cropped and false otherwise.expectAccountPhoto- True if we expect account photo to exist.- Returns:
- Downloader builder for configuring the request parameters and instantiating a downloader.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
setProfilePhoto
public SetProfilePhotoResult setProfilePhoto(PhotoSourceArg photo) throws SetProfilePhotoErrorException, DbxException Sets a user's profile photo.- Parameters:
photo- Image to set as the user's new profile photo. Must not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.SetProfilePhotoErrorExceptionDbxException
-