Created
May 24, 2012 20:56
-
-
Save rodrei/2784208 to your computer and use it in GitHub Desktop.
Exchange basic usage
This file contains hidden or 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
credentials = Autodiscover::Credentials.new('<e-mail address>', '<password>') | |
client = Autodiscover::Client.new | |
services = client.get_services(credentials) | |
ews_url = services.ews_url | |
Viewpoint::EWS::EWS.endpoint = ews_url | |
Viewpoint::EWS::EWS.set_auth 'username','password' | |
#believe this fetches the primary calendar. Still need to figure out how to get the list of all calendars. | |
calendar = Viewpoint::EWS::Folder.get_folder(:calendar) | |
items = calendar.items_between(DateTime.now.xmlschema, 1.week.from_now.xmlschema) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment