DBFILESAppAuthRoutes
Objective-C
@interface DBFILESAppAuthRoutes : NSObject
                Swift
class DBFILESAppAuthRoutes : NSObject
                Routes for the Files 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
DBFILESAppAuthRoutesnamespace container object with a networking client.Declaration
Objective-C
- (nonnull instancetype)init:(nonnull id<DBTransportClient>)client; - 
                  
                  
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESPreviewResult *, DBFILESThumbnailV2Error *> *)getThumbnailV2Url:(nonnull DBFILESPathOrLink *)resource overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination;Swift
func getThumbnailV2Url(_ resource: DBFILESPathOrLink, overwrite: Bool, destination: URL) -> DBDownloadUrlTask<DBFILESPreviewResult, DBFILESThumbnailV2Error>Parameters
resourceInformation specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESPreviewResultobject on success or aDBFILESThumbnailV2Errorobject on failure. - 
                  
                  
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESPreviewResult *, DBFILESThumbnailV2Error *> *)getThumbnailV2Url:(nonnull DBFILESPathOrLink *)resource format:(nullable DBFILESThumbnailFormat *)format size:(nullable DBFILESThumbnailSize *)size mode:(nullable DBFILESThumbnailMode *)mode overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination;Swift
func getThumbnailV2Url(_ resource: DBFILESPathOrLink, format: DBFILESThumbnailFormat?, size: DBFILESThumbnailSize?, mode: DBFILESThumbnailMode?, overwrite: Bool, destination: URL) -> DBDownloadUrlTask<DBFILESPreviewResult, DBFILESThumbnailV2Error>Parameters
resourceInformation specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path.
formatThe format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts.
sizeThe size for the thumbnail image.
modeHow to resize and crop the image to achieve the desired size.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBFILESPreviewResultobject on success or aDBFILESThumbnailV2Errorobject on failure. - 
                  
                  
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESPreviewResult *, DBFILESThumbnailV2Error *> *)getThumbnailV2Url:(nonnull DBFILESPathOrLink *)resource overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func getThumbnailV2Url(_ resource: DBFILESPathOrLink, overwrite: Bool, destination: URL, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadUrlTask<DBFILESPreviewResult, DBFILESThumbnailV2Error>Parameters
resourceInformation specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESPreviewResultobject on success or aDBFILESThumbnailV2Errorobject on failure. - 
                  
                  
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBFILESPreviewResult *, DBFILESThumbnailV2Error *> *)getThumbnailV2Url:(nonnull DBFILESPathOrLink *)resource format:(nullable DBFILESThumbnailFormat *)format size:(nullable DBFILESThumbnailSize *)size mode:(nullable DBFILESThumbnailMode *)mode overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func getThumbnailV2Url(_ resource: DBFILESPathOrLink, format: DBFILESThumbnailFormat?, size: DBFILESThumbnailSize?, mode: DBFILESThumbnailMode?, overwrite: Bool, destination: URL, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadUrlTask<DBFILESPreviewResult, DBFILESThumbnailV2Error>Parameters
resourceInformation specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path.
formatThe format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts.
sizeThe size for the thumbnail image.
modeHow to resize and crop the image to achieve the desired size.
overwriteA boolean to set behavior in the event of a naming conflict.
YESwill overwrite conflicting file at destination.NOwill take no action, resulting in anNSErrorreturned to the response handler in the event of a file conflict.destinationThe file url of the desired download output location.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESPreviewResultobject on success or aDBFILESThumbnailV2Errorobject on failure. - 
                  
                  
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESPreviewResult *, DBFILESThumbnailV2Error *> *)getThumbnailV2Data:(nonnull DBFILESPathOrLink *)resource;Swift
func getThumbnailV2Data(_ resource: DBFILESPathOrLink) -> DBDownloadDataTask<DBFILESPreviewResult, DBFILESThumbnailV2Error>Parameters
resourceInformation specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path.
Return Value
Through the response callback, the caller will receive a
DBFILESPreviewResultobject on success or aDBFILESThumbnailV2Errorobject on failure. - 
                  
                  
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESPreviewResult *, DBFILESThumbnailV2Error *> *)getThumbnailV2Data:(nonnull DBFILESPathOrLink *)resource format:(nullable DBFILESThumbnailFormat *)format size:(nullable DBFILESThumbnailSize *)size mode:(nullable DBFILESThumbnailMode *)mode;Swift
func getThumbnailV2Data(_ resource: DBFILESPathOrLink, format: DBFILESThumbnailFormat?, size: DBFILESThumbnailSize?, mode: DBFILESThumbnailMode?) -> DBDownloadDataTask<DBFILESPreviewResult, DBFILESThumbnailV2Error>Parameters
resourceInformation specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path.
formatThe format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts.
sizeThe size for the thumbnail image.
modeHow to resize and crop the image to achieve the desired size.
Return Value
Through the response callback, the caller will receive a
DBFILESPreviewResultobject on success or aDBFILESThumbnailV2Errorobject on failure. - 
                  
                  
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESPreviewResult *, DBFILESThumbnailV2Error *> *)getThumbnailV2Data:(nonnull DBFILESPathOrLink *)resource byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func getThumbnailV2Data(_ resource: DBFILESPathOrLink, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadDataTask<DBFILESPreviewResult, DBFILESThumbnailV2Error>Parameters
resourceInformation specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESPreviewResultobject on success or aDBFILESThumbnailV2Errorobject on failure. - 
                  
                  
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBFILESPreviewResult *, DBFILESThumbnailV2Error *> *)getThumbnailV2Data:(nonnull DBFILESPathOrLink *)resource format:(nullable DBFILESThumbnailFormat *)format size:(nullable DBFILESThumbnailSize *)size mode:(nullable DBFILESThumbnailMode *)mode byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;Swift
func getThumbnailV2Data(_ resource: DBFILESPathOrLink, format: DBFILESThumbnailFormat?, size: DBFILESThumbnailSize?, mode: DBFILESThumbnailMode?, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadDataTask<DBFILESPreviewResult, DBFILESThumbnailV2Error>Parameters
resourceInformation specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path.
formatThe format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts.
sizeThe size for the thumbnail image.
modeHow to resize and crop the image to achieve the desired size.
byteOffsetStartFor partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEndFor partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBFILESPreviewResultobject on success or aDBFILESThumbnailV2Errorobject on failure. - 
                  
                  
Starts returning the contents of a folder. If the result’s
hasMoreinDBFILESListFolderResultfield is true, calllistFolderContinuewith the returnedcursorinDBFILESListFolderResultto retrieve more entries. If you’re usingrecursiveinDBFILESListFolderArgset to true to keep a local cache of the contents of a Dropbox account, iterate through each entry in order and process them as follows to keep your local state in sync: For each FileMetadata, store the new entry at the given path in your local state. If the required parent folders don’t exist yet, create them. If there’s already something else at the given path, replace it and remove all its children. For each FolderMetadata, store the new entry at the given path in your local state. If the required parent folders don’t exist yet, create them. If there’s already something else at the given path, replace it but leave the children as they are. Check the new entry’sreadOnlyinDBFILESFolderSharingInfoand set all its children’s read-only statuses to match. For each DeletedMetadata, if your local state has something at the given path, remove it and all its children. If there’s nothing at the given path, ignore this entry. Note: auth.RateLimitError may be returned if multiplelistFolderorlistFolderContinuecalls with same parameters are made simultaneously by same API app for same user. If your app implements retry logic, please hold off the retry until the previous request finishes.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESListFolderResult *, DBFILESListFolderError *> *) listFolder:(nonnull NSString *)path;Swift
func listFolder(_ path: String) -> DBRpcTask<DBFILESListFolderResult, DBFILESListFolderError>Parameters
pathA unique identifier for the file.
Return Value
Through the response callback, the caller will receive a
DBFILESListFolderResultobject on success or aDBFILESListFolderErrorobject on failure. - 
                  
