UnbluApiConfiguration

@objc
public class UnbluApiConfiguration : NSObject

Configuration for the unblu api. Changes to an instance are not considered after the configuration was already given to the UnbluApi#configureApi call. There is a base configuration which needs to be given when constructing it. All other configurations are optional

  • Constructs a api configuration

    Declaration

    Swift

    public init(unbluBaseUrl: String, apiKey: String)

    Parameters

    unbluBaseUrl

    The url to the unblu server. (full URL: http(s)://domain:port)

    apiKey

    Your unblu API key (can be retrieved / created on the unblu agent desk.)

  • Changes the base url inside the configuration to the given value

    Declaration

    Swift

    public func setUnbluBaseUrl(_ unbluBaseUrl: String) -> UnbluApiConfiguration

    Parameters

    unbluBaseUrl

    The url to the unblu server. (full URL: http(s)://domain:port)

    Return Value

    The configuration to chain multiple calls

  • Returns the currently configured base url

    Declaration

    Swift

    public func getUnbluBaseUrl() -> String

    Return Value

    The currently configured base url

  • Changes the api key inside the configuration to the given value

    Declaration

    Swift

    public func setApiKey(_ apiKey: String) -> UnbluApiConfiguration

    Parameters

    apiKey

    Your unblu API key (can be retrieved / created on the unblu agent desk.)

    Return Value

    The configuration to chain multiple calls

  • Returns the currently configured api key

    Declaration

    Swift

    public func getApiKey() -> String

    Return Value

    The currently configured api key

  • Sets the entry path inside self configuration to the given value. Default is /unblu. Do not miss the leading slash!

    Declaration

    Swift

    public func setEntryPath(_ entryPath: String) -> UnbluApiConfiguration

    Parameters

    entryPath

    The entry path used to connect to the unblu server. Typicall value is /unblu or /co-unblu.

    Return Value

    The configuration to chain multiple calls

  • Returns the currently configured entry path

    Declaration

    Swift

    public func getEntryPath() -> String

    Return Value

    The currently configured entry path

  • Enables/disables if the ui should be preloaded, after the unblu api was initialized once.

    Declaration

    Swift

    public func setPreloadUiAfterApiInitEnabled(_ preloadUiAfterApiInitEnabled: Bool) -> UnbluApiConfiguration

    Parameters

    preloadUiAfterApiInitEnabled

    If set to true, the ui will be pre loaded after the api was initialized successfully. Otherwise the ui will be loaded, when it is requested. If you want to do a pre load of the ui manually, use UnbluApi#preloadUi

    Return Value

    The configuration to chain multiple calls

  • Returns true if currently the pre loading of the ui is enabled

    Declaration

    Swift

    public func isPreloadUiAfterApiInitEnabled() -> Bool

    Return Value

    True if currently the pre loading of the ui is enabled

  • Configures a set of cookies which will be set on the configured base url. It will store only a copy of the given map.

    Declaration

    Swift

    public func setCustomCookies(_ customCookies: [String : String]) -> UnbluApiConfiguration

    Parameters

    customCookies

    The cookies which will later be used on the configured base url

    Return Value

    The configuration to chain multiple calls

  • Returns a copy of the currently configured custom cookies, if they were ever configured.

    Declaration

    Swift

    public func getCustomCookies() -> [String : String]?

    Return Value

    A dictionary of the currently configured custom cookies.

  • Sets the named area for which the configuration is loaded as soon as the api is initializing. When sessions are started and are put into the queue on the agent desk, they can be filtered by the defined named area. The named area must be configured inside the agent desk.

    Declaration

    Swift

    public func setNamedArea(_ namedArea: String?) -> UnbluApiConfiguration

    Parameters

    namedArea

    The named area meta tag id configured in the agent desk.

    Return Value

    The configuration to chain multiple calls.

  • Returns the currently configured named area.

    Declaration

    Swift

    public func getNamedArea() -> String?

    Return Value

    The currently configured named area.

  • Returns the currently state if notifications are enabled or not

    Declaration

    Swift

    public func isNotificationsEnabled() -> Bool

    Return Value

    The currently state if notifications are enabled or not

  • Configures if notifications via unblu are enabled or not

    Declaration

    Swift

    public func setNotificationsEnabled(_ notificationsEnabled: Bool) -> UnbluApiConfiguration

    Parameters

    notificationsEnabled

    if true, notifications are enabled. Otherwise they are disabled

    Return Value

    The configuration to chain multiple calls

  • Configures the api to use the following login credentials when starting the api. The username and password should match a user which exists on the unblu collaboration server. If either username or password is nil, the login information are not used.

    Declaration

    Swift

    public func setLoginInformation(_ username: String?, _ password: String?) -> UnbluApiConfiguration

    Parameters

    username

    The username which should be used to login

    password

    The password which should be used to login

    Return Value

    The configuration to chain multiple calls

  • Returns the username which is used to login agains the unblu collaboration server.

    Declaration

    Swift

    public func getLoginUsername() -> String?

    Return Value

    The username used for the login

  • Returns the password which is used to login agains the unblu collaboration server.

    Declaration

    Swift

    public func getLoginPassword() -> String?

    Return Value

    The password used for the login