DBTransportBaseConfig

Objective-C

@interface DBTransportBaseConfig : NSObject

Swift

class DBTransportBaseConfig : NSObject

Configuration class for DBTransportBaseClient.

  • The consumer app key associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints the have “app auth” authentication type.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *appKey;

    Swift

    var appKey: String? { get }
  • The consumer app secret associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints the have “app auth” authentication type.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *appSecret;

    Swift

    var appSecret: String? { get }
  • The hostname configuration used for various networking requests.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) DBTransportBaseHostnameConfig *hostnameConfig;

    Swift

    @NSCopying var hostnameConfig: DBTransportBaseHostnameConfig? { get }
  • The redirect url used for oauth flow

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *redirectURL;

    Swift

    var redirectURL: String? { get }
  • The user agent associated with all networking requests. Used for server logging.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *userAgent;

    Swift

    var userAgent: String? { get }
  • An additional authentication header field used when a team app with the appropriate permissions “performs” user API actions on behalf of a team member.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *asMemberId;

    Swift

    var asMemberId: String? { get }
  • The value of path root object which will be used as Dropbox-Api-Path-Root header.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) DBCOMMONPathRoot *pathRoot;

    Swift

    @NSCopying var pathRoot: DBCOMMONPathRoot? { get }
  • Additional HTTP headers to be injected into each client request.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSDictionary<NSString *, NSString *> *additionalHeaders;

    Swift

    var additionalHeaders: [String : String]? { get }
  • Declaration

    Objective-C

    + (nonnull NSString *)defaultUserAgent;

    Swift

    class func defaultUserAgent() -> String

    Return Value

    A default user agent string.

  • Convenience constructor.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithAppKey:(nullable NSString *)appKey
                                 userAgent:(nullable NSString *)userAgent;

    Swift

    init(appKey: String?, userAgent: String?)

    Parameters

    appKey

    The consumer app key associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints the have “app auth” authentication type.

    userAgent

    The user agent associated with all networking requests. Used for server logging.

    Return Value

    An initialized instance.

  • Convenience constructor.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithAppKey:(nullable NSString *)appKey
                                 appSecret:(nullable NSString *)appSecret
                                 userAgent:(nullable NSString *)userAgent;

    Swift

    init(appKey: String?, appSecret: String?, userAgent: String?)

    Parameters

    appKey

    The consumer app key associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints the have “app auth” authentication type.

    appSecret

    The consumer app secret associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints the have “app auth” authentication type.

    userAgent

    The user agent associated with all networking requests. Used for server logging.

    Return Value

    An initialized instance.

  • Convenience constructor.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithAppKey:(nullable NSString *)appKey
                                 appSecret:(nullable NSString *)appSecret
                                 userAgent:(nullable NSString *)userAgent
                            hostnameConfig:(nonnull DBTransportBaseHostnameConfig *)
                                               hostnameConfig;

    Swift

    init(appKey: String?, appSecret: String?, userAgent: String?, hostnameConfig: DBTransportBaseHostnameConfig)

    Parameters

    appKey

    The consumer app key associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints the have “app auth” authentication type.

    appSecret

    The consumer app secret associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints the have “app auth” authentication type.

    userAgent

    The user agent associated with all networking requests. Used for server logging.

    hostnameConfig

    A set of custom hostnames to use for networking requests.

    Return Value

    An initialized instance.

  • Convenience constructor.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithAppKey:(nullable NSString *)appKey
                                 appSecret:(nullable NSString *)appSecret
                                 userAgent:(nullable NSString *)userAgent
                                asMemberId:(nullable NSString *)asMemberId;

    Swift

    init(appKey: String?, appSecret: String?, userAgent: String?, asMemberId: String?)

    Parameters

    appKey

    The consumer app key associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints the have “app auth” authentication type.

    appSecret

    The consumer app secret associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints the have “app auth” authentication type.

    userAgent

    The user agent associated with all networking requests. Used for server logging.

    asMemberId

    An additional authentication header field used when a team app with the appropriate permissions “performs” user API actions on behalf of a team member.

    Return Value

    An initialized instance.

  • Full constructor.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithAppKey:(nullable NSString *)appKey
                                 appSecret:(nullable NSString *)appSecret
                                 userAgent:(nullable NSString *)userAgent
                                asMemberId:(nullable NSString *)asMemberId
                         additionalHeaders:
                             (nullable NSDictionary<NSString *, NSString *> *)
                                 additionalHeaders;

    Swift

    init(appKey: String?, appSecret: String?, userAgent: String?, asMemberId: String?, additionalHeaders: [String : String]?)

    Parameters

    appKey

    The consumer app key associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints the have “app auth” authentication type.

    appSecret

    The consumer app secret associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints the have “app auth” authentication type.

    userAgent

    The user agent associated with all networking requests. Used for server logging.

    asMemberId

    An additional authentication header field used when a team app with the appropriate permissions “performs” user API actions on behalf of a team member.

    additionalHeaders

    Additional HTTP headers to be injected into each client request.

    Return Value

    An initialized instance.

  • Full constructor, with debug hostname override.

    Declaration

    Objective-C

    - (nonnull instancetype)
           initWithAppKey:(nullable NSString *)appKey
                appSecret:(nullable NSString *)appSecret
           hostnameConfig:(nullable DBTransportBaseHostnameConfig *)hostnameConfig
                userAgent:(nullable NSString *)userAgent
               asMemberId:(nullable NSString *)asMemberId
        additionalHeaders:
            (nullable NSDictionary<NSString *, NSString *> *)additionalHeaders;

    Swift

    init(appKey: String?, appSecret: String?, hostnameConfig: DBTransportBaseHostnameConfig?, userAgent: String?, asMemberId: String?, additionalHeaders: [String : String]?)

    Parameters

    appKey

    The consumer app key associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints the have “app auth” authentication type.

    appSecret

    The consumer app secret associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints the have “app auth” authentication type.

    hostnameConfig

    A set of custom hostnames to use for networking requests. Only useful for debugging purposes.

    userAgent

    The user agent associated with all networking requests. Used for server logging.

    asMemberId

    An additional authentication header field used when a team app with the appropriate permissions “performs” user API actions on behalf of a team member.

    additionalHeaders

    Additional HTTP headers to be injected into each client request.

    Return Value

    An initialized instance.

  • Full constructor, with debug hostname and redirectURL override.

    Declaration

    Objective-C

    - (nonnull instancetype)
           initWithAppKey:(nullable NSString *)appKey
                appSecret:(nullable NSString *)appSecret
           hostnameConfig:(nullable DBTransportBaseHostnameConfig *)hostnameConfig
              redirectURL:(nullable NSString *)redirectURL
                userAgent:(nullable NSString *)userAgent
               asMemberId:(nullable NSString *)asMemberId
                 pathRoot:(nullable DBCOMMONPathRoot *)pathRoot
        additionalHeaders:
            (nullable NSDictionary<NSString *, NSString *> *)additionalHeaders;

    Swift

    init(appKey: String?, appSecret: String?, hostnameConfig: DBTransportBaseHostnameConfig?, redirectURL: String?, userAgent: String?, asMemberId: String?, pathRoot: DBCOMMONPathRoot?, additionalHeaders: [String : String]?)

    Parameters

    appKey

    The consumer app key associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints the have “app auth” authentication type.

    appSecret

    The consumer app secret associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints the have “app auth” authentication type.

    hostnameConfig

    A set of custom hostnames to use for networking requests. Only useful for debugging purposes.

    redirectURL

    The redirect url used for oauth flow.

    userAgent

    The user agent associated with all networking requests. Used for server logging.

    asMemberId

    An additional authentication header field used when a team app with the appropriate permissions “performs” user API actions on behalf of a team member.

    pathRoot

    The value of path root object which will be used as Dropbox-Api-Path-Root header.

    additionalHeaders

    Additional HTTP headers to be injected into each client request.

    Return Value

    An initialized instance.