I am trying to determine if a calendar has availability during a specific time. Specifically, when a calendar event is manually created, there's a checkbox for busy or free:
I would like to test if the calendar is free or not. I assumed this would have been a property in the calendar itself, but I do not see one in the google calendar classes. (I was looking for some property along the lines of 'isBusy').
My next step would be to test if there are events at the requested time, and if there are, I again don't see a method to test if an event's setting is busy or not. Does anyone know how to do this?
Here's what I have:
function getAvailability(startTime,EndTime){
var myCalendar = CalendarApp.getDefaultCalendar();
//sample date to test availability
var aDate = new Date(2020,3,19);
var dayEvents = myCalendar.getEventsForDay(aDate);
//specific event captured:
var myEvent = dayEvents[0];
Logger.log(myEvent.getDescription());
//here is where I don't know what to do.
//How can I return if during this event's time if calendar is free?
}