DBFILEPROPERTIESUserAuthRoutes
Objective-C
@interface DBFILEPROPERTIESUserAuthRoutes : NSObject
Swift
class DBFILEPROPERTIESUserAuthRoutes : NSObject
Routes for the FileProperties 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
DBFILEPROPERTIESUserAuthRoutesnamespace container object with a networking client.Declaration
Objective-C
- (nonnull instancetype)init:(nonnull id<DBTransportClient>)client; -
Add property groups to a Dropbox file. See
templatesAddForUserortemplatesAddForTeamto create new templates.Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBFILEPROPERTIESAddPropertiesError *> *) propertiesAdd:(nonnull NSString *)path propertyGroups: (nonnull NSArray<DBFILEPROPERTIESPropertyGroup *> *)propertyGroups;Swift
func propertiesAdd(_ path: String, propertyGroups: [DBFILEPROPERTIESPropertyGroup]) -> DBRpcTask<DBNilObject, DBFILEPROPERTIESAddPropertiesError>Parameters
pathA unique identifier for the file or folder.
propertyGroupsThe property groups which are to be added to a Dropbox file. No two groups in the input should refer to the same template.
Return Value
Through the response callback, the caller will receive a
voidobject on success or aDBFILEPROPERTIESAddPropertiesErrorobject on failure. -
Overwrite property groups associated with a file. This endpoint should be used instead of
propertiesUpdatewhen property groups are being updated via a “snapshot” instead of via a “delta”. In other words, this endpoint will delete all omitted fields from a property group, whereaspropertiesUpdatewill only delete fields that are explicitly marked for deletion.Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBFILEPROPERTIESInvalidPropertyGroupError *> *)propertiesOverwrite:(nonnull NSString *)path propertyGroups: (nonnull NSArray<DBFILEPROPERTIESPropertyGroup *> *) propertyGroups;Swift
func propertiesOverwrite(_ path: String, propertyGroups: [DBFILEPROPERTIESPropertyGroup]) -> DBRpcTask<DBNilObject, DBFILEPROPERTIESInvalidPropertyGroupError>Parameters
pathA unique identifier for the file or folder.
propertyGroupsThe property groups “snapshot” updates to force apply. No two groups in the input should refer to the same template.
Return Value
Through the response callback, the caller will receive a
voidobject on success or aDBFILEPROPERTIESInvalidPropertyGroupErrorobject on failure. -
Permanently removes the specified property group from the file. To remove specific property field key value pairs, see
propertiesUpdate. To update a template, seetemplatesUpdateForUserortemplatesUpdateForTeam. To remove a template, seetemplatesRemoveForUserortemplatesRemoveForTeam.Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBFILEPROPERTIESRemovePropertiesError *> *) propertiesRemove:(nonnull NSString *)path propertyTemplateIds:(nonnull NSArray<NSString *> *)propertyTemplateIds;Swift
func propertiesRemove(_ path: String, propertyTemplateIds: [String]) -> DBRpcTask<DBNilObject, DBFILEPROPERTIESRemovePropertiesError>Parameters
pathA unique identifier for the file or folder.
propertyTemplateIdsA list of identifiers for a template created by
templatesAddForUserortemplatesAddForTeam.Return Value
Through the response callback, the caller will receive a
voidobject on success or aDBFILEPROPERTIESRemovePropertiesErrorobject on failure. -
Search across property templates for particular property field values.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESPropertiesSearchResult *, DBFILEPROPERTIESPropertiesSearchError *> *) propertiesSearch: (nonnull NSArray<DBFILEPROPERTIESPropertiesSearchQuery *> *)queries;Swift
func propertiesSearch(_ queries: [DBFILEPROPERTIESPropertiesSearchQuery]) -> DBRpcTask<DBFILEPROPERTIESPropertiesSearchResult, DBFILEPROPERTIESPropertiesSearchError>Parameters
queriesQueries to search.
Return Value
Through the response callback, the caller will receive a
DBFILEPROPERTIESPropertiesSearchResultobject on success or aDBFILEPROPERTIESPropertiesSearchErrorobject on failure. -
Search across property templates for particular property field values.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESPropertiesSearchResult *, DBFILEPROPERTIESPropertiesSearchError *> *) propertiesSearch: (nonnull NSArray<DBFILEPROPERTIESPropertiesSearchQuery *> *)queries templateFilter:(nullable DBFILEPROPERTIESTemplateFilter *)templateFilter;Swift
func propertiesSearch(_ queries: [DBFILEPROPERTIESPropertiesSearchQuery], templateFilter: DBFILEPROPERTIESTemplateFilter?) -> DBRpcTask<DBFILEPROPERTIESPropertiesSearchResult, DBFILEPROPERTIESPropertiesSearchError>Parameters
queriesQueries to search.
templateFilterFilter results to contain only properties associated with these template IDs.
Return Value
Through the response callback, the caller will receive a
DBFILEPROPERTIESPropertiesSearchResultobject on success or aDBFILEPROPERTIESPropertiesSearchErrorobject on failure. -
Once a cursor has been retrieved from
propertiesSearch, use this to paginate through all search results.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESPropertiesSearchResult *, DBFILEPROPERTIESPropertiesSearchContinueError *> *) propertiesSearchContinue:(nonnull NSString *)cursor;Swift
func propertiesSearchContinue(_ cursor: String) -> DBRpcTask<DBFILEPROPERTIESPropertiesSearchResult, DBFILEPROPERTIESPropertiesSearchContinueError>Parameters
cursorThe cursor returned by your last call to
propertiesSearchorpropertiesSearchContinue.Return Value
Through the response callback, the caller will receive a
DBFILEPROPERTIESPropertiesSearchResultobject on success or aDBFILEPROPERTIESPropertiesSearchContinueErrorobject on failure. -
Add, update or remove properties associated with the supplied file and templates. This endpoint should be used instead of
propertiesOverwritewhen property groups are being updated via a “delta” instead of via a “snapshot” . In other words, this endpoint will not delete any omitted fields from a property group, whereaspropertiesOverwritewill delete any fields that are omitted from a property group.Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBFILEPROPERTIESUpdatePropertiesError *> *) propertiesUpdate:(nonnull NSString *)path updatePropertyGroups: (nonnull NSArray<DBFILEPROPERTIESPropertyGroupUpdate *> *) updatePropertyGroups;Swift
func propertiesUpdate(_ path: String, updatePropertyGroups: [DBFILEPROPERTIESPropertyGroupUpdate]) -> DBRpcTask<DBNilObject, DBFILEPROPERTIESUpdatePropertiesError>Parameters
pathA unique identifier for the file or folder.
updatePropertyGroupsThe property groups “delta” updates to apply.
Return Value
Through the response callback, the caller will receive a
voidobject on success or aDBFILEPROPERTIESUpdatePropertiesErrorobject on failure. -
Add a template associated with a user. See
propertiesAddto add properties to a file. This endpoint can’t be called on a team member or admin’s behalf.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESAddTemplateResult *, DBFILEPROPERTIESModifyTemplateError *> *) templatesAddForUser:(nonnull NSString *)name description_:(nonnull NSString *)description_ fields: (nonnull NSArray<DBFILEPROPERTIESPropertyFieldTemplate *> *)fields;Swift
func templatesAdd(forUser name: String, description_: String, fields: [DBFILEPROPERTIESPropertyFieldTemplate]) -> DBRpcTask<DBFILEPROPERTIESAddTemplateResult, DBFILEPROPERTIESModifyTemplateError>Return Value
Through the response callback, the caller will receive a
DBFILEPROPERTIESAddTemplateResultobject on success or aDBFILEPROPERTIESModifyTemplateErrorobject on failure. -
Get the schema for a specified template. This endpoint can’t be called on a team member or admin’s behalf.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESGetTemplateResult *, DBFILEPROPERTIESTemplateError *> *)templatesGetForUser: (nonnull NSString *)templateId;Swift
func templatesGet(forUser templateId: String) -> DBRpcTask<DBFILEPROPERTIESGetTemplateResult, DBFILEPROPERTIESTemplateError>Parameters
templateIdAn identifier for template added by route See
templatesAddForUserortemplatesAddForTeam.Return Value
Through the response callback, the caller will receive a
DBFILEPROPERTIESGetTemplateResultobject on success or aDBFILEPROPERTIESTemplateErrorobject on failure. -
Get the template identifiers for a team. To get the schema of each template use
templatesGetForUser. This endpoint can’t be called on a team member or admin’s behalf.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESListTemplateResult *, DBFILEPROPERTIESTemplateError *> *)templatesListForUser;Swift
func templatesListForUser() -> DBRpcTask<DBFILEPROPERTIESListTemplateResult, DBFILEPROPERTIESTemplateError>Return Value
Through the response callback, the caller will receive a
DBFILEPROPERTIESListTemplateResultobject on success or aDBFILEPROPERTIESTemplateErrorobject on failure. -
Permanently removes the specified template created from
templatesAddForUser. All properties associated with the template will also be removed. This action cannot be undone.Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBFILEPROPERTIESTemplateError *> *) templatesRemoveForUser:(nonnull NSString *)templateId;Swift
func templatesRemove(forUser templateId: String) -> DBRpcTask<DBNilObject, DBFILEPROPERTIESTemplateError>Parameters
templateIdAn identifier for a template created by
templatesAddForUserortemplatesAddForTeam.Return Value
Through the response callback, the caller will receive a
voidobject on success or aDBFILEPROPERTIESTemplateErrorobject on failure. -
Update a template associated with a user. This route can update the template name, the template description and add optional properties to templates. This endpoint can’t be called on a team member or admin’s behalf.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESUpdateTemplateResult *, DBFILEPROPERTIESModifyTemplateError *> *) templatesUpdateForUser:(nonnull NSString *)templateId;Swift
func templatesUpdate(forUser templateId: String) -> DBRpcTask<DBFILEPROPERTIESUpdateTemplateResult, DBFILEPROPERTIESModifyTemplateError>Parameters
templateIdAn identifier for template added by See
templatesAddForUserortemplatesAddForTeam.Return Value
Through the response callback, the caller will receive a
DBFILEPROPERTIESUpdateTemplateResultobject on success or aDBFILEPROPERTIESModifyTemplateErrorobject on failure. -
Update a template associated with a user. This route can update the template name, the template description and add optional properties to templates. This endpoint can’t be called on a team member or admin’s behalf.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESUpdateTemplateResult *, DBFILEPROPERTIESModifyTemplateError *> *) templatesUpdateForUser:(nonnull NSString *)templateId name:(nullable NSString *)name description_:(nullable NSString *)description_ addFields: (nullable NSArray<DBFILEPROPERTIESPropertyFieldTemplate *> *)addFields;Swift
func templatesUpdate(forUser templateId: String, name: String?, description_: String?, addFields: [DBFILEPROPERTIESPropertyFieldTemplate]?) -> DBRpcTask<DBFILEPROPERTIESUpdateTemplateResult, DBFILEPROPERTIESModifyTemplateError>Parameters
templateIdAn identifier for template added by See
templatesAddForUserortemplatesAddForTeam.nameA display name for the template. template names can be up to 256 bytes.
description_Description for the new template. Template descriptions can be up to 1024 bytes.
addFieldsProperty field templates to be added to the group template. There can be up to 32 properties in a single template.
Return Value
Through the response callback, the caller will receive a
DBFILEPROPERTIESUpdateTemplateResultobject on success or aDBFILEPROPERTIESModifyTemplateErrorobject on failure.
View on GitHub
DBFILEPROPERTIESUserAuthRoutes Class Reference