SharingRoutes

open class SharingRoutes

Copyright © 2016 Dropbox, Inc. All rights reserved.

Auto-generated by Stone, do not modify.

Routes for the sharing namespace

  • Adds specified members to a file.

    Declaration

    Swift

    @discardableResult
    open func addFileMember(file: String, members: Array<Sharing.MemberSelector>, customMessage: String? = nil, quiet: Bool = false, accessLevel: Sharing.AccessLevel = .viewer, addMessageAsComment: Bool = false) -> RpcRequest<ArraySerializer<Sharing.FileMemberActionResultSerializer>, Sharing.AddFileMemberErrorSerializer>

    Parameters

    file

    File to which to add members.

    members

    Members to add. Note that even an email address is given, this may result in a user being directy added to the membership if that email is the user’s main account email.

    customMessage

    Message to send to added members in their invitation.

    quiet

    Whether added members should be notified via device notifications of their invitation.

    accessLevel

    AccessLevel union object, describing what access level we want to give new members.

    addMessageAsComment

    If the custom message should be added as a comment on the file.

    Return Value

    Through the response callback, the caller will receive a Array<Sharing.FileMemberActionResult> object on success or a Sharing.AddFileMemberError object on failure.

  • Allows an owner or editor (if the ACL update policy allows) of a shared folder to add another member. For the new member to get access to all the functionality for this folder, you will need to call mountFolder on their behalf.

    Declaration

    Swift

    @discardableResult
    open func addFolderMember(sharedFolderId: String, members: Array<Sharing.AddMember>, quiet: Bool = false, customMessage: String? = nil) -> RpcRequest<VoidSerializer, Sharing.AddFolderMemberErrorSerializer>

    Parameters

    sharedFolderId

    The ID for the shared folder.

    members

    The intended list of members to add. Added members will receive invites to join the shared folder.

    quiet

    Whether added members should be notified via email and device notifications of their invite.

    customMessage

    Optional message to display to added members in their invitation.

    Return Value

    Through the response callback, the caller will receive a Void object on success or a Sharing.AddFolderMemberError object on failure.

  • Returns the status of an asynchronous job.

    Declaration

    Swift

    @discardableResult
    open func checkJobStatus(asyncJobId: String) -> RpcRequest<Sharing.JobStatusSerializer, Async.PollErrorSerializer>

    Parameters

    asyncJobId

    Id of the asynchronous job. This is the value of a response returned from the method that launched the job.

    Return Value

    Through the response callback, the caller will receive a Sharing.JobStatus object on success or a Async.PollError object on failure.

  • Returns the status of an asynchronous job for sharing a folder.

    Declaration

    Swift

    @discardableResult
    open func checkRemoveMemberJobStatus(asyncJobId: String) -> RpcRequest<Sharing.RemoveMemberJobStatusSerializer, Async.PollErrorSerializer>

    Parameters

    asyncJobId

    Id of the asynchronous job. This is the value of a response returned from the method that launched the job.

    Return Value

    Through the response callback, the caller will receive a Sharing.RemoveMemberJobStatus object on success or a Async.PollError object on failure.

  • Returns the status of an asynchronous job for sharing a folder.

    Declaration

    Swift

    @discardableResult
    open func checkShareJobStatus(asyncJobId: String) -> RpcRequest<Sharing.ShareFolderJobStatusSerializer, Async.PollErrorSerializer>

    Parameters

    asyncJobId

    Id of the asynchronous job. This is the value of a response returned from the method that launched the job.

    Return Value

    Through the response callback, the caller will receive a Sharing.ShareFolderJobStatus object on success or a Async.PollError object on failure.

  • Create a shared link with custom settings. If no settings are given then the default visibility is public_ in RequestedVisibility (The resolved visibility, though, may depend on other aspects such as team and shared folder settings).

    Declaration

    Swift

    @discardableResult
    open func createSharedLinkWithSettings(path: String, settings: Sharing.SharedLinkSettings? = nil) -> RpcRequest<Sharing.SharedLinkMetadataSerializer, Sharing.CreateSharedLinkWithSettingsErrorSerializer>

    Parameters

    path

    The path to be shared by the shared link.

    settings

    The requested settings for the newly created shared link.

    Return Value

    Through the response callback, the caller will receive a Sharing.SharedLinkMetadata object on success or a Sharing.CreateSharedLinkWithSettingsError object on failure.

  • Returns shared file metadata.

    Declaration

    Swift

    @discardableResult
    open func getFileMetadata(file: String, actions: Array<Sharing.FileAction>? = nil) -> RpcRequest<Sharing.SharedFileMetadataSerializer, Sharing.GetFileMetadataErrorSerializer>

    Parameters

    file

    The file to query.

    actions

    A list of FileActions corresponding to FilePermissions that should appear in the response’s permissions in SharedFileMetadata field describing the actions the authenticated user can perform on the file.

    Return Value

    Through the response callback, the caller will receive a Sharing.SharedFileMetadata object on success or a Sharing.GetFileMetadataError object on failure.

  • Returns shared file metadata.

    Declaration

    Swift

    @discardableResult
    open func getFileMetadataBatch(files: Array<String>, actions: Array<Sharing.FileAction>? = nil) -> RpcRequest<ArraySerializer<Sharing.GetFileMetadataBatchResultSerializer>, Sharing.SharingUserErrorSerializer>

    Parameters

    files

    The files to query.

    actions

    A list of FileActions corresponding to FilePermissions that should appear in the response’s permissions in SharedFileMetadata field describing the actions the authenticated user can perform on the file.

    Return Value

    Through the response callback, the caller will receive a Array<Sharing.GetFileMetadataBatchResult> object on success or a Sharing.SharingUserError object on failure.

  • Returns shared folder metadata by its folder ID.

    Declaration

    Swift

    @discardableResult
    open func getFolderMetadata(sharedFolderId: String, actions: Array<Sharing.FolderAction>? = nil) -> RpcRequest<Sharing.SharedFolderMetadataSerializer, Sharing.SharedFolderAccessErrorSerializer>

    Parameters

    sharedFolderId

    The ID for the shared folder.

    actions

    A list of FolderActions corresponding to FolderPermissions that should appear in the response’s permissions in SharedFolderMetadata field describing the actions the authenticated user can perform on the folder.

    Return Value

    Through the response callback, the caller will receive a Sharing.SharedFolderMetadata object on success or a Sharing.SharedFolderAccessError object on failure.

  • Download the shared link’s file from a user’s Dropbox.

    Declaration

    Swift

    @discardableResult
    open func getSharedLinkFile(url: String, path: String? = nil, linkPassword: String? = nil, overwrite: Bool = false, destination: @escaping (URL, HTTPURLResponse) -> URL) -> DownloadRequestFile<Sharing.SharedLinkMetadataSerializer, Sharing.GetSharedLinkFileErrorSerializer>

    Parameters

    url

    URL of the shared link.

    path

    If the shared link is to a folder, this parameter can be used to retrieve the metadata for a specific file or sub-folder in this folder. A relative path should be used.

    linkPassword

    If the shared link has a password, this parameter can be used.

    overwrite

    A boolean to set behavior in the event of a naming conflict. True will overwrite conflicting file at destination. False will take no action (but if left unhandled in destination closure, an NSError will be thrown).

    destination

    A closure used to compute the destination, given the temporary file location and the response.

    Return Value

    Through the response callback, the caller will receive a Sharing.SharedLinkMetadata object on success or a Sharing.GetSharedLinkFileError object on failure.

  • Download the shared link’s file from a user’s Dropbox.

    Declaration

    Swift

    @discardableResult
    open func getSharedLinkFile(url: String, path: String? = nil, linkPassword: String? = nil) -> DownloadRequestMemory<Sharing.SharedLinkMetadataSerializer, Sharing.GetSharedLinkFileErrorSerializer>

    Parameters

    url

    URL of the shared link.

    path

    If the shared link is to a folder, this parameter can be used to retrieve the metadata for a specific file or sub-folder in this folder. A relative path should be used.

    linkPassword

    If the shared link has a password, this parameter can be used.

    Return Value

    Through the response callback, the caller will receive a Sharing.SharedLinkMetadata object on success or a Sharing.GetSharedLinkFileError object on failure.

  • Get the shared link’s metadata.

    Declaration

    Swift

    @discardableResult
    open func getSharedLinkMetadata(url: String, path: String? = nil, linkPassword: String? = nil) -> RpcRequest<Sharing.SharedLinkMetadataSerializer, Sharing.SharedLinkErrorSerializer>

    Parameters

    url

    URL of the shared link.

    path

    If the shared link is to a folder, this parameter can be used to retrieve the metadata for a specific file or sub-folder in this folder. A relative path should be used.

    linkPassword

    If the shared link has a password, this parameter can be used.

    Return Value

    Through the response callback, the caller will receive a Sharing.SharedLinkMetadata object on success or a Sharing.SharedLinkError object on failure.

  • Use to obtain the members who have been invited to a file, both inherited and uninherited members.

    Declaration

    Swift

    @discardableResult
    open func listFileMembers(file: String, actions: Array<Sharing.MemberAction>? = nil, includeInherited: Bool = true, limit: UInt32 = 100) -> RpcRequest<Sharing.SharedFileMembersSerializer, Sharing.ListFileMembersErrorSerializer>

    Parameters

    file

    The file for which you want to see members.

    actions

    The actions for which to return permissions on a member.

    includeInherited

    Whether to include members who only have access from a parent shared folder.

    limit

    Number of members to return max per query. Defaults to 100 if no limit is specified.

    Return Value

    Through the response callback, the caller will receive a Sharing.SharedFileMembers object on success or a Sharing.ListFileMembersError object on failure.

  • Get members of multiple files at once. The arguments to this route are more limited, and the limit on query result size per file is more strict. To customize the results more, use the individual file endpoint. Inherited users and groups are not included in the result, and permissions are not returned for this endpoint.

    Declaration

    Swift

    @discardableResult
    open func listFileMembersBatch(files: Array<String>, limit: UInt32 = 10) -> RpcRequest<ArraySerializer<Sharing.ListFileMembersBatchResultSerializer>, Sharing.SharingUserErrorSerializer>

    Parameters

    files

    Files for which to return members.

    limit

    Number of members to return max per query. Defaults to 10 if no limit is specified.

    Return Value

    Through the response callback, the caller will receive a Array<Sharing.ListFileMembersBatchResult> object on success or a Sharing.SharingUserError object on failure.

  • Once a cursor has been retrieved from listFileMembers or listFileMembersBatch, use this to paginate through all shared file members.

    Declaration

    Swift

    @discardableResult
    open func listFileMembersContinue(cursor: String) -> RpcRequest<Sharing.SharedFileMembersSerializer, Sharing.ListFileMembersContinueErrorSerializer>

    Parameters

    cursor

    The cursor returned by your last call to listFileMembers, listFileMembersContinue, or listFileMembersBatch.

    Return Value

    Through the response callback, the caller will receive a Sharing.SharedFileMembers object on success or a Sharing.ListFileMembersContinueError object on failure.

  • Returns shared folder membership by its folder ID.

    Declaration

    Swift

    @discardableResult
    open func listFolderMembers(sharedFolderId: String, actions: Array<Sharing.MemberAction>? = nil, limit: UInt32 = 1000) -> RpcRequest<Sharing.SharedFolderMembersSerializer, Sharing.SharedFolderAccessErrorSerializer>

    Parameters

    sharedFolderId

    The ID for the shared folder.

    Return Value

    Through the response callback, the caller will receive a Sharing.SharedFolderMembers object on success or a Sharing.SharedFolderAccessError object on failure.

  • Once a cursor has been retrieved from listFolderMembers, use this to paginate through all shared folder members.

    Declaration

    Swift

    @discardableResult
    open func listFolderMembersContinue(cursor: String) -> RpcRequest<Sharing.SharedFolderMembersSerializer, Sharing.ListFolderMembersContinueErrorSerializer>

    Parameters

    cursor

    The cursor returned by your last call to listFolderMembers or listFolderMembersContinue.

    Return Value

    Through the response callback, the caller will receive a Sharing.SharedFolderMembers object on success or a Sharing.ListFolderMembersContinueError object on failure.

  • Return the list of all shared folders the current user has access to.

    Declaration

    Swift

    @discardableResult
    open func listFolders(limit: UInt32 = 1000, actions: Array<Sharing.FolderAction>? = nil) -> RpcRequest<Sharing.ListFoldersResultSerializer, VoidSerializer>

    Parameters

    limit

    The maximum number of results to return per request.

    actions

    A list of FolderActions corresponding to FolderPermissions that should appear in the response’s permissions in SharedFolderMetadata field describing the actions the authenticated user can perform on the folder.

    Return Value

    Through the response callback, the caller will receive a Sharing.ListFoldersResult object on success or a Void object on failure.

  • Once a cursor has been retrieved from listFolders, use this to paginate through all shared folders. The cursor must come from a previous call to listFolders or listFoldersContinue.

    Declaration

    Swift

    @discardableResult
    open func listFoldersContinue(cursor: String) -> RpcRequest<Sharing.ListFoldersResultSerializer, Sharing.ListFoldersContinueErrorSerializer>

    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 Sharing.ListFoldersResult object on success or a Sharing.ListFoldersContinueError object on failure.

  • Return the list of all shared folders the current user can mount or unmount.

    Declaration

    Swift

    @discardableResult
    open func listMountableFolders(limit: UInt32 = 1000, actions: Array<Sharing.FolderAction>? = nil) -> RpcRequest<Sharing.ListFoldersResultSerializer, VoidSerializer>

    Parameters

    limit

    The maximum number of results to return per request.

    actions

    A list of FolderActions corresponding to FolderPermissions that should appear in the response’s permissions in SharedFolderMetadata field describing the actions the authenticated user can perform on the folder.

    Return Value

    Through the response callback, the caller will receive a Sharing.ListFoldersResult object on success or a Void object on failure.

  • Once a cursor has been retrieved from listMountableFolders, use this to paginate through all mountable shared folders. The cursor must come from a previous call to listMountableFolders or listMountableFoldersContinue.

    Declaration

    Swift

    @discardableResult
    open func listMountableFoldersContinue(cursor: String) -> RpcRequest<Sharing.ListFoldersResultSerializer, Sharing.ListFoldersContinueErrorSerializer>

    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 Sharing.ListFoldersResult object on success or a Sharing.ListFoldersContinueError object on failure.

  • Returns a list of all files shared with current user. Does not include files the user has received via shared folders, and does not include unclaimed invitations.

    Declaration

    Swift

    @discardableResult
    open func listReceivedFiles(limit: UInt32 = 100, actions: Array<Sharing.FileAction>? = nil) -> RpcRequest<Sharing.ListFilesResultSerializer, Sharing.SharingUserErrorSerializer>

    Parameters

    limit

    Number of files to return max per query. Defaults to 100 if no limit is specified.

    actions

    A list of FileActions corresponding to FilePermissions that should appear in the response’s permissions in SharedFileMetadata field describing the actions the authenticated user can perform on the file.

    Return Value

    Through the response callback, the caller will receive a Sharing.ListFilesResult object on success or a Sharing.SharingUserError object on failure.

  • Get more results with a cursor from listReceivedFiles.

    Declaration

    Swift

    @discardableResult
    open func listReceivedFilesContinue(cursor: String) -> RpcRequest<Sharing.ListFilesResultSerializer, Sharing.ListFilesContinueErrorSerializer>

    Parameters

    cursor

    Cursor in cursor in ListFilesResult.

    Return Value

    Through the response callback, the caller will receive a Sharing.ListFilesResult object on success or a Sharing.ListFilesContinueError object on failure.

  • List shared links of this user. If no path is given, returns a list of all shared links for the current user. If a non-empty path is given, returns a list of all shared links that allow access to the given path - direct links to the given path and links to parent folders of the given path. Links to parent folders can be suppressed by setting direct_only to true.

    Declaration

    Swift

    @discardableResult
    open func listSharedLinks(path: String? = nil, cursor: String? = nil, directOnly: Bool? = nil) -> RpcRequest<Sharing.ListSharedLinksResultSerializer, Sharing.ListSharedLinksErrorSerializer>

    Parameters

    path

    See listSharedLinks description.

    cursor

    The cursor returned by your last call to listSharedLinks.

    directOnly

    See listSharedLinks description.

    Return Value

    Through the response callback, the caller will receive a Sharing.ListSharedLinksResult object on success or a Sharing.ListSharedLinksError object on failure.

  • Modify the shared link’s settings. If the requested visibility conflict with the shared links policy of the team or the shared folder (in case the linked file is part of a shared folder) then the resolvedVisibility in LinkPermissions of the returned SharedLinkMetadata will reflect the actual visibility of the shared link and the requestedVisibility in LinkPermissions will reflect the requested visibility.

    Declaration

    Swift

    @discardableResult
    open func modifySharedLinkSettings(url: String, settings: Sharing.SharedLinkSettings, removeExpiration: Bool = false) -> RpcRequest<Sharing.SharedLinkMetadataSerializer, Sharing.ModifySharedLinkSettingsErrorSerializer>

    Parameters

    url

    URL of the shared link to change its settings.

    settings

    Set of settings for the shared link.

    removeExpiration

    If set to true, removes the expiration of the shared link.

    Return Value

    Through the response callback, the caller will receive a Sharing.SharedLinkMetadata object on success or a Sharing.ModifySharedLinkSettingsError object on failure.

  • The current user mounts the designated folder. Mount a shared folder for a user after they have been added as a member. Once mounted, the shared folder will appear in their Dropbox.

    Declaration

    Swift

    @discardableResult
    open func mountFolder(sharedFolderId: String) -> RpcRequest<Sharing.SharedFolderMetadataSerializer, Sharing.MountFolderErrorSerializer>

    Parameters

    sharedFolderId

    The ID of the shared folder to mount.

    Return Value

    Through the response callback, the caller will receive a Sharing.SharedFolderMetadata object on success or a Sharing.MountFolderError object on failure.

  • The current user relinquishes their membership in the designated file. Note that the current user may still have inherited access to this file through the parent folder.

    Declaration

    Swift

    @discardableResult
    open func relinquishFileMembership(file: String) -> RpcRequest<VoidSerializer, Sharing.RelinquishFileMembershipErrorSerializer>

    Parameters

    file

    The path or id for the file.

    Return Value

    Through the response callback, the caller will receive a Void object on success or a Sharing.RelinquishFileMembershipError object on failure.

  • The current user relinquishes their membership in the designated shared folder and will no longer have access to the folder. A folder owner cannot relinquish membership in their own folder. This will run synchronously if leave_a_copy is false, and asynchronously if leave_a_copy is true.

    Declaration

    Swift

    @discardableResult
    open func relinquishFolderMembership(sharedFolderId: String, leaveACopy: Bool = false) -> RpcRequest<Async.LaunchEmptyResultSerializer, Sharing.RelinquishFolderMembershipErrorSerializer>

    Parameters

    sharedFolderId

    The ID for the shared folder.

    leaveACopy

    Keep a copy of the folder’s contents upon relinquishing membership.

    Return Value

    Through the response callback, the caller will receive a Async.LaunchEmptyResult object on success or a Sharing.RelinquishFolderMembershipError object on failure.

  • Removes a specified member from the file.

    Declaration

    Swift

    @discardableResult
    open func removeFileMember2(file: String, member: Sharing.MemberSelector) -> RpcRequest<Sharing.FileMemberRemoveActionResultSerializer, Sharing.RemoveFileMemberErrorSerializer>

    Parameters

    file

    File from which to remove members.

    member

    Member to remove from this file. Note that even if an email is specified, it may result in the removal of a user (not an invitee) if the user’s main account corresponds to that email address.

    Return Value

    Through the response callback, the caller will receive a Sharing.FileMemberRemoveActionResult object on success or a Sharing.RemoveFileMemberError object on failure.

  • Allows an owner or editor (if the ACL update policy allows) of a shared folder to remove another member.

    Declaration

    Swift

    @discardableResult
    open func removeFolderMember(sharedFolderId: String, member: Sharing.MemberSelector, leaveACopy: Bool) -> RpcRequest<Async.LaunchResultBaseSerializer, Sharing.RemoveFolderMemberErrorSerializer>

    Parameters

    sharedFolderId

    The ID for the shared folder.

    member

    The member to remove from the folder.

    leaveACopy

    If true, the removed user will keep their copy of the folder after it’s unshared, assuming it was mounted. Otherwise, it will be removed from their Dropbox. Also, this must be set to false when kicking a group.

    Return Value

    Through the response callback, the caller will receive a Async.LaunchResultBase object on success or a Sharing.RemoveFolderMemberError object on failure.

  • Revoke a shared link. Note that even after revoking a shared link to a file, the file may be accessible if there are shared links leading to any of the file parent folders. To list all shared links that enable access to a specific file, you can use the listSharedLinks with the file as the path in ListSharedLinksArg argument.

    Declaration

    Swift

    @discardableResult
    open func revokeSharedLink(url: String) -> RpcRequest<VoidSerializer, Sharing.RevokeSharedLinkErrorSerializer>

    Parameters

    url

    URL of the shared link.

    Return Value

    Through the response callback, the caller will receive a Void object on success or a Sharing.RevokeSharedLinkError object on failure.

  • Change the inheritance policy of an existing Shared Folder. Only permitted for shared folders in a shared team root. If a asyncJobId in ShareFolderLaunch is returned, you’ll need to call checkShareJobStatus until the action completes to get the metadata for the folder.

    Declaration

    Swift

    @discardableResult
    open func setAccessInheritance(sharedFolderId: String, accessInheritance: Sharing.AccessInheritance = .inherit) -> RpcRequest<Sharing.ShareFolderLaunchSerializer, Sharing.SetAccessInheritanceErrorSerializer>

    Parameters

    accessInheritance

    The access inheritance settings for the folder.

    sharedFolderId

    The ID for the shared folder.

    Return Value

    Through the response callback, the caller will receive a Sharing.ShareFolderLaunch object on success or a Sharing.SetAccessInheritanceError object on failure.

  • Share a folder with collaborators. Most sharing will be completed synchronously. Large folders will be completed asynchronously. To make testing the async case repeatable, set ShareFolderArg.force_async. If a asyncJobId in ShareFolderLaunch is returned, you’ll need to call checkShareJobStatus until the action completes to get the metadata for the folder.

    Declaration

    Swift

    @discardableResult
    open func shareFolder(path: String, aclUpdatePolicy: Sharing.AclUpdatePolicy? = nil, forceAsync: Bool = false, memberPolicy: Sharing.MemberPolicy? = nil, sharedLinkPolicy: Sharing.SharedLinkPolicy? = nil, viewerInfoPolicy: Sharing.ViewerInfoPolicy? = nil, accessInheritance: Sharing.AccessInheritance = .inherit, actions: Array<Sharing.FolderAction>? = nil, linkSettings: Sharing.LinkSettings? = nil) -> RpcRequest<Sharing.ShareFolderLaunchSerializer, Sharing.ShareFolderErrorSerializer>

    Parameters

    actions

    A list of FolderActions corresponding to FolderPermissions that should appear in the response’s permissions in SharedFolderMetadata field describing the actions the authenticated user can perform on the folder.

    linkSettings

    Settings on the link for this folder.

    Return Value

    Through the response callback, the caller will receive a Sharing.ShareFolderLaunch object on success or a Sharing.ShareFolderError object on failure.

  • Transfer ownership of a shared folder to a member of the shared folder. User must have owner in AccessLevel access to the shared folder to perform a transfer.

    Declaration

    Swift

    @discardableResult
    open func transferFolder(sharedFolderId: String, toDropboxId: String) -> RpcRequest<VoidSerializer, Sharing.TransferFolderErrorSerializer>

    Parameters

    sharedFolderId

    The ID for the shared folder.

    toDropboxId

    A account or team member ID to transfer ownership to.

    Return Value

    Through the response callback, the caller will receive a Void object on success or a Sharing.TransferFolderError object on failure.

  • The current user unmounts the designated folder. They can re-mount the folder at a later time using mountFolder.

    Declaration

    Swift

    @discardableResult
    open func unmountFolder(sharedFolderId: String) -> RpcRequest<VoidSerializer, Sharing.UnmountFolderErrorSerializer>

    Parameters

    sharedFolderId

    The ID for the shared folder.

    Return Value

    Through the response callback, the caller will receive a Void object on success or a Sharing.UnmountFolderError object on failure.

  • Remove all members from this file. Does not remove inherited members.

    Declaration

    Swift

    @discardableResult
    open func unshareFile(file: String) -> RpcRequest<VoidSerializer, Sharing.UnshareFileErrorSerializer>

    Parameters

    file

    The file to unshare.

    Return Value

    Through the response callback, the caller will receive a Void object on success or a Sharing.UnshareFileError object on failure.

  • Allows a shared folder owner to unshare the folder. You’ll need to call checkJobStatus to determine if the action has completed successfully.

    Declaration

    Swift

    @discardableResult
    open func unshareFolder(sharedFolderId: String, leaveACopy: Bool = false) -> RpcRequest<Async.LaunchEmptyResultSerializer, Sharing.UnshareFolderErrorSerializer>

    Parameters

    sharedFolderId

    The ID for the shared folder.

    leaveACopy

    If true, members of this shared folder will get a copy of this folder after it’s unshared. Otherwise, it will be removed from their Dropbox. The current user, who is an owner, will always retain their copy.

    Return Value

    Through the response callback, the caller will receive a Async.LaunchEmptyResult object on success or a Sharing.UnshareFolderError object on failure.

  • Changes a member’s access on a shared file.

    Declaration

    Swift

    @discardableResult
    open func updateFileMember(file: String, member: Sharing.MemberSelector, accessLevel: Sharing.AccessLevel) -> RpcRequest<Sharing.MemberAccessLevelResultSerializer, Sharing.FileMemberActionErrorSerializer>

    Return Value

    Through the response callback, the caller will receive a Sharing.MemberAccessLevelResult object on success or a Sharing.FileMemberActionError object on failure.

  • Allows an owner or editor of a shared folder to update another member’s permissions.

    Declaration

    Swift

    @discardableResult
    open func updateFolderMember(sharedFolderId: String, member: Sharing.MemberSelector, accessLevel: Sharing.AccessLevel) -> RpcRequest<Sharing.MemberAccessLevelResultSerializer, Sharing.UpdateFolderMemberErrorSerializer>

    Parameters

    sharedFolderId

    The ID for the shared folder.

    member

    The member of the shared folder to update. Only the dropboxId in MemberSelector may be set at this time.

    accessLevel

    The new access level for member. owner in AccessLevel is disallowed.

    Return Value

    Through the response callback, the caller will receive a Sharing.MemberAccessLevelResult object on success or a Sharing.UpdateFolderMemberError object on failure.

  • Update the sharing policies for a shared folder. User must have owner in AccessLevel access to the shared folder to update its policies.

    Declaration

    Swift

    @discardableResult
    open func updateFolderPolicy(sharedFolderId: String, memberPolicy: Sharing.MemberPolicy? = nil, aclUpdatePolicy: Sharing.AclUpdatePolicy? = nil, viewerInfoPolicy: Sharing.ViewerInfoPolicy? = nil, sharedLinkPolicy: Sharing.SharedLinkPolicy? = nil, linkSettings: Sharing.LinkSettings? = nil, actions: Array<Sharing.FolderAction>? = nil) -> RpcRequest<Sharing.SharedFolderMetadataSerializer, Sharing.UpdateFolderPolicyErrorSerializer>

    Parameters

    sharedFolderId

    The ID for the shared folder.

    memberPolicy

    Who can be a member of this shared folder. Only applicable if the current user is on a team.

    aclUpdatePolicy

    Who can add and remove members of this shared folder.

    viewerInfoPolicy

    Who can enable/disable viewer info for this shared folder.

    sharedLinkPolicy

    The policy to apply to shared links created for content inside this shared folder. The current user must be on a team to set this policy to members in SharedLinkPolicy.

    linkSettings

    Settings on the link for this folder.

    actions

    A list of FolderActions corresponding to FolderPermissions that should appear in the response’s permissions in SharedFolderMetadata field describing the actions the authenticated user can perform on the folder.

    Return Value

    Through the response callback, the caller will receive a Sharing.SharedFolderMetadata object on success or a Sharing.UpdateFolderPolicyError object on failure.