@apidog/vk-client
v0.1.0
Published
Client for making requests to VK API for APIdog
Downloads
28
Readme
APIdog Mini VK Client for Node
Using
Install:
npm i @apidog/vk-client
Import:
import VK from '@apidog/vk-client';
Create instance of client:
const vk = new VK('abcdef0123456');
Make request:
const [durov] = await vk.perform<IUser[]>('users.get', {
userIds: 1,
fields: ['photo_50', 'first_name_dat'],
// 'userIds' converts to 'user_ids'
// arrays in value converts to comma-separated string
});
// or
vk.perform<IUser[]>('users.get', {
userIds: [1],
}).then(([durov]) => {
// ...
});