Created
December 11, 2009 01:48
-
-
Save zenchild/253917 to your computer and use it in GitHub Desktop.
Exchange Cal to iCal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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