@snapcall/widget-sdk

2.5.4 • Public • Published

Snapcall

doc: https://doc.snapcall.io/#widget-api contact: support@snapcall.io

Getting Started with NPM and a bundler.

npm install @snapcall/widget-sdk

load the snapcall widget:

import { snapcallAPI } from '@snapcall/widget-sdk';

const bid = ""; // create an account on https://admin.snapcall.io/login to get a button identifier
snapcallAPI.initWidget(bid);

Getting started with npm and browser import/export.

npm install @snapcall/widget-sdk

load the snapcall widget:

<script type="module" src="node_modules/snapcall/index.js"></script>
const bid = ""; // create an account on https://admin.snapcall.io/login to get a button identifier
// snapcall script loaded before
if (snapcallAPI && snapcallAPI.initWidget) {
  snapcallAPI.initWidget(bid);
}
else {
  // snapcall script loaded after
  window.addEventListener('snapcallEvent_init', () => {
      snapcallAPI.initWidget(bid);
  })
}

Readme

Keywords

none

Package Sidebar

Install

npm i @snapcall/widget-sdk

Weekly Downloads

0

Version

2.5.4

License

custom

Unpacked Size

172 kB

Total Files

7

Last publish

Collaborators

  • tom2bec
  • jballanger
  • pnoyelle