ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / Google functions / Google Calendar
  • Example: Browsing Google calendars
GglGetCalendar (Example)
Example: Browsing Google calendars
This example is used to browse the different calendars of a Google account. The associated events are browsed for each calendar and the associated locations are browsed for each event.
// Connection to Google
Cnt is gglConnection
...
 
// Retrieve the array of available calendars
arrCalendars is array of gglCalendar
arrCalendars = GglListCalendar(Cnt)
 
// Browse
arrCalendarsBrowseEvent is gglCalendar
ACalendar is gglCalendar
AnEvent is gglEvent
ALocation is gglLocation
 
// Browse all the available calendars and retrieve the events
FOR EACH ÉLÉMENT ACalendar OF arrCalendars
Trace("Calendar " + ACalendar.Title + ...
 " (updated on " + DateToString(ACalendar.UpdateDate[[TO 8]]) + ...
 " à " + TimeToString(ACalendar.UpdateDate[[9 TO]]) + ")")
arrCalendarsBrowseEvent = GglGetCalendar(Cnt, ACalendar.Identifier)
 
// Browse all the events found in the current calendar
FOR EACH AnEvent OF arrCalendarsBrowseEvent
Trace("------------------------------")
Trace(AnEvent.Title)
Trace("From " + DateToString(AnEvent.StartDate[[TO 8]]) + ...
  " to " + TimeToString(AnEvent.StartDate[[9 TO]])+")" + ...
  " to " + DateToString(AnEvent.EndDate[[TO 8]])+ " at " + ...
  TimeToString(AnEvent.EndDate[[9 TO]]) + ")")  
 
// Browse the locations of the event
FOR EACH ÉLÉMENT ALocation OF AnEvent.Location
  Trace("Location of the event: " + ALocation.Value + "//" + ALocation.Caption)
END
END
END
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help