Skip to content

Instantly share code, notes, and snippets.

@rodrei
Created May 24, 2012 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rodrei/2784208 to your computer and use it in GitHub Desktop.
Save rodrei/2784208 to your computer and use it in GitHub Desktop.
Exchange basic usage
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