Utility methods for working with VK API
$ npm install --save vk-api-util
var vkUtil = require('vk-api-util');
vkUtil.bitMask(['friends', 'photos']);
//=> 6
Returns true if given metod is mentioned in VK API docs.
Required
Type: string
Returns true if given method doesn't require authentication.
Required
Type: string
Returns bit mask for given scope.
Required
Type: string
, array
or number
Pass a string of scopes divided by comma (,
) or array of scopes. If number is passed it assumed to be a bit mask itself and returned without changes.
Returns true if given area is visible within given scope.
vkApiUtil.checkScope(['friends', 'video'], 4456466);
//=> true
Required
Type: string
, array
or number
Required
Type: string
, array
or number
area
and scope
arguments are same as scope
in aforementioned vkUtil.bitMask()
method.
Returns true if given method is reachable within given scope.
Required
Type: string
Type: string
, array
or number
Default: 0
- vk-api-all-methods — List of all VK API methods
- vk-api-open-methods — List of VK API methods that don't require authentication
- vk-api-scoped-methods — Hash of VK API methods that require correct scope and scopes they require
- vk-api-scopes — Hash of VK API access permission codes
MIT © Dmitriy Sobolev