-listFolder:recursive: includeMediaInfo: includeDeleted: includeHasExplicitSharedMembers: includeMountedFolders: limit: sharedLink: includePropertyGroups: includeNonDownloadableFiles: Starts returning the contents of a folder. If the result’s
hasMoreinDBFILESListFolderResultfield is true, calllistFolderContinuewith the returnedcursorinDBFILESListFolderResultto retrieve more entries. If you’re usingrecursiveinDBFILESListFolderArgset to true to keep a local cache of the contents of a Dropbox account, iterate through each entry in order and process them as follows to keep your local state in sync: For each FileMetadata, store the new entry at the given path in your local state. If the required parent folders don’t exist yet, create them. If there’s already something else at the given path, replace it and remove all its children. For each FolderMetadata, store the new entry at the given path in your local state. If the required parent folders don’t exist yet, create them. If there’s already something else at the given path, replace it but leave the children as they are. Check the new entry’sreadOnlyinDBFILESFolderSharingInfoand set all its children’s read-only statuses to match. For each DeletedMetadata, if your local state has something at the given path, remove it and all its children. If there’s nothing at the given path, ignore this entry. Note: auth.RateLimitError may be returned if multiplelistFolderorlistFolderContinuecalls with same parameters are made simultaneously by same API app for same user. If your app implements retry logic, please hold off the retry until the previous request finishes.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESListFolderResult *, DBFILESListFolderError *> *) listFolder:(nonnull NSString *)path recursive:(nullable NSNumber *)recursive includeMediaInfo:(nullable NSNumber *)includeMediaInfo includeDeleted:(nullable NSNumber *)includeDeleted includeHasExplicitSharedMembers: (nullable NSNumber *)includeHasExplicitSharedMembers includeMountedFolders:(nullable NSNumber *)includeMountedFolders limit:(nullable NSNumber *)limit sharedLink:(nullable DBFILESSharedLink *)sharedLink includePropertyGroups: (nullable DBFILEPROPERTIESTemplateFilterBase *) includePropertyGroups includeNonDownloadableFiles: (nullable NSNumber *)includeNonDownloadableFiles;Swift
func listFolder(_ path: String, recursive: NSNumber?, includeMediaInfo: NSNumber?, includeDeleted: NSNumber?, includeHasExplicitSharedMembers: NSNumber?, includeMountedFolders: NSNumber?, limit: NSNumber?, sharedLink: DBFILESSharedLink?, includePropertyGroups: DBFILEPROPERTIESTemplateFilterBase?, includeNonDownloadableFiles: NSNumber?) -> DBRpcTask<DBFILESListFolderResult, DBFILESListFolderError>Parameters
pathA unique identifier for the file.
recursiveIf true, the list folder operation will be applied recursively to all subfolders and the response will contain contents of all subfolders.
includeMediaInfoIf true,
mediaInfoinDBFILESFileMetadatais set for photo and video. This parameter will no longer have an effect starting December 2, 2019.includeDeletedIf true, the results will include entries for files and folders that used to exist but were deleted.
includeHasExplicitSharedMembersIf true, the results will include a flag for each file indicating whether or not that file has any explicit members.
includeMountedFoldersIf true, the results will include entries under mounted folders which includes app folder, shared folder and team folder.
limitThe maximum number of results to return per request. Note: This is an approximate number and there can be slightly more entries returned in some cases.
sharedLinkA shared link to list the contents of. If the link is password-protected, the password must be provided. If this field is present,
pathinDBFILESListFolderArgwill be relative to root of the shared link. Only non-recursive mode is supported for shared link.includePropertyGroupsIf set to a valid list of template IDs,
propertyGroupsinDBFILESFileMetadatais set if there exists property data associated with the file and each of the listed templates.includeNonDownloadableFilesIf true, include files that are not downloadable, i.e. Google Docs.
Return Value
Through the response callback, the caller will receive a
DBFILESListFolderResultobject on success or aDBFILESListFolderErrorobject on failure. - 
                  
                  
Once a cursor has been retrieved from
listFolder, use this to paginate through all files and retrieve updates to the folder, following the same rules as documented forlistFolder.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILESListFolderResult *, DBFILESListFolderContinueError *> *)listFolderContinue: (nonnull NSString *)cursor;Swift
func listFolderContinue(_ cursor: String) -> DBRpcTask<DBFILESListFolderResult, DBFILESListFolderContinueError>Parameters
cursorThe cursor returned by your last call to
listFolderorlistFolderContinue.Return Value
Through the response callback, the caller will receive a
DBFILESListFolderResultobject on success or aDBFILESListFolderContinueErrorobject on failure. 
View on GitHub
        DBFILESAppAuthRoutes Class Reference