Initialize a new WidgetApi instance.
Optional
config: ConfigOptionsConfig details
Browser example
var squatchApi = new squatch.WidgetApi({tenantAlias:'test_12b5bo1b25125'});
Browserify/Webpack example
var WidgetApi = require('@saasquatch/squatch-js').WidgetApi;
var squatchApi = new WidgetApi({tenantAlias:'test_12b5bo1b25125'});
Babel+Browserify/Webpack example
import {WidgetApi} from '@saasquatch/squatch-js';
let squatchApi = new WidgetApi({tenantAlias:'test_12b5bo1b25125'});
Looks up the referral code of the current user, if there is any.
code referral code if true.
Requests widget template
Parameters for request
template html if true.
Looks up the referral code of the current user, if there is any.
code referral code if true.
Creates/upserts user, requests widget template.
Parameters for request
string if true, with the widget template, jsOptions and user details.
Generated using TypeDoc
The WidgetApi class is a wrapper around the Widget Endpoints of the SaaSquatch REST API.