Protocols

The following protocols are available globally.

  • A cache key for HACachesContainer

    See more

    Declaration

    Swift

    public protocol HACacheKey
  • A type which can be decoded using our data type

    Note

    This differs from Decodable intentionally; Decodable does not support Any types or JSON well when the results are extremely dynamic. This limitation requires that we do it ourselves.
    See more

    Declaration

    Swift

    public protocol HADataDecodable : HADecodeTransformable
  • Decode a value by massagging into another type

    For example, this allows decoding a Date from a String without having to do intermediate casting in calling code.

    See more

    Declaration

    Swift

    public protocol HADecodeTransformable
  • Delegate of the connection

    See more

    Declaration

    Swift

    public protocol HAConnectionDelegate : AnyObject
  • The interface for the API itself

    See also

    HAKit for how to create an instance
    See more

    Declaration

    Swift

    public protocol HAConnection : AnyObject
  • A token representing an individual request or subscription

    You do not need to strongly retain this value. Requests are only cancelled explicitly.

    See more

    Declaration

    Swift

    public protocol HACancellable