DALIConfig

open class DALIConfig

Configurations for the DALIapi framework can be stored and handled using this

Example usage:

let file = NSDictionary(dictionary: [
    "server_url": "https://dalilab-api.herokuapp.com/"
])
let config = DALIConfig(dict: file)
DALIapi.configure(config: config)
  • A default value for the sharing preference

    Declaration

    Swift

    public var sharingDefault: Bool
  • Allows to enable or disable the use of sockets

    Declaration

    Swift

    public var enableSockets: Bool { get set }
  • Enables automatic connecting and disconnecting of sockets when going between forground and background

    Declaration

    Swift

    public var socketAutoSwitching: Bool
  • Undocumented

    Declaration

    Swift

    public var forceWebsockets: Bool
  • Creates a DALIConfig object

    Declaration

    Swift

    public convenience init(dict: NSDictionary)

    Parameters

    dict

    A dictionary containing server_url

  • Initializes the configuration with a server url and an API key

    Declaration

    Swift

    public init(serverURL: String, apiKey: String? = nil, enableSockets: Bool? = true)

    Parameters

    serverURL

    The base URL for the server to use

    apiKey

    The key to use to authenticate requests

    enableSockets

    Allows sockets to be used