DBFILEPROPERTIESTeamAuthRoutes
Objective-C
@interface DBFILEPROPERTIESTeamAuthRoutes : NSObject
Swift
class DBFILEPROPERTIESTeamAuthRoutes : 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
DBFILEPROPERTIESTeamAuthRoutes
namespace container object with a networking client.Declaration
Objective-C
- (nonnull instancetype)init:(nonnull id<DBTransportClient>)client;
-
Add a template associated with a team. See
propertiesAdd
to add properties to a file or folder. Note: this endpoint will create team-owned templates.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESAddTemplateResult *, DBFILEPROPERTIESModifyTemplateError *> *) templatesAddForTeam:(nonnull NSString *)name description_:(nonnull NSString *)description_ fields: (nonnull NSArray<DBFILEPROPERTIESPropertyFieldTemplate *> *)fields;
Swift
func templatesAdd(forTeam name: String, description_: String, fields: [DBFILEPROPERTIESPropertyFieldTemplate]) -> DBRpcTask<DBFILEPROPERTIESAddTemplateResult, DBFILEPROPERTIESModifyTemplateError>
Return Value
Through the response callback, the caller will receive a
DBFILEPROPERTIESAddTemplateResult
object on success or aDBFILEPROPERTIESModifyTemplateError
object on failure. -
Get the schema for a specified template.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESGetTemplateResult *, DBFILEPROPERTIESTemplateError *> *)templatesGetForTeam: (nonnull NSString *)templateId;
Swift
func templatesGet(forTeam templateId: String) -> DBRpcTask<DBFILEPROPERTIESGetTemplateResult, DBFILEPROPERTIESTemplateError>
Parameters
templateId
An identifier for template added by route See
templatesAddForUser
ortemplatesAddForTeam
.Return Value
Through the response callback, the caller will receive a
DBFILEPROPERTIESGetTemplateResult
object on success or aDBFILEPROPERTIESTemplateError
object on failure. -
Get the template identifiers for a team. To get the schema of each template use
templatesGetForTeam
.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESListTemplateResult *, DBFILEPROPERTIESTemplateError *> *)templatesListForTeam;
Swift
func templatesListForTeam() -> DBRpcTask<DBFILEPROPERTIESListTemplateResult, DBFILEPROPERTIESTemplateError>
Return Value
Through the response callback, the caller will receive a
DBFILEPROPERTIESListTemplateResult
object on success or aDBFILEPROPERTIESTemplateError
object 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 *> *) templatesRemoveForTeam:(nonnull NSString *)templateId;
Swift
func templatesRemove(forTeam templateId: String) -> DBRpcTask<DBNilObject, DBFILEPROPERTIESTemplateError>
Parameters
templateId
An identifier for a template created by
templatesAddForUser
ortemplatesAddForTeam
.Return Value
Through the response callback, the caller will receive a
void
object on success or aDBFILEPROPERTIESTemplateError
object on failure. -
Update a template associated with a team. This route can update the template name, the template description and add optional properties to templates.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESUpdateTemplateResult *, DBFILEPROPERTIESModifyTemplateError *> *) templatesUpdateForTeam:(nonnull NSString *)templateId;
Swift
func templatesUpdate(forTeam templateId: String) -> DBRpcTask<DBFILEPROPERTIESUpdateTemplateResult, DBFILEPROPERTIESModifyTemplateError>
Parameters
templateId
An identifier for template added by See
templatesAddForUser
ortemplatesAddForTeam
.Return Value
Through the response callback, the caller will receive a
DBFILEPROPERTIESUpdateTemplateResult
object on success or aDBFILEPROPERTIESModifyTemplateError
object on failure. -
Update a template associated with a team. This route can update the template name, the template description and add optional properties to templates.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESUpdateTemplateResult *, DBFILEPROPERTIESModifyTemplateError *> *) templatesUpdateForTeam:(nonnull NSString *)templateId name:(nullable NSString *)name description_:(nullable NSString *)description_ addFields: (nullable NSArray<DBFILEPROPERTIESPropertyFieldTemplate *> *)addFields;
Swift
func templatesUpdate(forTeam templateId: String, name: String?, description_: String?, addFields: [DBFILEPROPERTIESPropertyFieldTemplate]?) -> DBRpcTask<DBFILEPROPERTIESUpdateTemplateResult, DBFILEPROPERTIESModifyTemplateError>
Parameters
templateId
An identifier for template added by See
templatesAddForUser
ortemplatesAddForTeam
.name
A 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.
addFields
Property 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
DBFILEPROPERTIESUpdateTemplateResult
object on success or aDBFILEPROPERTIESModifyTemplateError
object on failure.