Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vk-x/vk-api

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vk-x/vk-api

JavaScript Driver for vk.com API

  • 0.5.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

vk-api — JavaScript Driver for vk.com API

An alternative library for interacting with vk.com with solid and exceptionally convenient API.

Install

The driver is packaged as an UMD and is published to:

  • NPM: npm install --save @vk-x/vk-api
  • Bower: bower install vk-api
  • jsDelivr CDN: https://cdn.jsdelivr.net/vk-api/latest/vk-api.min.js
  • A smaller version without method shortcuts is also available: https://cdn.jsdelivr.net/vk-api/latest/vk-api-no-shortcuts.min.js

Use

After you've included and loaded the script, you can use it either with Promises or with callbacks.


// Authenticate on your website.
vk.authWebsite("app-id", ["permissions"]).then(function() {
  vk.users.get()
}).then(function(currentUser) {
  // https://vk.com/dev/users.get
})

// Alternatively, obtain the access token yourself.
vk.accessToken = "obtained-access-token"
vk.users.get().then(function(currentUser) {
  // https://vk.com/dev/users.get
})

Documentation

Roadmap

  • Basic vk.method() support with callbacks
  • Promises
  • Method aliases: vk.users.get() instead of vk.method("users.get")
  • Documentation
  • Release to npm, Bower, jsDelivr
  • Separate builds with and without method aliases
  • Auto-retry on 'too many requests' error
  • Queue requests to avoid spamming retries
  • API error handling (meanwhile, here's a list of error codes)
  • Full-fledged server-side support, including vk.getAuthUrl() and aliases for secure methods
  • Better website-type apps support, including automated authentication
  • Build size optimization

License — MIT

Keywords

FAQs

Package last updated on 14 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc