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
messageThe message to annotate.
annotationThe annotation to publish. (Must include at least the
type. Assumed to be an annotation.create if no action is specified)callbackA 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
messageSerialThe serial field of the message to annotate.
annotationThe annotation to publish. (Must include at least the
type. Assumed to be an annotation.create if no action is specified)callbackA 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
messageThe message to remove the annotation from.
annotationThe annotation to delete. (Must include at least the
type.)callbackA 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
messageSerialThe serial field of the message to remove the annotation from.
annotationThe annotation to delete. (Must include at least the
type.)callbackA 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
messageThe message to get annotations for.
queryRestrictions on which annotations to get (such as a
limiton the size of the result page).callbackA callback for retriving an
ARTPaginatedResultcontaining 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
messageSerialThe
serialof the message to get annotations for.queryRestrictions on which annotations to get (such as a
limiton the size of the result page).callbackA callback for retriving an
ARTPaginatedResultcontaining annotations.