Google Calendar | Load Calendars

The process to get all calendars of your account is very easy, just follow the next steps:

 

  1. Call the method LoadCalendars.
  2. If method returns True, then you can Access to Calendars property and iterate over the list to get access to all Calendars.

 


TsgcHTTPGoogleCloud_Calendar_Client oGoogleCalendar = new TsgcHTTPGoogleCloud_Calendar_Client;
// ... configure OAuth2 options
oGoogleCalendar->GoogleCloudOptions->OAuth2->ClientId = "google ClientId";
oGoogleCalendar->GoogleCloudOptions->OAuth2->ClientSecret = "google ClientSecret";
// ... request calendars
if (oGoogleCalendar->LoadCalendars)
{
  // ... get calendars data
  for (int i = 0; i < oGoogleCalendar.Calendars->Count; i++)
  {
    vCalendarTitle = oGoogleCalendar->Calendars->Calendar[i]->Summary;
  }
}
else
{
  raise Exception->Create("Error Calendar Sync");
}