ARTRestChannelProtocol
Objective-C
@protocol ARTRestChannelProtocol <ARTChannelProtocol>
Swift
protocol ARTRestChannelProtocol : ARTChannelProtocol
The protocol upon which the ARTRestChannel is implemented.
-
Retrieves a
ARTPaginatedResultobject, containing an array of historicalARTMessageobjects for the channel. If the channel is configured to persist messages, then messages can be retrieved from history for up to 72 hours in the past. If not, messages can only be retrieved from history for up to two minutes in the past.Declaration
Objective-C
- (BOOL)history:(nullable ARTDataQuery *)query callback:(nonnull ARTPaginatedMessagesCallback)callback error:(NSError *_Nullable *_Nullable)errorPtr;Swift
func history(_ query: ARTDataQuery?, callback: @escaping ARTPaginatedMessagesCallback) throwsParameters
queryAn
ARTDataQueryobject.callbackA callback for retriving an
ARTPaginatedResultobject with an array ofARTMessageobjects.errorPtrA reference to the
NSErrorobject where an error information will be saved in case of failure.Return Value
In case of failure returns
falseand the error information can be retrived via theerrorparameter. -
Retrieves a
ARTChannelDetailsobject for the channel, which includes status and occupancy metrics.Declaration
Objective-C
- (void)status:(nonnull ARTChannelDetailsCallback)callback;Swift
func status(_ callback: @escaping ARTChannelDetailsCallback)Parameters
callbackA callback for receiving the
ARTChannelDetailsobject.