This is simple script which renders an iframe with a widget with provided params.
AppyBeeWidget.init(options);
AppyBeeWidget.show();
AppyBeeWidget.hide();
Options are stored in object provided to init function as a param.
-
baseURL
: Address of the API -
wsBaseURL
: Address of the WebSocket server -
widgetURL
: Address of the widget -
companyAPIKey
(required): Company API key -
style
(required): Widget style (side
,fullscreen
orinline
) -
user
: User is used to authenticate to the API -
passsword
: Password is used to authenticate to the API -
strictPath
(default:false
): Store cookies in current path not in whole domain -
showCloseButton
(default:true
): Allow to control if close button is shown or not
import AppyBeeWidget from "appybee-widget-beta";
AppyBeeWidget.init({
baseURL: 'https://portal.appybee.nl',
wsBaseURL: 'http://ws.appybee.nl',
widgetURL: '******',
style: 'fullscreen'
});
AppyBeeWidget.show();
Website style renders the widget in fullscreen mode with no possibility to close it. Additionally the "Home" tab is rendered as a main tab. It contains the informations about the selected company.
<html lang="en">
<body>
<script src="https://cdn.jsdelivr.net/npm/appybee-widget-beta"></script>
<script>
AppyBeeWidget.init({
baseURL: 'https://myprofiapp.nl',
wsBaseURL: 'http://ws.appybee.nl',
widgetURL: '******',
style: 'fullscreen'
});
AppyBeeWidget.show();
</script>
</body>
</html>
Builds the widget to the /build
directory.