Class: Viewpoint::EWSClient
- Inherits:
-
Object
- Object
- Viewpoint::EWSClient
- Includes:
- EWS, Viewpoint::EWS::CalendarAccessors, Viewpoint::EWS::FolderAccessors, Viewpoint::EWS::ItemAccessors, Viewpoint::EWS::MailboxAccessors, Viewpoint::EWS::MessageAccessors, Viewpoint::EWS::PushSubscriptionAccessors
- Defined in:
- lib/ews/ews_client.rb
Overview
This class is the glue between the Models and the Web Service.
Constant Summary
Constant Summary
Constants included from Viewpoint::EWS::FolderAccessors
Viewpoint::EWS::FolderAccessors::FOLDER_TYPE_MAP
Instance Attribute Summary (collapse)
-
- (Object) ews
readonly
The instance of Viewpoint::EWS::SOAP::ExchangeWebService.
Attributes included from EWS
Instance Method Summary (collapse)
- - (Object) auto_deepen=(deepen)
-
- (EWSClient) initialize(endpoint, user = nil, pass = nil, opts = {})
constructor
Initialize the EWSClient instance.
- - (Object) set_auto_deepen(deepen, behavior = :raise)
Methods included from Viewpoint::EWS::CalendarAccessors
#event_busy_type, #event_end_time, #event_start_time
Methods included from EWS
Methods included from Viewpoint::EWS::PushSubscriptionAccessors
Methods included from Viewpoint::EWS::MailboxAccessors
#get_user_availability, #search_contacts
Methods included from Viewpoint::EWS::MessageAccessors
Methods included from Viewpoint::EWS::ItemAccessors
#copy_items, #find_items, #get_item, #move_items
Methods included from Viewpoint::EWS::FolderAccessors
#folders, #get_folder, #get_folder_by_name, #make_folder, #sync_folders
Constructor Details
- (EWSClient) initialize(endpoint, user = nil, pass = nil, opts = {})
Initialize the EWSClient instance.
33 34 35 36 37 38 39 40 41 |
# File 'lib/ews/ews_client.rb', line 33 def initialize(endpoint, user = nil, pass = nil, opts = {}) # dup all. @see ticket https://github.com/zenchild/Viewpoint/issues/68 endpoint, user, pass = endpoint.dup, user.dup, pass.dup opts = opts.dup http_klass = opts[:http_class] || Viewpoint::EWS::Connection con = http_klass.new(endpoint, opts[:http_opts] || {}) con.set_auth(user,pass) if(user && pass) @ews = SOAP::ExchangeWebService.new(con, opts) end |
Instance Attribute Details
- (Object) ews (readonly)
The instance of Viewpoint::EWS::SOAP::ExchangeWebService
19 20 21 |
# File 'lib/ews/ews_client.rb', line 19 def ews @ews end |
Instance Method Details
- (Object) auto_deepen=(deepen)
57 58 59 |
# File 'lib/ews/ews_client.rb', line 57 def auto_deepen=(deepen) set_auto_deepen deepen end |
- (Object) set_auto_deepen(deepen, behavior = :raise)
47 48 49 50 51 52 53 54 55 |
# File 'lib/ews/ews_client.rb', line 47 def set_auto_deepen(deepen, behavior = :raise) if deepen @ews.auto_deepen = true else behavior = [:raise, :nil].include?(behavior) ? behavior : :raise @ews.no_auto_deepen_behavior = behavior @ews.auto_deepen = false end end |