2.5.4 • Published 3 years ago
@snapcall/widget-sdk v2.5.4
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);
})
}