0.1.0 • Published 9 years ago
nodevk v0.1.0
NodeVK
VKontakte API for node js.
Example
nodevk.execMethod({
method: 'users.get',
params:
{
user_ids: '205387401'
}
}, console.log);
execMethod
Calls the VK API method. Method list
nodevk.execMethod(
{
method: method_name,
token: access_token, // Optional
version: v // Optional
params:
{
parameterName: parameterValue,
...
}, // Optional
dryRun: boolean
// Instead of making an actuall request
// prints the url that it would request
}, callback);
getCodeURL
Gets the URL to get a code, for authorization, in the official documentation
nodevk.getCodeURL(
{
appId: client_id,
scope: permission_scope,
redirectTo: redirect_uri, // Optional
version: v // Optional
});
getAccessTokenFromCode
Gets the access token from a code, as described in the official documentation
nodevk.getAccessToken(
{
appId: client_id,
appSecret: client_secret,
code: code,
redirectTo: redirect_uri, // Optional
version: v // Optional,
dryRun: boolean
// Instead of making an actuall request
// prints the url that it would request
});
getServerToken
Gets the server token, as described in the official documentation
nodevk.getServerToken(
{
appId: client_id,
appSecret: client_secret,
version: v // Optional,
dryRun: boolean
// Instead of making an actuall request
// prints the url that it would request
});
0.1.0
9 years ago