Conforms to NSObject
Declared in VKRequest.h

Overview

Current protocol describes basic methods which report states of a running request.

There is only one required method - method that is getting an answer from VK server.

Tasks

Required methods

Optional

Instance Methods

VKRequest:captchaSid:captchaImage:

Method is called if user needs to enter captcha

- (void)VKRequest:(VKRequest *)request captchaSid:(NSString *)captchaSid captchaImage:(NSString *)captchaImage

Parameters

request

request that changed its state

captchaSid

unique captcha identifier

captchaImage

link to captcha (an image that should be shown to end user)

Discussion

More info about how to work with captcha you can find here: https://github.com/AndrewShmig/Vkontakte-iOS-SDK-v2.0/issues/11

Declared In

VKRequest.h

VKRequest:connectionErrorOccured:

Method is called when connection error occurs

- (void)VKRequest:(VKRequest *)request connectionErrorOccured:(NSError *)error

Parameters

request

request that changed its state

error

error description

Declared In

VKRequest.h

VKRequest:parsingErrorOccured:

Method is called if any error occurs during server response parsing

- (void)VKRequest:(VKRequest *)request parsingErrorOccured:(NSError *)error

Parameters

request

request that changed its state

error

error description

Declared In

VKRequest.h

VKRequest:response:

Returns server response as Foundation object

- (void)VKRequest:(VKRequest *)request response:(id)response

Parameters

request

request that changed its state

response

server response as Foundation object

Declared In

VKRequest.h

VKRequest:responseErrorOccured:

Method is called if server response contains any error message

- (void)VKRequest:(VKRequest *)request responseErrorOccured:(id)error

Parameters

request

request that changed its state

error

error description as Foundation object obtained from server response

Declared In

VKRequest.h

VKRequest:totalBytes:downloadedBytes:

Method is called each time new portion of data is received

- (void)VKRequest:(VKRequest *)request totalBytes:(NSUInteger)totalBytes downloadedBytes:(NSUInteger)downloadedBytes

Parameters

request

request that changed its state

totalBytes

total bytes to be transfered, if this value can not be determined than 0 is used

downloadedBytes

bytes already downloaded

Declared In

VKRequest.h

VKRequest:totalBytes:uploadedBytes:

Method is called each time new portion of data is sent (its recommended to use this method while uploading images, audio, video files)

- (void)VKRequest:(VKRequest *)request totalBytes:(NSUInteger)totalBytes uploadedBytes:(NSUInteger)uploadedBytes

Parameters

request

request that changed its state

totalBytes

total bytes to be received. If this value can not be determined than 0 is used.

uploadedBytes

bytes already uploaded

Declared In

VKRequest.h