DBFILEREQUESTSUserAuthRoutes
Objective-C
@interface DBFILEREQUESTSUserAuthRoutes : NSObject
Swift
class DBFILEREQUESTSUserAuthRoutes : NSObject
Routes for the FileRequests
namespace
-
An instance of the networking client that each route will use to submit a request.
Declaration
Objective-C
@property (nonatomic, readonly) id<DBTransportClient> _Nonnull client;
-
Initializes the
DBFILEREQUESTSUserAuthRoutes
namespace container object with a networking client.Declaration
Objective-C
- (nonnull instancetype)init:(nonnull id<DBTransportClient>)client;
-
Returns the total number of file requests owned by this user. Includes both open and closed file requests.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEREQUESTSCountFileRequestsResult *, DBFILEREQUESTSCountFileRequestsError *> *)count;
Swift
func count() -> DBRpcTask<DBFILEREQUESTSCountFileRequestsResult, DBFILEREQUESTSCountFileRequestsError>
Return Value
Through the response callback, the caller will receive a
DBFILEREQUESTSCountFileRequestsResult
object on success or aDBFILEREQUESTSCountFileRequestsError
object on failure. -
Creates a file request for this user.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEREQUESTSFileRequest *, DBFILEREQUESTSCreateFileRequestError *> *) create:(nonnull NSString *)title destination:(nonnull NSString *)destination;
Swift
func create(_ title: String, destination: String) -> DBRpcTask<DBFILEREQUESTSFileRequest, DBFILEREQUESTSCreateFileRequestError>
Parameters
title
The title of the file request. Must not be empty.
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.
Return Value
Through the response callback, the caller will receive a
DBFILEREQUESTSFileRequest
object on success or aDBFILEREQUESTSCreateFileRequestError
object on failure. -
Creates a file request for this user.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEREQUESTSFileRequest *, DBFILEREQUESTSCreateFileRequestError *> *) create:(nonnull NSString *)title destination:(nonnull NSString *)destination deadline:(nullable DBFILEREQUESTSFileRequestDeadline *)deadline open:(nullable NSNumber *)open description_:(nullable NSString *)description_;
Swift
func create(_ title: String, destination: String, deadline: DBFILEREQUESTSFileRequestDeadline?, open: NSNumber?, description_: String?) -> DBRpcTask<DBFILEREQUESTSFileRequest, DBFILEREQUESTSCreateFileRequestError>
Parameters
title
The title of the file request. Must not be empty.
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.
deadline
The deadline for the file request. Deadlines can only be set by Professional and Business accounts.
open
Whether or not the file request should be open. If the file request is closed, it will not accept any file submissions, but it can be opened later.
description_
A description of the file request.
Return Value
Through the response callback, the caller will receive a
DBFILEREQUESTSFileRequest
object on success or aDBFILEREQUESTSCreateFileRequestError
object on failure. -
Delete a batch of closed file requests.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEREQUESTSDeleteFileRequestsResult *, DBFILEREQUESTSDeleteFileRequestError *> *)delete_: (nonnull NSArray<NSString *> *)ids;
Swift
func delete_(_ ids: [String]) -> DBRpcTask<DBFILEREQUESTSDeleteFileRequestsResult, DBFILEREQUESTSDeleteFileRequestError>
Parameters
ids
List IDs of the file requests to delete.
Return Value
Through the response callback, the caller will receive a
DBFILEREQUESTSDeleteFileRequestsResult
object on success or aDBFILEREQUESTSDeleteFileRequestError
object on failure. -
Delete all closed file requests owned by this user.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEREQUESTSDeleteAllClosedFileRequestsResult *, DBFILEREQUESTSDeleteAllClosedFileRequestsError *> *) deleteAllClosed;
Swift
func deleteAllClosed() -> DBRpcTask<DBFILEREQUESTSDeleteAllClosedFileRequestsResult, DBFILEREQUESTSDeleteAllClosedFileRequestsError>
Return Value
Through the response callback, the caller will receive a
DBFILEREQUESTSDeleteAllClosedFileRequestsResult
object on success or aDBFILEREQUESTSDeleteAllClosedFileRequestsError
object on failure. -
Returns the specified file request.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEREQUESTSFileRequest *, DBFILEREQUESTSGetFileRequestError *> *)get: (nonnull NSString *)id_;
Swift
func get(_ id_: String) -> DBRpcTask<DBFILEREQUESTSFileRequest, DBFILEREQUESTSGetFileRequestError>
Parameters
id_
The ID of the file request to retrieve.
Return Value
Through the response callback, the caller will receive a
DBFILEREQUESTSFileRequest
object on success or aDBFILEREQUESTSGetFileRequestError
object on failure. -
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.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEREQUESTSListFileRequestsV2Result *, DBFILEREQUESTSListFileRequestsError *> *)listV2;
Swift
func listV2() -> DBRpcTask<DBFILEREQUESTSListFileRequestsV2Result, DBFILEREQUESTSListFileRequestsError>
Return Value
Through the response callback, the caller will receive a
DBFILEREQUESTSListFileRequestsV2Result
object on success or aDBFILEREQUESTSListFileRequestsError
object on failure. -
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.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEREQUESTSListFileRequestsV2Result *, DBFILEREQUESTSListFileRequestsError *> *)listV2: (nullable NSNumber *)limit;
Swift
func listV2(_ limit: NSNumber?) -> DBRpcTask<DBFILEREQUESTSListFileRequestsV2Result, DBFILEREQUESTSListFileRequestsError>
Parameters
limit
The maximum number of file requests that should be returned per request.
Return Value
Through the response callback, the caller will receive a
DBFILEREQUESTSListFileRequestsV2Result
object on success or aDBFILEREQUESTSListFileRequestsError
object on failure. -
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.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEREQUESTSListFileRequestsResult *, DBFILEREQUESTSListFileRequestsError *> *)list;
Swift
func list() -> DBRpcTask<DBFILEREQUESTSListFileRequestsResult, DBFILEREQUESTSListFileRequestsError>
Return Value
Through the response callback, the caller will receive a
DBFILEREQUESTSListFileRequestsResult
object on success or aDBFILEREQUESTSListFileRequestsError
object on failure. -
Once a cursor has been retrieved from
list
, use this to paginate through all file requests. The cursor must come from a previous call tolist
orlistContinue
.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEREQUESTSListFileRequestsV2Result *, DBFILEREQUESTSListFileRequestsContinueError *> *) listContinue:(nonnull NSString *)cursor;
Swift
func listContinue(_ cursor: String) -> DBRpcTask<DBFILEREQUESTSListFileRequestsV2Result, DBFILEREQUESTSListFileRequestsContinueError>
Parameters
cursor
The cursor returned by the previous API call specified in the endpoint description.
Return Value
Through the response callback, the caller will receive a
DBFILEREQUESTSListFileRequestsV2Result
object on success or aDBFILEREQUESTSListFileRequestsContinueError
object on failure. -
Update a file request.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEREQUESTSFileRequest *, DBFILEREQUESTSUpdateFileRequestError *> *)update: (nonnull NSString *)id_;
Swift
func update(_ id_: String) -> DBRpcTask<DBFILEREQUESTSFileRequest, DBFILEREQUESTSUpdateFileRequestError>
Parameters
id_
The ID of the file request to update.
Return Value
Through the response callback, the caller will receive a
DBFILEREQUESTSFileRequest
object on success or aDBFILEREQUESTSUpdateFileRequestError
object on failure. -
Update a file request.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEREQUESTSFileRequest *, DBFILEREQUESTSUpdateFileRequestError *> *) update:(nonnull NSString *)id_ title:(nullable NSString *)title destination:(nullable NSString *)destination deadline:(nullable DBFILEREQUESTSUpdateFileRequestDeadline *)deadline open:(nullable NSNumber *)open description_:(nullable NSString *)description_;
Swift
func update(_ id_: String, title: String?, destination: String?, deadline: DBFILEREQUESTSUpdateFileRequestDeadline?, open: NSNumber?, description_: String?) -> DBRpcTask<DBFILEREQUESTSFileRequest, DBFILEREQUESTSUpdateFileRequestError>
Parameters
id_
The ID of the file request to update.
title
The new title of the file request. Must not be empty.
destination
The new 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.
deadline
The new deadline for the file request. Deadlines can only be set by Professional and Business accounts.
open
Whether to set this file request as open or closed.
description_
The description of the file request.
Return Value
Through the response callback, the caller will receive a
DBFILEREQUESTSFileRequest
object on success or aDBFILEREQUESTSUpdateFileRequestError
object on failure.