Package com.dropbox.core.v2.filerequests
Class DbxUserFileRequestsRequests
java.lang.Object
com.dropbox.core.v2.filerequests.DbxUserFileRequestsRequests
Routes in namespace "file_requests".
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncount()Returns the total number of file requests owned by this user.Creates a file request for this user.createBuilder(String title, String destination) Creates a file request for this user.Delete a batch of closed file requests.Delete all closed file requests owned by this user.Returns the specified file request.list()Returns a list of file requests owned by this user.listContinue(String cursor) Once a cursor has been retrieved fromlistV2(long), use this to paginate through all file requests.listV2()Returns a list of file requests owned by this user.listV2(long limit) Returns a list of file requests owned by this user.Update a file request.updateBuilder(String id) Update a file request.
-
Constructor Details
-
DbxUserFileRequestsRequests
-
-
Method Details
-
count
Returns the total number of file requests owned by this user. Includes both open and closed file requests.- Returns:
- Result for
count(). - Throws:
CountFileRequestsErrorExceptionDbxException
-
create
public FileRequest create(String title, String destination) throws CreateFileRequestErrorException, DbxException Creates a file request for this user.The default values for the optional request parameters will be used. See
CreateBuilderfor more details.- Parameters:
title- The title of the file request. Must not be empty. Must have length of at least 1 and not benull.destination- The path of the folder in the Dropbox where uploaded files will be sent. For apps with the app folder permission, this will be relative to the app folder. Must match pattern "/(.|[\\r\\n])*" and not benull.- Returns:
- A file request for receiving files into the user's Dropbox account.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.CreateFileRequestErrorExceptionDbxException
-
createBuilder
Creates a file request for this user.- Parameters:
title- The title of the file request. Must not be empty. Must have length of at least 1 and not benull.destination- The path of the folder in the Dropbox where uploaded files will be sent. For apps with the app folder permission, this will be relative to the app folder. Must match pattern "/(.|[\\r\\n])*" and not benull.- Returns:
- Request builder for configuring request parameters and completing the request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
delete
public DeleteFileRequestsResult delete(List<String> ids) throws DeleteFileRequestErrorException, DbxException Delete a batch of closed file requests.- Parameters:
ids- List IDs of the file requests to delete. Must not contain anullitem and not benull.- Returns:
- Result for
delete(List). - Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DeleteFileRequestErrorExceptionDbxException
-
deleteAllClosed
public DeleteAllClosedFileRequestsResult deleteAllClosed() throws DeleteAllClosedFileRequestsErrorException, DbxExceptionDelete all closed file requests owned by this user.- Returns:
- Result for
deleteAllClosed(). - Throws:
DeleteAllClosedFileRequestsErrorExceptionDbxException
-
get
Returns the specified file request.- Parameters:
id- The ID of the file request to retrieve. Must have length of at least 1, match pattern "[-_0-9a-zA-Z]+", and not benull.- Returns:
- A file request for receiving files into the user's Dropbox account.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.GetFileRequestErrorExceptionDbxException
-
list
Returns a list of file requests owned by this user. For apps with the app folder permission, this will only return file requests with destinations in the app folder.- Returns:
- Result for
list(). - Throws:
ListFileRequestsErrorExceptionDbxException
-
listV2
Returns a list of file requests owned by this user. For apps with the app folder permission, this will only return file requests with destinations in the app folder.The
limitrequest parameter will default to1000L(seelistV2(long)).- Returns:
- Result for
listV2(long)andlistContinue(String). - Throws:
ListFileRequestsErrorExceptionDbxException
-
listV2
public ListFileRequestsV2Result listV2(long limit) throws ListFileRequestsErrorException, DbxException Returns a list of file requests owned by this user. For apps with the app folder permission, this will only return file requests with destinations in the app folder.- Parameters:
limit- The maximum number of file requests that should be returned per request.- Returns:
- Result for
listV2(long)andlistContinue(String). - Throws:
ListFileRequestsErrorExceptionDbxException
-
listContinue
public ListFileRequestsV2Result listContinue(String cursor) throws ListFileRequestsContinueErrorException, DbxException Once a cursor has been retrieved fromlistV2(long), use this to paginate through all file requests. The cursor must come from a previous call tolistV2(long)orlistContinue(String).- Parameters:
cursor- The cursor returned by the previous API call specified in the endpoint description. Must not benull.- Returns:
- Result for
listV2(long)andlistContinue(String). - Throws:
IllegalArgumentException- If any argument does not meet its preconditions.ListFileRequestsContinueErrorExceptionDbxException
-
update
Update a file request.The default values for the optional request parameters will be used. See
UpdateBuilderfor more details.- Parameters:
id- The ID of the file request to update. Must have length of at least 1, match pattern "[-_0-9a-zA-Z]+", and not benull.- Returns:
- A file request for receiving files into the user's Dropbox account.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.UpdateFileRequestErrorExceptionDbxException
-
updateBuilder
Update a file request.- Parameters:
id- The ID of the file request to update. Must have length of at least 1, match pattern "[-_0-9a-zA-Z]+", and not benull.- Returns:
- Request builder for configuring request parameters and completing the request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-