2.0.1 • Published 8 months ago

@arrivy/bookings-widget v2.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

Introduction

This document describes the usage of Arrivy Bookings Widget with sample code snippets including available options and functions.

Getting started

Installation

Node Environment

Add Arrivy Booking Widget to your project by executing npm install --save @arrivy/bookings-widget

import ArrivySchedulingWidget from '@arrivy/bookings-widget';

let initialASW = new ArrivySchedulingWidget({
                      booking_url:'<paste_booking_url_safe_id_here>', 
                      selector: '#asw-container'
                  });

Vanilla Javascript

Include javascript and CSS files on the page where the bookings widget need to be rendered. Typically CSS file import goes inside the head tag and javascript before the ending tag of the body.

<link href="https://unpkg.com/@arrivy/bookings-widget/dist/css/style.css" rel="stylesheet">

<script src="https://unpkg.com/@arrivy/bookings-widget/dist/bundle.js"></script>


<script>
let initialASW = new ArrivySchedulingWidget({
                      booking_url:'<paste_booking_url_safe_id_here>', 
                      selector: '#asw-container'
                  });
</script>

Usage

After including/importing the bundle files, create desired HTML element for the bookings widget to be rendered in.

<div id="asw-container"></div>

Bookings widget depend on task booking_url which can be found from the bookings API as booking_url_safe_id.

After initializing, call the renderInitialBooking function to render the widget.

initialASW.renderInitialBooking();
1.2.0

9 months ago

2.0.1

8 months ago

2.0.0

9 months ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago