Answer the question
In order to leave comments, you need to log in
How is the module for working with the Vkontakte API arranged?
I came across an interesting module for working with the Vkontakte API - VK-Promise , and I just can’t figure out its structure.
The module file contains the export of the VK function, which wraps the vk(method, params) functions - for sending requests to the API, vk.on(_event, data, add_to_event) - for creating event handlers and the vk.longpoll object with the keys start, stop and etc.
The module is connected like all the others
const VK = require("VK-Promise");
const vk = new VK("access_token");
Answer the question
In order to leave comments, you need to log in
function VK(access_token, options) {
function vk() {
...
}
vk.on = ...
vk.longpoll = ...
return vk;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question