Rate this page:

VIMessengerCompletion

Interface that represents a completion handler that is used to get results of methods such as [VIConversation update:], [VIMessenger getUserByName:completion:], etc.

A queue on which all events will be received is specified via [VIClient initWithDelegateQueue:].

Methods

success:failure:

Static
Copy URL
+ (

instancetype

)success:(

void ( ^ ) ( ObjectType result )

)success
failure:(

void ( ^ ) ( VIErrorEvent * errorEvent )

)failure

Creates completion handler.

Parameters

  • success:

    void ( ^ ) ( ObjectType result )

    Invoked when a method call with the specified completion handler is successfully completed. ObjectType depends on the called method, e.g., it will be VIUserEvent if [VIMessenger getUserByIMId:completion:] is called.

  • failure:

    void ( ^ ) ( VIErrorEvent * errorEvent )

    Invoked when an error occurred as the method call result with the specified completion handler.

Returns

  • type:

    instancetype