FileRequestsRoutes

open class FileRequestsRoutes

Copyright © 2016 Dropbox, Inc. All rights reserved.

Auto-generated by Stone, do not modify.

Routes for the file_requests namespace

  • Returns the total number of file requests owned by this user. Includes both open and closed file requests.

    Declaration

    Swift

    @discardableResult
    open func count() -> RpcRequest<FileRequests.CountFileRequestsResultSerializer, FileRequests.CountFileRequestsErrorSerializer>

    Return Value

    Through the response callback, the caller will receive a FileRequests.CountFileRequestsResult object on success or a FileRequests.CountFileRequestsError object on failure.

  • Creates a file request for this user.

    Declaration

    Swift

    @discardableResult
    open func create(title: String, destination: String, deadline: FileRequests.FileRequestDeadline? = nil, open: Bool = true) -> RpcRequest<FileRequests.FileRequestSerializer, FileRequests.CreateFileRequestErrorSerializer>

    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.

    Return Value

    Through the response callback, the caller will receive a FileRequests.FileRequest object on success or a FileRequests.CreateFileRequestError object on failure.

  • Delete a batch of closed file requests.

    Declaration

    Swift

    @discardableResult
    open func delete(ids: Array<String>) -> RpcRequest<FileRequests.DeleteFileRequestsResultSerializer, FileRequests.DeleteFileRequestErrorSerializer>

    Parameters

    ids

    List IDs of the file requests to delete.

    Return Value

    Through the response callback, the caller will receive a FileRequests.DeleteFileRequestsResult object on success or a FileRequests.DeleteFileRequestError object on failure.

  • Delete all closed file requests owned by this user.

    Declaration

    Swift

    @discardableResult
    open func deleteAllClosed() -> RpcRequest<FileRequests.DeleteAllClosedFileRequestsResultSerializer, FileRequests.DeleteAllClosedFileRequestsErrorSerializer>

    Return Value

    Through the response callback, the caller will receive a FileRequests.DeleteAllClosedFileRequestsResult object on success or a FileRequests.DeleteAllClosedFileRequestsError object on failure.

  • Returns the specified file request.

    Declaration

    Swift

    @discardableResult
    open func get(id: String) -> RpcRequest<FileRequests.FileRequestSerializer, FileRequests.GetFileRequestErrorSerializer>

    Parameters

    id

    The ID of the file request to retrieve.

    Return Value

    Through the response callback, the caller will receive a FileRequests.FileRequest object on success or a FileRequests.GetFileRequestError 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

    Swift

    @discardableResult
    open func listV2(limit: UInt64 = 1000) -> RpcRequest<FileRequests.ListFileRequestsV2ResultSerializer, FileRequests.ListFileRequestsErrorSerializer>

    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 FileRequests.ListFileRequestsV2Result object on success or a FileRequests.ListFileRequestsError 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

    Swift

    @discardableResult
    open func list_() -> RpcRequest<FileRequests.ListFileRequestsResultSerializer, FileRequests.ListFileRequestsErrorSerializer>

    Return Value

    Through the response callback, the caller will receive a FileRequests.ListFileRequestsResult object on success or a FileRequests.ListFileRequestsError object 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.

    Declaration

    Swift

    @discardableResult
    open func listContinue(cursor: String) -> RpcRequest<FileRequests.ListFileRequestsV2ResultSerializer, FileRequests.ListFileRequestsContinueErrorSerializer>

    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 FileRequests.ListFileRequestsV2Result object on success or a FileRequests.ListFileRequestsContinueError object on failure.

  • Update a file request.

    Declaration

    Swift

    @discardableResult
    open func update(id: String, title: String? = nil, destination: String? = nil, deadline: FileRequests.UpdateFileRequestDeadline = .noUpdate, open: Bool? = nil) -> RpcRequest<FileRequests.FileRequestSerializer, FileRequests.UpdateFileRequestErrorSerializer>

    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.

    Return Value

    Through the response callback, the caller will receive a FileRequests.FileRequest object on success or a FileRequests.UpdateFileRequestError object on failure.