Context

public struct Context : HADataDecodable

The context of the event

  • id

    The identifier for this event

    Declaration

    Swift

    public var id: String
  • The user id which triggered the event, if there was one

    Declaration

    Swift

    public var userId: String?
  • The identifier of the parent event for this event

    Declaration

    Swift

    public var parentId: String?
  • Create with data

    Throws

    If any required keys are missing

    Declaration

    Swift

    public init(data: HAData) throws

    Parameters

    data

    The data from the server

  • Create with information

    Declaration

    Swift

    public init(
        id: String,
        userId: String?,
        parentId: String?
    )

    Parameters

    id

    The id of the event

    userId

    The user id of the event

    parentId

    The parent id of the event