How to get list of all time/ free tome slots available in google calendar

Viewed 57
calendar.freebusy.query(check,{
        fields: "calendars,groups,kind,timeMax,timeMin", 
        alt:"json"
        // calendarId: 'primary',
        // timeMin: (new Date()).toISOString(),
        // maxResults: 10,
        // singleEvents: true,
        // orderBy: 'startTime',
      }, (err, res) => {
        if (err) return console.log('The API returned an error: ' + err);
        console.log(res.data.calendars)
        const events = res.data;
        if (events) {
          console.log('Upcoming 10 events:');
        } else {
          console.log('No upcoming events found.');
        }
      });

this only returns the data of busy time

0 Answers
Related