Appointment King Scheduler
Manage Appointment King schedules
[ Installation
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' }
]