Today's Smalltalk Daily looks at integrating a feed from Google calendar with the syndication handling code that is used in BottomFeeder. The code I used in the screencast is below - to load that code, get the packages GCal-Example2 and Syndication-Handling from the public store repository. Make sure to load the latest NetworkAppUtilities as well; the version that loads from disk is not the latest version. To skip to the video, click here.
"get the request token"
gAuth := AuthRequest
requestTokenFor: 'cl'
user: username
password: password
clientName: 'Cincom-VisualWorks-771'.
"get the response as XML"
serviceResponse := ServiceRequest
makeRequestWith: gAuth
requestPrepObject: ExampleRequestPrep new.
xml := serviceResponse contents.
"get the feed object"
feed := Constructor getFeedFromStream: xml readStream.
To watch now, use the viewer below:
If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.
You can also watch it on YouTube:
Technorati Tags:
google, smalltalk, rss, atom, calendar