Class: Viewpoint::EWSClient
- Inherits:
-
Object
- Object
- Viewpoint::EWSClient
- Includes:
- EWS, Viewpoint::EWS::CalendarAccessors, Viewpoint::EWS::ConvertAccessors, Viewpoint::EWS::FolderAccessors, Viewpoint::EWS::ItemAccessors, Viewpoint::EWS::MailboxAccessors, Viewpoint::EWS::MessageAccessors, Viewpoint::EWS::PushSubscriptionAccessors, Viewpoint::EWS::RoomAccessors, Viewpoint::EWS::RoomlistAccessors, StringUtils
- Defined in:
- lib/ews/ews_client.rb
Overview
This class is the glue between the Models and the Web Service.
Constant Summary
Constants included from StringUtils
Constants included from EWS
Constants included from Viewpoint::EWS::FolderAccessors
Viewpoint::EWS::FolderAccessors::FOLDER_TYPE_MAP
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
readonly
The instance of Viewpoint::EWS::SOAP::ExchangeWebService.
-
#ews ⇒ Object
readonly
The instance of Viewpoint::EWS::SOAP::ExchangeWebService.
-
#username ⇒ Object
readonly
The instance of Viewpoint::EWS::SOAP::ExchangeWebService.
Attributes included from EWS
Instance Method Summary collapse
- #auto_deepen=(deepen) ⇒ Object
-
#initialize(endpoint, username, password, opts = {}) ⇒ EWSClient
constructor
Initialize the EWSClient instance.
- #set_auto_deepen(deepen, behavior = :raise) ⇒ Object
-
#set_time_zone(microsoft_time_zone_id) ⇒ Object
Specify a default time zone context for all time attributes.
Methods included from StringUtils
Methods included from Viewpoint::EWS::ConvertAccessors
Methods included from EWS
#remove_impersonation, root_logger, #set_impersonation
Methods included from Viewpoint::EWS::RoomlistAccessors
#get_room_lists, #roomlist_email, #roomlist_name
Methods included from Viewpoint::EWS::RoomAccessors
#get_rooms, #room_email, #room_name
Methods included from Viewpoint::EWS::CalendarAccessors
#event_busy_type, #event_end_time, #event_start_time
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, #export_items, #find_items, #get_item, #get_items, #move_items
Methods included from Viewpoint::EWS::FolderAccessors
#folders, #get_folder, #get_folder_by_name, #make_folder, #sync_folders
Constructor Details
#initialize(endpoint, username, password, opts = {}) ⇒ EWSClient
Initialize the EWSClient instance.
40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/ews/ews_client.rb', line 40 def initialize(endpoint, username, password, opts = {}) # dup all. @see ticket https://github.com/zenchild/Viewpoint/issues/68 @endpoint = endpoint.dup @username = username.dup password = password.dup opts = opts.dup http_klass = opts[:http_class] || Viewpoint::EWS::Connection con = http_klass.new(endpoint, opts[:http_opts] || {}) con.set_auth @username, password @ews = SOAP::ExchangeWebService.new(con, opts) end |
Instance Attribute Details
#endpoint ⇒ Object (readonly)
The instance of Viewpoint::EWS::SOAP::ExchangeWebService
26 27 28 |
# File 'lib/ews/ews_client.rb', line 26 def endpoint @endpoint end |
#ews ⇒ Object (readonly)
The instance of Viewpoint::EWS::SOAP::ExchangeWebService
26 27 28 |
# File 'lib/ews/ews_client.rb', line 26 def ews @ews end |
#username ⇒ Object (readonly)
The instance of Viewpoint::EWS::SOAP::ExchangeWebService
26 27 28 |
# File 'lib/ews/ews_client.rb', line 26 def username @username end |
Instance Method Details
#auto_deepen=(deepen) ⇒ Object
66 67 68 |
# File 'lib/ews/ews_client.rb', line 66 def auto_deepen=(deepen) set_auto_deepen deepen end |
#set_auto_deepen(deepen, behavior = :raise) ⇒ Object
56 57 58 59 60 61 62 63 64 |
# File 'lib/ews/ews_client.rb', line 56 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 |
#set_time_zone(microsoft_time_zone_id) ⇒ Object
A list of time zones known by the server can be requested via Viewpoint::EWS::SOAP::ExchangeTimeZones#get_time_zones
Specify a default time zone context for all time attributes
73 74 75 |
# File 'lib/ews/ews_client.rb', line 73 def set_time_zone(microsoft_time_zone_id) ews.set_time_zone_context microsoft_time_zone_id end |