ARTRestChannelProtocol

Objective-C

@protocol ARTRestChannelProtocol <ARTChannelProtocol>

Swift

protocol ARTRestChannelProtocol : ARTChannelProtocol

The protocol upon which the ARTRestChannel is implemented.

  • Retrieves a ARTPaginatedResult object, containing an array of historical ARTMessage objects 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) throws

    Parameters

    query

    An ARTDataQuery object.

    callback

    A callback for retriving an ARTPaginatedResult object with an array of ARTMessage objects.

    errorPtr

    A reference to the NSError object where an error information will be saved in case of failure.

    Return Value

    In case of failure returns false and the error information can be retrived via the error parameter.

  • Retrieves a ARTChannelDetails object for the channel, which includes status and occupancy metrics.

    Declaration

    Objective-C

    - (void)status:(nonnull ARTChannelDetailsCallback)callback;

    Swift

    func status(_ callback: @escaping ARTChannelDetailsCallback)

    Parameters

    callback

    A callback for receiving the ARTChannelDetails object.