VKBatchRequest Class Reference

Inherits from VKObject : NSObject
Declared in VKBatchRequest.h
VKBatchRequest.m

Overview

Used for execution bunch of methods at time, and receive results of that methods in array

  completeBlock

Specify completion block for request

@property (nonatomic, copy) void ( ^ ) ( NSArray *responses ) completeBlock

Discussion

Specify completion block for request

Declared In

VKBatchRequest.h

  errorBlock

Specity error (HTTP or API) block for request.

@property (nonatomic, copy) void ( ^ ) ( NSError *error ) errorBlock

Discussion

Specity error (HTTP or API) block for request.

Declared In

VKBatchRequest.h

– initWithRequests:

Initializes batch processing with requests

- (instancetype)initWithRequests:(VKRequest *)firstRequest, ...

Parameters

firstRequest

,… A comma-separated list of requests should be loaded, ending with nil.

Return Value

Prepared request

Discussion

Initializes batch processing with requests

Declared In

VKBatchRequest.h

– initWithRequestsArray:

Initializes batch processing with requests array

- (instancetype)initWithRequestsArray:(NSArray *)requests

Parameters

requests

Array of requests should be loaded.

Return Value

Prepared request

Discussion

Initializes batch processing with requests array

Declared In

VKBatchRequest.h

– executeWithResultBlock:errorBlock:

Executes batch request

- (void)executeWithResultBlock:(void ( ^ ) ( NSArray *responses ))completeBlock errorBlock:(void ( ^ ) ( NSError *))errorBlock

Parameters

completeBlock

will receive result of passed requests

errorBlock

called if any request did fail

Discussion

Executes batch request

Declared In

VKBatchRequest.h

– cancel

Cancel current batch operation

- (void)cancel

Discussion

Cancel current batch operation

Declared In

VKBatchRequest.h