Other Type Aliases

The following type aliases are available globally.

  • A handler for BrowseIterator.

    Declaration

    Swift

    public typealias BrowseIteratorHandler = (_ iterator: BrowseIterator, _ content: [String : Any]?, _ error: Error?) -> Void

    Parameters

    iterator

    The browse iterator involved. May be used to cancel the iteration.

    content

    The content returned by the server, in case of success.

    error

    The error that was encountered, in case of failure.

  • A JSON object.

    Declaration

    Swift

    @available(*, deprecated, message: "Use [String: Any] instead")
    public typealias JSONObject = [String : Any]
  • Signature of most completion handlers used by this library.

    Note

    content and error are mutually exclusive: only one will be non-nil.

    Declaration

    Swift

    public typealias CompletionHandler = (_ content: [String : Any]?, _ error: Error?) -> Void

    Parameters

    content

    The JSON response (in case of success) or nil (in case of error).

    error

    The encountered error (in case of error) or nil (in case of success).