Quote:
raztoki:
look, you can't achieve what you're trying todo. It's already controlled within the VK plugin.
|
Deferred execution vk-api-calls provides a way to collect several API calls and run them all at once via execute method. This approach
can speed up , as yo're able to retreive all data need by one shot.
vk.execution() → execution
This method return an Execution object instance.
execution.push(method, [query]) → this
Add an API call to the set.
Arguments are same as in #peformApiCall() except callback — no callbacks needed here.
execution.code() → string
Generates code for execution by VK at any point of time.
execution.execute([callback]) → promise/vk-api-calls instance
Runs the execution via #peformApiCall() with 'execute' as first argument.
Example:
Code:
var exec = vk.execution();
exec
.push('users.get', {user_ids: 1})
.push('wall.get', {owner_id: 1})
.push('photos.get', {owner_id: 1})
.execute()
.then(function (data) {
console.log('Name: ' + data[0].response.first_name);
console.log('Wall posts: ' + data[1].response.count);
console.log('Photos posts: ' + data[2].response.count);
});