. .


Smalltalk Daily 09/30/10: Using the Google Calendar API

September 30, 2010 8:35:01.747

Today's Smalltalk Daily looks at using the client authentication to Google we built yesterday. Today's screencast builds a small example of interfacing to Google to get your calendar settings. The code I'm demonstrating is in the public store repository under the name GCal-Example - the usage in the screencast is below. To skip to the video, click here..

"get the request token - cl is the calendar service"
gAuth := AuthRequest 
	requestTokenFor: 'cl' 
	user: username
	password: password
	clientName: 'Cincom-VisualWorks-771'.

"get settings the hard way"
settingsRequest := SettingsRequest new user: username.
settingsResponse := ServiceRequest
					makeRequestWith: gAuth
					requestPrepObject: settingsRequest.
CalendarSettings from: ((JsonReader 
		readFrom: settingsResponse contents readStream)
	 at: 'data').

"make it simpler"
SettingsRequester getSettingsFor: username using: gAuth

If you can't see the embedded video directly, you can go directly to YouTube for it. To watch now, click on the viewer below:

You can follow the Smalltalk channel on YouTube for all the "Smalltalk Daily" videos. You can also check out the videos on Vimeo, where the quality is higher, or over on Facebook, if you are a member.

You can download the video directly here. If you need the video in a Windows Media format, then download that here. If you like this kind of video, why not subscribe to "Smalltalk Daily"?

Technorati Tags: , , ,

posted by James Robertson

 Share Tweet This