Interfacing with the Google Data API from PowerBuilder.Net
Recently somebody asked me for help getting PowerBuilder.Net (and eventually PowerBuilder Classic through a COM Callable Wrapper) to interface with Google Calendar. That actually turned out to be fairly simple because Google provides a .Net library for Google Data API which provides access not only to Google Calendar, but to a number of other Google services as well, such as Blogger, Contacts, Picasa Web Albums, Spreadsheets and YouTube.
We're going to see just how easy by accessing Google Calendar and retrieving our events for the next few days. To do that, first download and install the Google Data API .net libraries (you only need the first one on the list). Then create a PowerBuilder.Net WPF project and add references to the Google.GData.AccessControl, Google.GData.Calendar, Google.GData.Client and Google.GData.Extensions assemblies.
You'll want to create a DataWindow to hold the results of the query. For this sample, I just created an external source datawindow with two columns, one to hold the event date/time (eventdate) and another to hold the title of the event (eventtitle).
Once you've done that, add a command button to the window and add code similar to the following to it's clicked script. You'll need to add your own Google email and password information:
service = create Google.GData.Calendar.CalendarService("PBCalendarSampleApp")