ARTRestPresenceProtocol
Objective-C
@protocol ARTRestPresenceProtocol
Swift
protocol ARTRestPresenceProtocol
The protocol upon which the ARTRestPresence is implemented.
-
Retrieves the current members present on the channel and the metadata for each member, such as their
ARTPresenceActionand ID. Returns aARTPaginatedResultobject, containing an array ofARTPresenceMessageobjects.Declaration
Objective-C
- (BOOL)get:(nonnull ARTPresenceQuery *)query callback:(nonnull ARTPaginatedPresenceCallback)callback error:(NSError *_Nullable *_Nullable)errorPtr;Swift
func get(_ query: ARTPresenceQuery, callback: @escaping ARTPaginatedPresenceCallback) throwsParameters
queryAn
ARTPresenceQueryobject.callbackA callback for retriving an
ARTPaginatedResultobject with an array ofARTPresenceMessageobjects.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. -
Undocumented
Declaration
Objective-C
- (void)history:(ARTPaginatedPresenceCallback)callback;Swift
func history(_ callback: @escaping ARTPaginatedPresenceCallback) -
Retrieves a
ARTPaginatedResultobject, containing an array of historicalARTPresenceMessageobjects for the channel. If the channel is configured to persist messages, then presence messages can be retrieved from history for up to 72 hours in the past. If not, presence 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 ARTPaginatedPresenceCallback)callback error:(NSError *_Nullable *_Nullable)errorPtr;Swift
func history(_ query: ARTDataQuery?, callback: @escaping ARTPaginatedPresenceCallback) throwsParameters
queryAn
ARTDataQueryobject.callbackA callback for retriving an
ARTPaginatedResultobject with an array ofARTPresenceMessageobjects.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.