PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Google Calendar
Google Calendar
Iniciado por guest, 28,sep. 2015 15:40 - 3 respuestas
Publicado el 28,septiembre 2015 - 15:40
Hi All,

I would like to add new appointments to a Google Calendar, however all I managed to do was get the existing events of the calendar into an array...
Cannot seem to find how to add a new appointment... Any ideas?

Thanks
Sarah
Publicado el 28,septiembre 2015 - 16:46
Windev ? webdev?

In Windev there is an example. The outlook calender example. It Allows for ynschronize with the outlook agenda

Regards

Allard
Publicado el 28,septiembre 2015 - 16:48
Hi Allard,

I forgot to mention that I want to use Windev 20 for this.
Yes I had a look at that example however it seems that it doesn't apply for Google Calendar.

Thanks
Sarah
Publicado el 29,septiembre 2015 - 09:50
Hi Allard

Thanks for your feedback! I managed to solve the issue I had and decided to post it here in case someone else needs it. The below just adds a calendar to a Google Calendar.

Please note that the ClientID and ClientSecret can be acquired from the Google Developer Console when the Calendar API is activated.


Cnt is gglConnection
Cnt..Email = "testingemail@gmail.com"
Cnt..ClientID = "192"
Cnt..ClientSecret = "HDN"
IF GglConnect(Cnt) = False THEN
Error(ErrorInfo())
END

arrCalendars is array of gglCalendar
arrCalendars = GglListCalendar(Cnt)
arrAllEvents is gglCalendar = GglGetCalendar(Cnt,1)

cal is gglEvent
cal.Content = "testing"
cal.StartDate = "201509301400"
cal.EndDate = "201509301600"
cal.Title = "TESTING WINDEV"

ArrayAdd(arrAllEvents,cal)

GglWrite(Cnt,arrAllEvents)


Regards
Sarah