@apidog/vk-client
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

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]) => {
    // ...
});

Readme

Keywords

Package Sidebar

Install

npm i @apidog/vk-client

Weekly Downloads

7

Version

0.1.0

License

GPL-3.0

Unpacked Size

21.3 kB

Total Files

12

Last publish

Collaborators

  • vladislav805