ARTRestAnnotationsProtocol

Objective-C

@protocol ARTRestAnnotationsProtocol

Swift

protocol ARTRestAnnotationsProtocol

The protocol upon which the ARTRestAnnotations is implemented.

  • Publish a new annotation for a message.

    Declaration

    Objective-C

    - (void)publishForMessage:(nonnull ARTMessage *)message
                   annotation:(nonnull ARTOutboundAnnotation *)annotation
                     callback:(nullable ARTCallback)callback;

    Swift

    func publish(for message: ARTMessage, annotation: ARTOutboundAnnotation, callback: ARTCallback? = nil)

    Parameters

    message

    The message to annotate.

    annotation

    The annotation to publish. (Must include at least the type. Assumed to be an annotation.create if no action is specified)

    callback

    A success or failure callback function.

  • Publish a new annotation for a message using its serial.

    Declaration

    Objective-C

    - (void)publishForMessageSerial:(nonnull NSString *)messageSerial
                         annotation:(nonnull ARTOutboundAnnotation *)annotation
                           callback:(nullable ARTCallback)callback;

    Swift

    func publish(forMessageSerial messageSerial: String, annotation: ARTOutboundAnnotation, callback: ARTCallback? = nil)

    Parameters

    messageSerial

    The serial field of the message to annotate.

    annotation

    The annotation to publish. (Must include at least the type. Assumed to be an annotation.create if no action is specified)

    callback

    A success or failure callback function.

  • Delete an annotation for a message.

    Declaration

    Objective-C

    - (void)deleteForMessage:(nonnull ARTMessage *)message
                  annotation:(nonnull ARTOutboundAnnotation *)annotation
                    callback:(nullable ARTCallback)callback;

    Swift

    func delete(for message: ARTMessage, annotation: ARTOutboundAnnotation, callback: ARTCallback? = nil)

    Parameters

    message

    The message to remove the annotation from.

    annotation

    The annotation to delete. (Must include at least the type.)

    callback

    A success or failure callback function.

  • Delete an annotation for a message using its serial.

    Declaration

    Objective-C

    - (void)deleteForMessageSerial:(nonnull NSString *)messageSerial
                        annotation:(nonnull ARTOutboundAnnotation *)annotation
                          callback:(nullable ARTCallback)callback;

    Swift

    func delete(forMessageSerial messageSerial: String, annotation: ARTOutboundAnnotation, callback: ARTCallback? = nil)

    Parameters

    messageSerial

    The serial field of the message to remove the annotation from.

    annotation

    The annotation to delete. (Must include at least the type.)

    callback

    A success or failure callback function.

  • Get all annotations for a given message (as a paginated result).

    Declaration

    Objective-C

    - (void)getForMessage:(nonnull ARTMessage *)message
                    query:(nonnull ARTAnnotationsQuery *)query
                 callback:(nonnull ARTPaginatedAnnotationsCallback)callback;

    Swift

    func getFor(_ message: ARTMessage, query: ARTAnnotationsQuery, callback: @escaping ARTPaginatedAnnotationsCallback)

    Parameters

    message

    The message to get annotations for.

    query

    Restrictions on which annotations to get (such as a limit on the size of the result page).

    callback

    A callback for retriving an ARTPaginatedResult containing annotations.

  • Get all annotations for a given message (as a paginated result).

    Declaration

    Objective-C

    - (void)getForMessageSerial:(nonnull NSString *)messageSerial
                          query:(nonnull ARTAnnotationsQuery *)query
                       callback:(nonnull ARTPaginatedAnnotationsCallback)callback;

    Swift

    func getForMessageSerial(_ messageSerial: String, query: ARTAnnotationsQuery, callback: @escaping ARTPaginatedAnnotationsCallback)

    Parameters

    messageSerial

    The serial of the message to get annotations for.

    query

    Restrictions on which annotations to get (such as a limit on the size of the result page).

    callback

    A callback for retriving an ARTPaginatedResult containing annotations.