FileRequestsRoutes
public class FileRequestsRoutes : DropboxTransportClientOwning
Routes for the file_requests namespace For Objective-C compatible routes see DBFileRequestsRoutes
-
Returns the total number of file requests owned by this user. Includes both open and closed file requests.
scope: file_requests.read
Declaration
Swift
@discardableResult public func count() -> RpcRequest<FileRequests.CountFileRequestsResultSerializer, FileRequests.CountFileRequestsErrorSerializer>Return Value
Through the response callback, the caller will receive a
FileRequests.CountFileRequestsResultobject on success or aFileRequests.CountFileRequestsErrorobject on failure. -
Creates a file request for this user.
scope: file_requests.write
Declaration
Swift
@discardableResult public func create( title: String, destination: String, deadline: FileRequests.FileRequestDeadline? = nil, open: Bool = true, description_: String? = nil ) -> RpcRequest<FileRequests.FileRequestSerializer, FileRequests.CreateFileRequestErrorSerializer>Parameters
titleThe title of the file request. Must not be empty.
destinationThe 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.
deadlineThe deadline for the file request. Deadlines can only be set by Professional and Business accounts.
openWhether 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
FileRequests.FileRequestobject on success or aFileRequests.CreateFileRequestErrorobject on failure. -
Delete a batch of closed file requests.
scope: file_requests.write
Declaration
Swift
@discardableResult public func delete(ids: [String]) -> RpcRequest<FileRequests.DeleteFileRequestsResultSerializer, FileRequests.DeleteFileRequestErrorSerializer>Parameters
idsList IDs of the file requests to delete.
Return Value
Through the response callback, the caller will receive a
FileRequests.DeleteFileRequestsResultobject on success or aFileRequests.DeleteFileRequestErrorobject on failure. -
Delete all closed file requests owned by this user.
scope: file_requests.write
Declaration
Swift
@discardableResult public func deleteAllClosed() -> RpcRequest<FileRequests.DeleteAllClosedFileRequestsResultSerializer, FileRequests.DeleteAllClosedFileRequestsErrorSerializer>Return Value
Through the response callback, the caller will receive a
FileRequests.DeleteAllClosedFileRequestsResultobject on success or aFileRequests.DeleteAllClosedFileRequestsErrorobject on failure. -
Returns the specified file request.
scope: file_requests.read
Declaration
Swift
@discardableResult public func get(id: String) -> RpcRequest<FileRequests.FileRequestSerializer, FileRequests.GetFileRequestErrorSerializer>Parameters
idThe ID of the file request to retrieve.
Return Value
Through the response callback, the caller will receive a
FileRequests.FileRequestobject on success or aFileRequests.GetFileRequestErrorobject 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.
scope: file_requests.read
Declaration
Swift
@discardableResult public func listV2(limit: UInt64 = 1_000) -> RpcRequest<FileRequests.ListFileRequestsV2ResultSerializer, FileRequests.ListFileRequestsErrorSerializer>Parameters
limitThe maximum number of file requests that should be returned per request.
Return Value
Through the response callback, the caller will receive a
FileRequests.ListFileRequestsV2Resultobject on success or aFileRequests.ListFileRequestsErrorobject 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.
scope: file_requests.read
Declaration
Swift
@discardableResult public func list_() -> RpcRequest<FileRequests.ListFileRequestsResultSerializer, FileRequests.ListFileRequestsErrorSerializer>Return Value
Through the response callback, the caller will receive a
FileRequests.ListFileRequestsResultobject on success or aFileRequests.ListFileRequestsErrorobject on failure. -
Once a cursor has been retrieved from listV2, use this to paginate through all file requests. The cursor must come from a previous call to listV2 or listContinue.
scope: file_requests.read
Declaration
Swift
@discardableResult public func listContinue(cursor: String) -> RpcRequest<FileRequests.ListFileRequestsV2ResultSerializer, FileRequests.ListFileRequestsContinueErrorSerializer>Parameters
cursorThe cursor returned by the previous API call specified in the endpoint description.
Return Value
Through the response callback, the caller will receive a
FileRequests.ListFileRequestsV2Resultobject on success or aFileRequests.ListFileRequestsContinueErrorobject on failure. -
Update a file request.
scope: file_requests.write
Declaration
Swift
@discardableResult public func update( id: String, title: String? = nil, destination: String? = nil, deadline: FileRequests.UpdateFileRequestDeadline = .noUpdate, open: Bool? = nil, description_: String? = nil ) -> RpcRequest<FileRequests.FileRequestSerializer, FileRequests.UpdateFileRequestErrorSerializer>Parameters
idThe ID of the file request to update.
titleThe new title of the file request. Must not be empty.
destinationThe 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.
deadlineThe new deadline for the file request. Deadlines can only be set by Professional and Business accounts.
openWhether 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
FileRequests.FileRequestobject on success or aFileRequests.UpdateFileRequestErrorobject on failure.
View on GitHub
FileRequestsRoutes Class Reference