I think I am missing something, because before I used GoogleCalendar from TMS Cloud pack without difficulty. However GoogleCalendar in FNC doesn't seem to work. Here is what I did:
CloudGCalendar : TTMSFNCCloudGoogleCalendar;
ACalendar : TTMSFNCCloudGoogleCal;
CloudGCalendar.Authentication.ClientID := 'MyClientId';
CloudGCalendar.Authentication.Secret := 'MySecret';
CloudGCalendar.Authentication.CallBackURL := 'http://127.0.0.1:8888'; //this is my url, I double checked
With CloudGCalendar Do
Logging := True;
PersistTokens.Location := plIniFile; PersistTokens.Key := '.\gcal.ini'; PersistTokens.Section := 'tokens'; LoadTokens; Connect; // NO ERROR HERE, everything seems to go well, at first it asks for credentials End; // With CloudGCalendar Do
CloudGCalendar.GetCalendars; // Here CloudGCalendar.Calendars.count gives me 0
//This should give me the default calendar, however the debugger says CloudGCalendar.Items.Count=0
CloudGCalendar.GetCalendar('',Date,Date+EncodeTime(23, 59, 59, 0));
//and this gives Access violation:
ACalendar := TTMSFNCCloudGoogleCal.Create(nil);
ACalendar.Summary := 'Teszt 01';
With your demo I can use the same credentials , but it is not easily understandable for me: there are a lot of .pas files with a lot of classes and no comments at all. The help is very short and I cannot use it as other Delphi related helps e.g. clicking on an object and it shows all the properties and methods in details, with examples.
For example in the help it only says about AddCalendar that '...used to initialize the Calendar', but there is nothing written about the Calendar class in details. I needed to check the source code and there are more properties than it is mentioned in the help.
Please help me resolving this issue. Thank you very much in advance!