1.0.0 • Published 4 years ago

ak-scheduler v1.0.0

Weekly downloads
9
License
MIT
Repository
github
Last release
4 years ago

Installation

yarn add ak-scheduler

Usage

import { Scheduler } from 'ak-scheduler';

// user lookup data
const data = {
    firstName: 'John',
    lastName: 'Doe',
    birthdate: new Date('2000-01-01'),
    email: 'john@example.com',
    phone: '(800) 000-0000',
};

// Create the scheduler
const scheduler = new Scheduler('0000'); //  <-- location id

// Create a session
scheduler.createSession().then(() => {
    scheduler.getBookedAppointments(data).then((appts) => {
        console.log(appts);
    });
});

Will output

[
Appointment {
  datetime: '2020-11-25T23:45:00.000Z',
  typeID: '09821',
  trainerID: '562354',
  isBooked: true,
  id: '5687446' }
]

Dependencies