https://github.com/vkcom/vk-mini-apps-api
The official package for quick and easy development of VK Mini Apps
https://github.com/vkcom/vk-mini-apps-api
Last synced: 8 months ago
JSON representation
The official package for quick and easy development of VK Mini Apps
- Host: GitHub
- URL: https://github.com/vkcom/vk-mini-apps-api
- Owner: VKCOM
- Archived: true
- Created: 2019-09-04T13:57:03.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T02:10:27.000Z (over 3 years ago)
- Last Synced: 2025-08-08T23:55:25.492Z (10 months ago)
- Language: TypeScript
- Homepage:
- Size: 471 KB
- Stars: 28
- Watchers: 10
- Forks: 7
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[npm-badge]: https://img.shields.io/npm/v/@vkontakte/vk-mini-apps-api.svg
[npm-link]: https://npmjs.com/package/@vkontakte/vk-mini-apps-api
[
](https://vk.com/services)
# VK Mini Apps API [![NPM][npm-badge]][npm-link]
Library for quick and efficient development of VK Mini Apps based on [VK Bridge](https://github.com/vkcom/vk-bridge) methods.
Unlike VK Bridge, VK Mini Apps API already contains all the ready-made Javascript-functionality for interacting with the official clients.
## Usage
Install the library via yarn
```
$ yarn add @vkontakte/vk-mini-apps-api
```
or npm
```
$ npm install @vkontakte/vk-mini-apps-api
```
Use in your code in the following way
```javascript
import { VKMiniAppAPI } from '@vkontakte/vk-mini-apps-api';
// Creating API instance
const api = new VKMiniAppAPI();
// Initializing app
api.initApp();
// Using methods
api.getUserInfo().then(userInfo => {
console.log(userInfo.id);
});
```
For use in a browser, include the file [dist/index.umd.js](http://unpkg.com/@vkontakte/vk-mini-apps-api/dist/index.umd.js) and use as follows
```html
const { VKMiniAppAPI } = window.vkMiniAppsAPI;
// Creating API instance
const api = new VKMiniAppAPI();
// Initializing app
api.initApp();
// Using methods
api.getUserInfo().then(userInfo => {
console.log(userInfo.id);
});
```
## [Full API Reference](./docs/classes/vkminiappapi.md)
At the link above you can find a full API Reference of the library. The API reference was generated by [TypeDoc](https://github.com/TypeStrong/typedoc).