1.1.0 • Published 6 years ago
@vkontakte/vk-connect-promise v1.1.0
VK Connect Promise
A package for integrating VK Mini Apps with official VK clients for iOS, Android and Web with events based on promises.
⛔️ DEPRECATED
The package has been deprecated in favor of the sendPromise
method in VK Connect
Usage
import vkConnectPromise from '@vkontakte/vk-connect-promise';
// Sends event to client
vkConnectPromise
.send('VKWebAppGetEmail')
.then(data => {
// Handling received data
console.log(data.email);
})
.catch(error => {
// Handling an error
});
For use in a browser, include the file dist/index.umd.js
and use as follows
<script src="index.umd.js"></script>
<script>
// Sends event to client
window.vkConnectPromise
.send('VKWebAppGetEmail')
.then(data => {
// Handling received data
console.log(data.email);
})
.catch(error => {
// Handling an error
});
</script>
1.1.0
6 years ago
1.0.0-beta.5
6 years ago
1.0.0-beta.4
6 years ago
1.0.0-beta.3
6 years ago
1.0.0-beta.2
6 years ago
1.0.0-beta.1
6 years ago
1.0.0-beta.0
6 years ago
0.2.0
6 years ago