vk_api_tool
v1.0.3
Published
Simple tool for VK api
Downloads
2
Readme
HOW TO USE
Firstly, install vk_api_tool
:
$ npm install vk_api_tool
Then require it, auth with your access token and use. All is simple!
const VK_API = require('vk_api_tool');
const vk = new VK_API('your_access_token', '5.103', 'ru');
vk.use('users.get', {
user_ids: 'don2quixote',
}).then(response => {
let user = response[0];
console.log(`We got the user: ${user.last_name} ${user.first_name}`);
vk.use('messages.send', {
message: 'Hello, I\'m using vk_api_tool',
user_id: user.id,
random_id: (Math.random() * 10**5).toFixed()
}).catch(err => console.log(err));
}).catch(err => console.log(err));