DBTransportBaseHostnameConfig

Objective-C

@interface DBTransportBaseHostnameConfig : NSObject

Swift

class DBTransportBaseHostnameConfig : NSObject

Configuration class that defines the different hostnames that the Dropbox SDK uses

  • Default constructor.

    Declaration

    Objective-C

    - (nonnull instancetype)init;

    Swift

    init()

    Return Value

    An initialized instance of hostname configurations with default values set for all hostnames

  • Constructor that takes in a set of custom hostnames to use for api calls.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithMeta:(nonnull NSString *)meta
                                     api:(nonnull NSString *)api
                                 content:(nonnull NSString *)content
                                  notify:(nonnull NSString *)notify;

    Swift

    init(meta: String, api: String, content: String, notify: String)

    Parameters

    meta

    the hostname to metaserver

    api

    the hostname to api server

    content

    the hostname to content server

    notify

    the hostname to notify server

    Return Value

    An initialized instance with the provided hostname configuration

  • Returns the prefix to use for API calls to the given route type.

    Declaration

    Objective-C

    - (nullable NSString *)apiV2PrefixWithRoute:(nonnull DBRoute *)route;

    Swift

    func apiV2Prefix(with route: DBRoute) -> String?

    Parameters

    route

    the type of route to get a prefix for. Currently the valid hosts are: “api”, “content”, and “notify”.

    Return Value

    An absolute URL prefix, typically “https:///2” or nil if an invalid route type is provided.