SharingRoutes
public class SharingRoutes : DropboxTransportClientOwning
Routes for the sharing namespace For Objective-C compatible routes see DBSharingRoutes
-
Adds specified members to a file.
scope: sharing.write
Declaration
Swift
@discardableResult public func addFileMember( file: String, members: [Sharing.MemberSelector], customMessage: String? = nil, quiet: Bool = false, accessLevel: Sharing.AccessLevel = .viewer, addMessageAsComment: Bool = false ) -> RpcRequest<ArraySerializer<Sharing.FileMemberActionResultSerializer>, Sharing.AddFileMemberErrorSerializer>Parameters
fileFile to which to add members.
membersMembers to add. Note that even an email address is given, this may result in a user being directly added to the membership if that email is the user’s main account email.
customMessageMessage to send to added members in their invitation.
quietWhether added members should be notified via email and device notifications of their invitation.
accessLevelAccessLevel union object, describing what access level we want to give new members.
addMessageAsCommentIf 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 aSharing.AddFileMemberErrorobject 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.
scope: sharing.write
Declaration
Swift
@discardableResult public func addFolderMember( sharedFolderId: String, members: [Sharing.AddMember], quiet: Bool = false, customMessage: String? = nil ) -> RpcRequest<VoidSerializer, Sharing.AddFolderMemberErrorSerializer>Parameters
sharedFolderIdThe ID for the shared folder.
membersThe intended list of members to add. Added members will receive invites to join the shared folder.
quietWhether added members should be notified via email and device notifications of their invite.
customMessageOptional message to display to added members in their invitation.
Return Value
Through the response callback, the caller will receive a
Voidobject on success or aSharing.AddFolderMemberErrorobject on failure. -
Returns the status of an asynchronous job.
scope: sharing.write
Declaration
Swift
@discardableResult public func checkJobStatus(asyncJobId: String) -> RpcRequest<Sharing.JobStatusSerializer, Async.PollErrorSerializer>Parameters
asyncJobIdId 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.JobStatusobject on success or aAsync.PollErrorobject on failure. -
Returns the status of an asynchronous job for sharing a folder.
scope: sharing.write
Declaration
Swift
@discardableResult public func checkRemoveMemberJobStatus(asyncJobId: String) -> RpcRequest<Sharing.RemoveMemberJobStatusSerializer, Async.PollErrorSerializer>Parameters
asyncJobIdId 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.RemoveMemberJobStatusobject on success or aAsync.PollErrorobject on failure. -
Returns the status of an asynchronous job for sharing a folder.
scope: sharing.write
Declaration
Swift
@discardableResult public func checkShareJobStatus(asyncJobId: String) -> RpcRequest<Sharing.ShareFolderJobStatusSerializer, Async.PollErrorSerializer>Parameters
asyncJobIdId 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.ShareFolderJobStatusobject on success or aAsync.PollErrorobject 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).
scope: sharing.write
Declaration
Swift
@discardableResult public func createSharedLinkWithSettings( path: String, settings: Sharing.SharedLinkSettings? = nil ) -> RpcRequest<Sharing.SharedLinkMetadataSerializer, Sharing.CreateSharedLinkWithSettingsErrorSerializer>Parameters
pathThe path to be shared by the shared link.
settingsThe requested settings for the newly created shared link.
Return Value
Through the response callback, the caller will receive a
Sharing.SharedLinkMetadataobject on success or aSharing.CreateSharedLinkWithSettingsErrorobject on failure. -
Returns shared file metadata.
scope: sharing.read
Declaration
Swift
@discardableResult public func getFileMetadata( file: String, actions: [Sharing.FileAction]? = nil ) -> RpcRequest<Sharing.SharedFileMetadataSerializer, Sharing.GetFileMetadataErrorSerializer>Parameters
fileThe file to query.
actionsA list of
FileActions corresponding toFilePermissions 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.SharedFileMetadataobject on success or aSharing.GetFileMetadataErrorobject on failure. -
Returns shared file metadata.
scope: sharing.read
Declaration
Swift
@discardableResult public func getFileMetadataBatch( files: [String], actions: [Sharing.FileAction]? = nil ) -> RpcRequest<ArraySerializer<Sharing.GetFileMetadataBatchResultSerializer>, Sharing.SharingUserErrorSerializer>Parameters
filesThe files to query.
actionsA list of
FileActions corresponding toFilePermissions 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 aSharing.SharingUserErrorobject on failure. -
Returns shared folder metadata by its folder ID.
scope: sharing.read
Declaration
Swift
@discardableResult public func getFolderMetadata( sharedFolderId: String, actions: [Sharing.FolderAction]? = nil ) -> RpcRequest<Sharing.SharedFolderMetadataSerializer, Sharing.SharedFolderAccessErrorSerializer>Parameters
sharedFolderIdThe ID for the shared folder.
actionsA list of
FolderActions corresponding toFolderPermissions 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.SharedFolderMetadataobject on success or aSharing.SharedFolderAccessErrorobject on failure. -
Download the shared link’s file from a user’s Dropbox.
scope: sharing.read
Declaration
Swift
@discardableResult public func getSharedLinkFile( url: String, path: String? = nil, linkPassword: String? = nil, overwrite: Bool = false, destination: URL ) -> DownloadRequestFile<Sharing.SharedLinkMetadataSerializer, Sharing.GetSharedLinkFileErrorSerializer>Parameters
urlURL of the shared link.
pathIf 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.
linkPasswordIf the shared link has a password, this parameter can be used.
overwriteA boolean to set behavior in the event of a naming conflict.
Truewill overwrite conflicting file at destination.Falsewill take no action (but if left unhandled in destination closure, an NSError will be thrown).destinationThe location to write the download to.
Return Value
Through the response callback, the caller will receive a
Sharing.SharedLinkMetadataobject on success or aSharing.GetSharedLinkFileErrorobject on failure. -
Download the shared link’s file from a user’s Dropbox.
scope: sharing.read
Declaration
Swift
@discardableResult public func getSharedLinkFile( url: String, path: String? = nil, linkPassword: String? = nil ) -> DownloadRequestMemory<Sharing.SharedLinkMetadataSerializer, Sharing.GetSharedLinkFileErrorSerializer>Parameters
urlURL of the shared link.
pathIf 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.
linkPasswordIf the shared link has a password, this parameter can be used.
Return Value
Through the response callback, the caller will receive a
Sharing.SharedLinkMetadataobject on success or aSharing.GetSharedLinkFileErrorobject on failure. -
Get the shared link’s metadata.
scope: sharing.read
Declaration
Swift
@discardableResult public func getSharedLinkMetadata( url: String, path: String? = nil, linkPassword: String? = nil ) -> RpcRequest<Sharing.SharedLinkMetadataSerializer, Sharing.SharedLinkErrorSerializer>Parameters
urlURL of the shared link.
pathIf 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.
linkPasswordIf the shared link has a password, this parameter can be used.
Return Value
Through the response callback, the caller will receive a
Sharing.SharedLinkMetadataobject on success or aSharing.SharedLinkErrorobject on failure. -
Use to obtain the members who have been invited to a file, both inherited and uninherited members.
scope: sharing.read
Declaration
Swift
@discardableResult public func listFileMembers( file: String, actions: [Sharing.MemberAction]? = nil, includeInherited: Bool = true, limit: UInt32 = 100 ) -> RpcRequest<Sharing.SharedFileMembersSerializer, Sharing.ListFileMembersErrorSerializer>Parameters
fileThe file for which you want to see members.
actionsThe actions for which to return permissions on a member.
includeInheritedWhether to include members who only have access from a parent shared folder.
limitNumber 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.SharedFileMembersobject on success or aSharing.ListFileMembersErrorobject 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.
scope: sharing.read
Declaration
Swift
@discardableResult public func listFileMembersBatch( files: [String], limit: UInt32 = 10 ) -> RpcRequest<ArraySerializer<Sharing.ListFileMembersBatchResultSerializer>, Sharing.SharingUserErrorSerializer>Parameters
filesFiles for which to return members.
limitNumber 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 aSharing.SharingUserErrorobject on failure. -
Once a cursor has been retrieved from listFileMembers or listFileMembersBatch, use this to paginate through all shared file members.
scope: sharing.read
Declaration
Swift
@discardableResult public func listFileMembersContinue(cursor: String) -> RpcRequest<Sharing.SharedFileMembersSerializer, Sharing.ListFileMembersContinueErrorSerializer>Parameters
cursorThe cursor returned by your last call to listFileMembers, listFileMembersContinue, or listFileMembersBatch.
Return Value
Through the response callback, the caller will receive a
Sharing.SharedFileMembersobject on success or aSharing.ListFileMembersContinueErrorobject on failure. -
Returns shared folder membership by its folder ID.
scope: sharing.read
Declaration
Swift
@discardableResult public func listFolderMembers( sharedFolderId: String, actions: [Sharing.MemberAction]? = nil, limit: UInt32 = 1_000 ) -> RpcRequest<Sharing.SharedFolderMembersSerializer, Sharing.SharedFolderAccessErrorSerializer>Parameters
sharedFolderIdThe ID for the shared folder.
Return Value
Through the response callback, the caller will receive a
Sharing.SharedFolderMembersobject on success or aSharing.SharedFolderAccessErrorobject on failure. -
Once a cursor has been retrieved from listFolderMembers, use this to paginate through all shared folder members.
scope: sharing.read
Declaration
Swift
@discardableResult public func listFolderMembersContinue(cursor: String) -> RpcRequest<Sharing.SharedFolderMembersSerializer, Sharing.ListFolderMembersContinueErrorSerializer>Parameters
cursorThe cursor returned by your last call to listFolderMembers or listFolderMembersContinue.
Return Value
Through the response callback, the caller will receive a
Sharing.SharedFolderMembersobject on success or aSharing.ListFolderMembersContinueErrorobject on failure. -
Return the list of all shared folders the current user has access to.
scope: sharing.read
Declaration
Swift
@discardableResult public func listFolders( limit: UInt32 = 1_000, actions: [Sharing.FolderAction]? = nil ) -> RpcRequest<Sharing.ListFoldersResultSerializer, VoidSerializer>Parameters
limitThe maximum number of results to return per request.
actionsA list of
FolderActions corresponding toFolderPermissions 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.ListFoldersResultobject on success or aVoidobject 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.
scope: sharing.read
Declaration
Swift
@discardableResult public func listFoldersContinue(cursor: String) -> RpcRequest<Sharing.ListFoldersResultSerializer, Sharing.ListFoldersContinueErrorSerializer>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
Sharing.ListFoldersResultobject on success or aSharing.ListFoldersContinueErrorobject on failure. -
Return the list of all shared folders the current user can mount or unmount.
scope: sharing.read
Declaration
Swift
@discardableResult public func listMountableFolders( limit: UInt32 = 1_000, actions: [Sharing.FolderAction]? = nil ) -> RpcRequest<Sharing.ListFoldersResultSerializer, VoidSerializer>Parameters
limitThe maximum number of results to return per request.
actionsA list of
FolderActions corresponding toFolderPermissions 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.ListFoldersResultobject on success or aVoidobject 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.
scope: sharing.read
Declaration
Swift
@discardableResult public func listMountableFoldersContinue(cursor: String) -> RpcRequest<Sharing.ListFoldersResultSerializer, Sharing.ListFoldersContinueErrorSerializer>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
Sharing.ListFoldersResultobject on success or aSharing.ListFoldersContinueErrorobject 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.
scope: sharing.read
Declaration
Swift
@discardableResult public func listReceivedFiles( limit: UInt32 = 100, actions: [Sharing.FileAction]? = nil ) -> RpcRequest<Sharing.ListFilesResultSerializer, Sharing.SharingUserErrorSerializer>Parameters
limitNumber of files to return max per query. Defaults to 100 if no limit is specified.
actionsA list of
FileActions corresponding toFilePermissions 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.ListFilesResultobject on success or aSharing.SharingUserErrorobject on failure. -
Get more results with a cursor from listReceivedFiles.
scope: sharing.read
Declaration
Swift
@discardableResult public func listReceivedFilesContinue(cursor: String) -> RpcRequest<Sharing.ListFilesResultSerializer, Sharing.ListFilesContinueErrorSerializer>Parameters
cursorCursor in cursor in ListFilesResult.
Return Value
Through the response callback, the caller will receive a
Sharing.ListFilesResultobject on success or aSharing.ListFilesContinueErrorobject on failure. -
List shared links of this user. If no path is given, returns a list of all shared links for the current user. For members of business teams using team space and member folders, returns all shared links in the team member’s home folder unless the team space ID is specified in the request header. For more information, refer to the Namespace Guide https://www.dropbox.com/developers/reference/namespace-guide. 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.
scope: sharing.read
Declaration
Swift
@discardableResult public func listSharedLinks( path: String? = nil, cursor: String? = nil, directOnly: Bool? = nil ) -> RpcRequest<Sharing.ListSharedLinksResultSerializer, Sharing.ListSharedLinksErrorSerializer>Parameters
pathSee listSharedLinks description.
cursorThe cursor returned by your last call to listSharedLinks.
directOnlySee listSharedLinks description.
Return Value
Through the response callback, the caller will receive a
Sharing.ListSharedLinksResultobject on success or aSharing.ListSharedLinksErrorobject 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.
scope: sharing.write
Declaration
Swift
@discardableResult public func modifySharedLinkSettings( url: String, settings: Sharing.SharedLinkSettings, removeExpiration: Bool = false ) -> RpcRequest<Sharing.SharedLinkMetadataSerializer, Sharing.ModifySharedLinkSettingsErrorSerializer>Parameters
urlURL of the shared link to change its settings.
settingsSet of settings for the shared link.
removeExpirationIf set to true, removes the expiration of the shared link.
Return Value
Through the response callback, the caller will receive a
Sharing.SharedLinkMetadataobject on success or aSharing.ModifySharedLinkSettingsErrorobject 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.
scope: sharing.write
Declaration
Swift
@discardableResult public func mountFolder(sharedFolderId: String) -> RpcRequest<Sharing.SharedFolderMetadataSerializer, Sharing.MountFolderErrorSerializer>Parameters
sharedFolderIdThe ID of the shared folder to mount.
Return Value
Through the response callback, the caller will receive a
Sharing.SharedFolderMetadataobject on success or aSharing.MountFolderErrorobject 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.
scope: sharing.write
Declaration
Swift
@discardableResult public func relinquishFileMembership(file: String) -> RpcRequest<VoidSerializer, Sharing.RelinquishFileMembershipErrorSerializer>Parameters
fileThe path or id for the file.
Return Value
Through the response callback, the caller will receive a
Voidobject on success or aSharing.RelinquishFileMembershipErrorobject 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.
scope: sharing.write
Declaration
Swift
@discardableResult public func relinquishFolderMembership( sharedFolderId: String, leaveACopy: Bool = false ) -> RpcRequest<Async.LaunchEmptyResultSerializer, Sharing.RelinquishFolderMembershipErrorSerializer>Parameters
sharedFolderIdThe ID for the shared folder.
leaveACopyKeep a copy of the folder’s contents upon relinquishing membership. This must be set to false when the folder is within a team folder or another shared folder.
Return Value
Through the response callback, the caller will receive a
Async.LaunchEmptyResultobject on success or aSharing.RelinquishFolderMembershipErrorobject on failure. -
Removes a specified member from the file.
scope: sharing.write
Declaration
Swift
@discardableResult public func removeFileMember2( file: String, member: Sharing.MemberSelector ) -> RpcRequest<Sharing.FileMemberRemoveActionResultSerializer, Sharing.RemoveFileMemberErrorSerializer>Parameters
fileFile from which to remove members.
memberMember 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.FileMemberRemoveActionResultobject on success or aSharing.RemoveFileMemberErrorobject on failure. -
Allows an owner or editor (if the ACL update policy allows) of a shared folder to remove another member.
scope: sharing.write
Declaration
Swift
@discardableResult public func removeFolderMember( sharedFolderId: String, member: Sharing.MemberSelector, leaveACopy: Bool ) -> RpcRequest<Async.LaunchResultBaseSerializer, Sharing.RemoveFolderMemberErrorSerializer>Parameters
sharedFolderIdThe ID for the shared folder.
memberThe member to remove from the folder.
leaveACopyIf 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. This must be set to false when removing a group, or when the folder is within a team folder or another shared folder.
Return Value
Through the response callback, the caller will receive a
Async.LaunchResultBaseobject on success or aSharing.RemoveFolderMemberErrorobject 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.
scope: sharing.write
Declaration
Swift
@discardableResult public func revokeSharedLink(url: String) -> RpcRequest<VoidSerializer, Sharing.RevokeSharedLinkErrorSerializer>Parameters
urlURL of the shared link.
Return Value
Through the response callback, the caller will receive a
Voidobject on success or aSharing.RevokeSharedLinkErrorobject 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.
scope: sharing.write
Declaration
Swift
@discardableResult public func setAccessInheritance( sharedFolderId: String, accessInheritance: Sharing .AccessInheritance = .inherit ) -> RpcRequest<Sharing.ShareFolderLaunchSerializer, Sharing.SetAccessInheritanceErrorSerializer>Parameters
accessInheritanceThe access inheritance settings for the folder.
sharedFolderIdThe ID for the shared folder.
Return Value
Through the response callback, the caller will receive a
Sharing.ShareFolderLaunchobject on success or aSharing.SetAccessInheritanceErrorobject on failure. -
shareFolder(path:aclUpdatePolicy: forceAsync: memberPolicy: sharedLinkPolicy: viewerInfoPolicy: accessInheritance: actions: linkSettings: ) 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.scope: sharing.write
Declaration
Swift
@discardableResult public 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: [Sharing.FolderAction]? = nil, linkSettings: Sharing.LinkSettings? = nil ) -> RpcRequest<Sharing.ShareFolderLaunchSerializer, Sharing.ShareFolderErrorSerializer>Parameters
actionsA list of
FolderActions corresponding toFolderPermissions that should appear in the response’s permissions in SharedFolderMetadata field describing the actions the authenticated user can perform on the folder.linkSettingsSettings on the link for this folder.
Return Value
Through the response callback, the caller will receive a
Sharing.ShareFolderLaunchobject on success or aSharing.ShareFolderErrorobject 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.
scope: sharing.write
Declaration
Swift
@discardableResult public func transferFolder( sharedFolderId: String, toDropboxId: String ) -> RpcRequest<VoidSerializer, Sharing.TransferFolderErrorSerializer>Parameters
sharedFolderIdThe ID for the shared folder.
toDropboxIdA account or team member ID to transfer ownership to.
Return Value
Through the response callback, the caller will receive a
Voidobject on success or aSharing.TransferFolderErrorobject on failure. -
The current user unmounts the designated folder. They can re-mount the folder at a later time using mountFolder.
scope: sharing.write
Declaration
Swift
@discardableResult public func unmountFolder(sharedFolderId: String) -> RpcRequest<VoidSerializer, Sharing.UnmountFolderErrorSerializer>Parameters
sharedFolderIdThe ID for the shared folder.
Return Value
Through the response callback, the caller will receive a
Voidobject on success or aSharing.UnmountFolderErrorobject on failure. -
Remove all members from this file. Does not remove inherited members.
scope: sharing.write
Declaration
Swift
@discardableResult public func unshareFile(file: String) -> RpcRequest<VoidSerializer, Sharing.UnshareFileErrorSerializer>Parameters
fileThe file to unshare.
Return Value
Through the response callback, the caller will receive a
Voidobject on success or aSharing.UnshareFileErrorobject 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.
scope: sharing.write
Declaration
Swift
@discardableResult public func unshareFolder( sharedFolderId: String, leaveACopy: Bool = false ) -> RpcRequest<Async.LaunchEmptyResultSerializer, Sharing.UnshareFolderErrorSerializer>Parameters
sharedFolderIdThe ID for the shared folder.
leaveACopyIf 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.LaunchEmptyResultobject on success or aSharing.UnshareFolderErrorobject on failure. -
Changes a member’s access on a shared file.
scope: sharing.write
Declaration
Swift
@discardableResult public func updateFileMember( file: String, member: Sharing.MemberSelector, accessLevel: Sharing.AccessLevel ) -> RpcRequest<Sharing.MemberAccessLevelResultSerializer, Sharing.FileMemberActionErrorSerializer>Parameters
fileFile for which we are changing a member’s access.
memberThe member whose access we are changing.
accessLevelThe new access level for the member.
Return Value
Through the response callback, the caller will receive a
Sharing.MemberAccessLevelResultobject on success or aSharing.FileMemberActionErrorobject on failure. -
Allows an owner or editor of a shared folder to update another member’s permissions.
scope: sharing.write
Declaration
Swift
@discardableResult public func updateFolderMember( sharedFolderId: String, member: Sharing.MemberSelector, accessLevel: Sharing.AccessLevel ) -> RpcRequest<Sharing.MemberAccessLevelResultSerializer, Sharing.UpdateFolderMemberErrorSerializer>Parameters
sharedFolderIdThe ID for the shared folder.
memberThe member of the shared folder to update. Only the dropboxId in MemberSelector may be set at this time.
accessLevelThe new access level for member. owner in AccessLevel is disallowed.
Return Value
Through the response callback, the caller will receive a
Sharing.MemberAccessLevelResultobject on success or aSharing.UpdateFolderMemberErrorobject on failure. -
updateFolderPolicy(sharedFolderId:memberPolicy: aclUpdatePolicy: viewerInfoPolicy: sharedLinkPolicy: linkSettings: actions: ) Update the sharing policies for a shared folder. User must have owner in AccessLevel access to the shared folder to update its policies.
scope: sharing.write
Declaration
Swift
@discardableResult public 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: [Sharing.FolderAction]? = nil ) -> RpcRequest<Sharing.SharedFolderMetadataSerializer, Sharing.UpdateFolderPolicyErrorSerializer>Parameters
sharedFolderIdThe ID for the shared folder.
memberPolicyWho can be a member of this shared folder. Only applicable if the current user is on a team.
aclUpdatePolicyWho can add and remove members of this shared folder.
viewerInfoPolicyWho can enable/disable viewer info for this shared folder.
sharedLinkPolicyThe 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.
linkSettingsSettings on the link for this folder.
actionsA list of
FolderActions corresponding toFolderPermissions 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.SharedFolderMetadataobject on success or aSharing.UpdateFolderPolicyErrorobject on failure.
View on GitHub
SharingRoutes Class Reference