Cir-Food reverse API implementation in NodeJS.
All API are authenticated, so you must first of all configure your client.
const CirFood = require('cir-food'); const username = process.env.CIRFOOD_USERNAME; const password = process.env.CIRFOOD_PASSWORD; const client = new CirFood(username, password);
Start a booking
Once you start a booking, you can get all courses for that day.
const courses = client.booking.courses;
Add a course to current booking
Once you got courses, use that IDs to add a course to current booking
const course_id = courses.data.id; client.addCourseToCurrentBooking(course_id)