@bookla-app/booking-component
v1.1.0
Published
Booking component for Bookla app.
Downloads
39
Readme
booking-core
Booking component for Bookla app.
Usage with standalone script
The booking widget is available as a standalone script that can be included directly in any HTML page.
<!-- Regular version -->
<script src="https://cdn.example.com/booking-widget-standalone.global.js"></script>
<!-- Version-specific file -->
<script src="https://cdn.example.com/booking-widget-standalone-v1.0.20.global.js"></script>Then initialize the widget:
const element = document.getElementById('booking-container');
BookingWidgetStandalone.initBookingWidget(element, {
companyId: 'your-company-id',
serviceId: 'your-service-id',
apiKey: 'your-api-key',
// other options...
});
// Check the version
console.log('Using Booking Widget version:', BookingWidgetStandalone.version);Setting Auth Tokens
You can set authentication tokens at any time after initialization:
BookingWidgetStandalone.setAuthTokens(element, {
access_token: 'your-access-token',
refresh_token: 'your-refresh-token',
expires_in: 3600
});