vk-fast-longpoll
Advanced tools
Comparing version 2.1.12 to 2.1.13
@@ -19,2 +19,3 @@ const methods = require('./methods'); | ||
this._token = token; | ||
this._direct = false; | ||
this._api = []; | ||
@@ -25,11 +26,33 @@ this._queue = []; | ||
let _apiCall = (method,params = {}, filters = '') => { | ||
return new Promise((resolve,reject) => { | ||
this._queue.push({ | ||
method, | ||
params, | ||
filters, | ||
resolve, | ||
reject | ||
}); | ||
let _apiCall = (method, params = {}, filters = '') => { | ||
return new Promise((resolve, reject) => { | ||
if(!this._direct) { | ||
this._queue.push({ | ||
method, | ||
params, | ||
filters, | ||
resolve, | ||
reject | ||
}); | ||
} | ||
else { | ||
console.log(params); | ||
request({ | ||
url: 'https://api.vk.com/method/' + method, | ||
method: 'POST', | ||
qs: { | ||
access_token: this._token, | ||
v: '5.65' | ||
}, | ||
form: params, | ||
json: true | ||
}, (err, res, body) => { | ||
if(err) { | ||
reject(err); | ||
} | ||
else { | ||
resolve(body.response); | ||
} | ||
}) | ||
} | ||
}); | ||
@@ -36,0 +59,0 @@ }; |
@@ -32,46 +32,48 @@ module.exports = [ | ||
'wall.reportComment', | ||
'photos.confirmTag', | ||
'photos.copy', | ||
'photos.createAlbum', | ||
'photos.createComment', | ||
'photos.delete', | ||
'photos.deleteAlbum', | ||
'photos.deleteComment', | ||
'photos.edit', | ||
'photos.editAlbum', | ||
'photos.editComment', | ||
'photos.get', | ||
'photos.getAlbums', | ||
'photos.get', | ||
'photos.getAlbumsCount', | ||
'photos.getAll', | ||
'photos.getAllComments', | ||
'photos.getById', | ||
'photos.getUploadServer', | ||
'photos.getOwnerPhotoUploadServer', | ||
'photos.getChatUploadServer', | ||
'photos.getComments', | ||
'photos.getMarketAlbumUploadServer', | ||
'photos.getMarketUploadServer', | ||
'photos.getMarketAlbumUploadServer', | ||
'photos.saveMarketPhoto', | ||
'photos.saveMarketAlbumPhoto', | ||
'photos.saveOwnerPhoto', | ||
'photos.saveWallPhoto', | ||
'photos.getMessagesUploadServer', | ||
'photos.getNewTags', | ||
'photos.getOwnerCoverPhotoUploadServer', | ||
'photos.getOwnerPhotoUploadServer', | ||
'photos.getTags', | ||
'photos.getUploadServer', | ||
'photos.getUserPhotos', | ||
'photos.getWallUploadServer', | ||
'photos.getMessagesUploadServer', | ||
'photos.saveMessagesPhoto', | ||
'photos.report', | ||
'photos.reportComment', | ||
'photos.search', | ||
'photos.save', | ||
'photos.copy', | ||
'photos.edit', | ||
'photos.makeCover', | ||
'photos.move', | ||
'photos.makeCover', | ||
'photos.putTag', | ||
'photos.removeTag', | ||
'photos.reorderAlbums', | ||
'photos.reorderPhotos', | ||
'photos.getAll', | ||
'photos.getUserPhotos', | ||
'photos.deleteAlbum', | ||
'photos.delete', | ||
'photos.report', | ||
'photos.reportComment', | ||
'photos.restore', | ||
'photos.confirmTag', | ||
'photos.getComments', | ||
'photos.getAllComments', | ||
'photos.createComment', | ||
'photos.deleteComment', | ||
'photos.restoreComment', | ||
'photos.editComment', | ||
'photos.getTags', | ||
'photos.putTag', | ||
'photos.removeTag', | ||
'photos.getNewTags', | ||
'photos.save', | ||
'photos.saveMarketAlbumPhoto', | ||
'photos.saveMarketPhoto', | ||
'photos.saveMessagesPhoto', | ||
'photos.saveOwnerCoverPhoto', | ||
'photos.saveOwnerPhoto', | ||
'photos.saveWallPhoto', | ||
'photos.search', | ||
'friends.get', | ||
@@ -78,0 +80,0 @@ 'friends.getOnline', |
@@ -11,2 +11,3 @@ { | ||
}, | ||
"bundleDependencies": false, | ||
"dependencies": { | ||
@@ -18,2 +19,3 @@ "bluebird": "^3.5.0", | ||
}, | ||
"deprecated": false, | ||
"description": "VK Lib for better performance", | ||
@@ -55,3 +57,2 @@ "devDependencies": { | ||
"optionalDependencies": {}, | ||
"readme": "ERROR: No README data found!", | ||
"repository": { | ||
@@ -64,3 +65,3 @@ "type": "git", | ||
}, | ||
"version": "2.1.12" | ||
"version": "2.1.13" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36125
1036