AdvertiseEvent

public class AdvertiseEvent : CommunicationEvent<AdvertiseEventData>

AdvertiseEvent provides a generic implementation for advertising CoatyObjects.

Static Factory Methods.

  • Create an AdvertiseEvent with an object and optional privateData.

    The object type of the given object must be a non-empty string that does not contain the following characters: NULL (U+0000), # (U+0023), + (U+002B), / (U+002F).

    Throws

    if object type of given object is invalid

    Declaration

    Swift

    public static func with(object: CoatyObject,
    
                            privateData: [String: Any]? = nil) throws -> AdvertiseEvent

    Parameters

    object

    The object to be advertised

    privateData

    Associated private data to be published (optional).

    Return Value

    an Advertise event with the given parameters

Codable methods.

  • Undocumented

    Declaration

    Swift

    required public init(from decoder: Decoder) throws
  • Undocumented

    Declaration

    Swift

    override public func encode(to encoder: Encoder) throws