MessagesAPI

public enum MessagesAPI

Caseless enumeration with static methods to send Messages Requests.

  • Sends a request to get messages from the API.

    Declaration

    Swift

    public static func getMessages(with parameters: Parameters? = nil,
                                   completion: ResponseCompletion<[Message]> = nil)

    Parameters

    parameters

    The Parameters to apply. A commonly used parameter keys for events list is:

    completion

    The closure to be executed once the request has finished.

  • Sends a request to track a specific message.

    Declaration

    Swift

    public static func trackMessage(id: String,
                                    action: MessagesRequest.TrackAction = .opened,
                                    completion: ResponseCompletion<Bool> = nil)

    Parameters

    id

    ID of the message that will be tracked.

    completion

    The closure to be executed once the request has finished.

  • Sends a request to dismiss a specific message.

    Declaration

    Swift

    public static func dismissMessage(id: String,
                                      completion: ResponseCompletion<Bool> = nil)

    Parameters

    id

    ID of the message that will be dismissed.

    completion

    The closure to be executed once the request has finished.