Nunjucks Powers Mozilla

    This package has been deprecated

    Author message:

    The package has been deprecated in favor of the `sendPromise` method in @vkontakte/vk-connect. Install using @vkontakte/vk-connect instead.

    @vkontakte/vk-connect-promise
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.0 • Public • Published

    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>

    Install

    npm i @vkontakte/vk-connect-promise

    DownloadsWeekly Downloads

    9

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    11.2 kB

    Total Files

    11

    Last publish

    Collaborators