Skip to content

Instantly share code, notes, and snippets.

@zenchild
Created December 11, 2009 01:48
Show Gist options
  • Save zenchild/253917 to your computer and use it in GitHub Desktop.
Save zenchild/253917 to your computer and use it in GitHub Desktop.
Exchange Cal to iCal
require 'rubygems'
require 'viewpoint'
# Get the instance of Viewpoint. This is a singleton class and will
# have only one instance ever instantiated no matter how many times
# you call #instance
vp = Viewpoint::ExchWebServ.instance
# Set authentication parameters (probably NTLM)
vp.authenticate
# This actually calls EWS's FindFolder SOAP message
vp.find_folders
# Get the instance 'Calendar' and convert it
cal = vp.get_folder("Calendar")
ical = cal.to_ical
puts ical.to_ical
# See: http://github.com/zenchild/Viewpoint/blob/master/lib/viewpoint/calendar.rb#L105 for more
# in depth information about what is going on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment