viewpoint 0.1.27 → 1.0.0.beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. data/README.md +196 -0
  2. data/lib/ews/calendar_accessors.rb +34 -0
  3. data/lib/ews/connection.rb +117 -0
  4. data/lib/ews/connection_helper.rb +35 -0
  5. data/lib/ews/ews_client.rb +71 -0
  6. data/lib/ews/exceptions/exceptions.rb +59 -0
  7. data/lib/ews/folder_accessors.rb +199 -0
  8. data/lib/ews/item_accessors.rb +157 -0
  9. data/lib/ews/mailbox_accessors.rb +87 -0
  10. data/lib/ews/message_accessors.rb +86 -0
  11. data/lib/ews/push_subscription_accessors.rb +33 -0
  12. data/lib/ews/soap.rb +63 -0
  13. data/lib/ews/soap/builders/ews_builder.rb +1011 -0
  14. data/lib/ews/soap/ews_response.rb +83 -0
  15. data/lib/ews/soap/ews_soap_availability_response.rb +58 -0
  16. data/lib/ews/soap/ews_soap_free_busy_response.rb +109 -0
  17. data/lib/ews/soap/ews_soap_response.rb +103 -0
  18. data/lib/ews/soap/exchange_availability.rb +61 -0
  19. data/lib/ews/soap/exchange_data_services.rb +742 -0
  20. data/lib/ews/soap/exchange_notification.rb +146 -0
  21. data/lib/ews/soap/exchange_user_configuration.rb +33 -0
  22. data/lib/ews/soap/exchange_web_service.rb +294 -0
  23. data/lib/{model/attendee.rb → ews/soap/parsers/ews_parser.rb} +20 -14
  24. data/lib/ews/soap/parsers/ews_sax_document.rb +66 -0
  25. data/lib/ews/soap/response_message.rb +78 -0
  26. data/lib/ews/soap/responses/create_attachment_response_message.rb +46 -0
  27. data/lib/{model/meeting_message.rb → ews/soap/responses/create_item_response_message.rb} +7 -10
  28. data/lib/ews/soap/responses/find_item_response_message.rb +80 -0
  29. data/lib/ews/soap/responses/get_events_response_message.rb +53 -0
  30. data/lib/ews/soap/responses/send_notification_response_message.rb +58 -0
  31. data/lib/{model/attachment.rb → ews/soap/responses/subscribe_response_message.rb} +17 -13
  32. data/lib/ews/templates/forward_item.rb +24 -0
  33. data/lib/ews/templates/message.rb +66 -0
  34. data/lib/ews/templates/reply_to_item.rb +25 -0
  35. data/lib/ews/types.rb +146 -0
  36. data/lib/ews/types/attachment.rb +77 -0
  37. data/lib/{model/meeting_cancellation.rb → ews/types/attendee.rb} +9 -8
  38. data/lib/ews/types/calendar_folder.rb +8 -0
  39. data/lib/ews/types/calendar_item.rb +37 -0
  40. data/lib/ews/types/contact.rb +7 -0
  41. data/lib/ews/types/contacts_folder.rb +8 -0
  42. data/lib/ews/types/copied_event.rb +51 -0
  43. data/lib/{soap/handsoap/builder.rb → ews/types/created_event.rb} +5 -2
  44. data/lib/{model/meeting_response.rb → ews/types/deleted_event.rb} +6 -6
  45. data/lib/ews/types/distribution_list.rb +7 -0
  46. data/lib/ews/types/event.rb +62 -0
  47. data/lib/ews/types/file_attachment.rb +65 -0
  48. data/lib/ews/types/folder.rb +60 -0
  49. data/lib/{model/distribution_list.rb → ews/types/free_busy_changed_event.rb} +6 -6
  50. data/lib/ews/types/generic_folder.rb +352 -0
  51. data/lib/ews/types/item.rb +381 -0
  52. data/lib/ews/types/item_attachment.rb +46 -0
  53. data/lib/{model → ews/types}/item_field_uri_map.rb +2 -2
  54. data/lib/ews/types/mailbox_user.rb +156 -0
  55. data/lib/ews/types/meeting_cancellation.rb +7 -0
  56. data/lib/ews/types/meeting_message.rb +7 -0
  57. data/lib/ews/types/meeting_request.rb +7 -0
  58. data/lib/ews/types/meeting_response.rb +7 -0
  59. data/lib/ews/types/message.rb +7 -0
  60. data/lib/ews/types/modified_event.rb +48 -0
  61. data/lib/{model/item_attachment.rb → ews/types/moved_event.rb} +33 -15
  62. data/lib/ews/types/new_mail_event.rb +24 -0
  63. data/lib/ews/types/out_of_office.rb +147 -0
  64. data/lib/ews/types/search_folder.rb +8 -0
  65. data/lib/ews/types/status_event.rb +39 -0
  66. data/lib/ews/types/task.rb +7 -0
  67. data/lib/ews/types/tasks_folder.rb +8 -0
  68. data/lib/viewpoint.rb +82 -106
  69. metadata +99 -67
  70. data/README +0 -114
  71. data/lib/exceptions/exceptions.rb +0 -46
  72. data/lib/model/calendar_folder.rb +0 -67
  73. data/lib/model/calendar_item.rb +0 -267
  74. data/lib/model/contact.rb +0 -238
  75. data/lib/model/contacts_folder.rb +0 -46
  76. data/lib/model/event.rb +0 -116
  77. data/lib/model/file_attachment.rb +0 -53
  78. data/lib/model/folder.rb +0 -47
  79. data/lib/model/generic_folder.rb +0 -471
  80. data/lib/model/item.rb +0 -313
  81. data/lib/model/mailbox_user.rb +0 -146
  82. data/lib/model/meeting_request.rb +0 -39
  83. data/lib/model/message.rb +0 -142
  84. data/lib/model/model.rb +0 -269
  85. data/lib/model/search_folder.rb +0 -48
  86. data/lib/model/task.rb +0 -121
  87. data/lib/model/tasks_folder.rb +0 -44
  88. data/lib/soap/handsoap/builders/ews_build_helpers.rb +0 -383
  89. data/lib/soap/handsoap/builders/ews_builder.rb +0 -146
  90. data/lib/soap/handsoap/ews_service.rb +0 -813
  91. data/lib/soap/handsoap/parser.rb +0 -104
  92. data/lib/soap/handsoap/parsers/ews_parser.rb +0 -246
  93. data/lib/soap/soap_provider.rb +0 -64
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: viewpoint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.27
5
- prerelease:
4
+ version: 1.0.0.beta.1
5
+ prerelease: 6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Dan Wanek
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-03 00:00:00.000000000 Z
12
+ date: 2013-04-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: handsoap
16
- requirement: &7373740 !ruby/object:Gem::Requirement
15
+ name: nokogiri
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,21 +21,15 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *7373740
25
- - !ruby/object:Gem::Dependency
26
- name: nokogiri
27
- requirement: &7373180 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
28
25
  none: false
29
26
  requirements:
30
27
  - - ! '>='
31
28
  - !ruby/object:Gem::Version
32
29
  version: '0'
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: *7373180
36
30
  - !ruby/object:Gem::Dependency
37
31
  name: httpclient
38
- requirement: &7372740 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
39
33
  none: false
40
34
  requirements:
41
35
  - - ! '>='
@@ -43,84 +37,122 @@ dependencies:
43
37
  version: '0'
44
38
  type: :runtime
45
39
  prerelease: false
46
- version_requirements: *7372740
47
- - !ruby/object:Gem::Dependency
48
- name: rubyntlm
49
- requirement: &7372240 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
50
41
  none: false
51
42
  requirements:
52
43
  - - ! '>='
53
44
  - !ruby/object:Gem::Version
54
45
  version: '0'
55
- type: :runtime
56
- prerelease: false
57
- version_requirements: *7372240
58
46
  - !ruby/object:Gem::Dependency
59
- name: icalendar
60
- requirement: &7371700 !ruby/object:Gem::Requirement
47
+ name: rubyntlm
48
+ requirement: !ruby/object:Gem::Requirement
61
49
  none: false
62
50
  requirements:
63
- - - ! '>='
51
+ - - ~>
64
52
  - !ruby/object:Gem::Version
65
- version: 1.1.5
53
+ version: 0.3.1
66
54
  type: :runtime
67
55
  prerelease: false
68
- version_requirements: *7371700
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 0.3.1
69
62
  - !ruby/object:Gem::Dependency
70
- name: mail
71
- requirement: &7371180 !ruby/object:Gem::Requirement
63
+ name: logging
64
+ requirement: !ruby/object:Gem::Requirement
72
65
  none: false
73
66
  requirements:
74
67
  - - ! '>='
75
68
  - !ruby/object:Gem::Version
76
- version: 2.2.5
69
+ version: '0'
77
70
  type: :runtime
78
71
  prerelease: false
79
- version_requirements: *7371180
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
80
78
  description: ! 'A Ruby client access library for Microsoft Exchange Web Services (EWS). Examples
81
79
  can be found here: http://distributed-frostbite.blogspot.com'
82
80
  email: dan.wanek@gmail.com
83
81
  executables: []
84
82
  extensions: []
85
83
  extra_rdoc_files:
86
- - README
84
+ - README.md
87
85
  files:
88
86
  - Changelog.txt
89
- - README
87
+ - README.md
90
88
  - TODO
89
+ - lib/ews/calendar_accessors.rb
90
+ - lib/ews/mailbox_accessors.rb
91
+ - lib/ews/soap.rb
92
+ - lib/ews/soap/ews_response.rb
93
+ - lib/ews/soap/response_message.rb
94
+ - lib/ews/soap/exchange_user_configuration.rb
95
+ - lib/ews/soap/exchange_web_service.rb
96
+ - lib/ews/soap/exchange_data_services.rb
97
+ - lib/ews/soap/exchange_availability.rb
98
+ - lib/ews/soap/ews_soap_response.rb
99
+ - lib/ews/soap/builders/ews_builder.rb
100
+ - lib/ews/soap/responses/get_events_response_message.rb
101
+ - lib/ews/soap/responses/send_notification_response_message.rb
102
+ - lib/ews/soap/responses/create_item_response_message.rb
103
+ - lib/ews/soap/responses/create_attachment_response_message.rb
104
+ - lib/ews/soap/responses/subscribe_response_message.rb
105
+ - lib/ews/soap/responses/find_item_response_message.rb
106
+ - lib/ews/soap/parsers/ews_parser.rb
107
+ - lib/ews/soap/parsers/ews_sax_document.rb
108
+ - lib/ews/soap/exchange_notification.rb
109
+ - lib/ews/soap/ews_soap_free_busy_response.rb
110
+ - lib/ews/soap/ews_soap_availability_response.rb
111
+ - lib/ews/exceptions/exceptions.rb
112
+ - lib/ews/connection.rb
113
+ - lib/ews/message_accessors.rb
114
+ - lib/ews/push_subscription_accessors.rb
115
+ - lib/ews/item_accessors.rb
116
+ - lib/ews/templates/forward_item.rb
117
+ - lib/ews/templates/reply_to_item.rb
118
+ - lib/ews/templates/message.rb
119
+ - lib/ews/ews_client.rb
120
+ - lib/ews/folder_accessors.rb
121
+ - lib/ews/types/generic_folder.rb
122
+ - lib/ews/types/item_attachment.rb
123
+ - lib/ews/types/new_mail_event.rb
124
+ - lib/ews/types/item_field_uri_map.rb
125
+ - lib/ews/types/distribution_list.rb
126
+ - lib/ews/types/file_attachment.rb
127
+ - lib/ews/types/event.rb
128
+ - lib/ews/types/meeting_request.rb
129
+ - lib/ews/types/folder.rb
130
+ - lib/ews/types/contacts_folder.rb
131
+ - lib/ews/types/contact.rb
132
+ - lib/ews/types/meeting_cancellation.rb
133
+ - lib/ews/types/meeting_response.rb
134
+ - lib/ews/types/out_of_office.rb
135
+ - lib/ews/types/item.rb
136
+ - lib/ews/types/message.rb
137
+ - lib/ews/types/free_busy_changed_event.rb
138
+ - lib/ews/types/search_folder.rb
139
+ - lib/ews/types/attachment.rb
140
+ - lib/ews/types/attendee.rb
141
+ - lib/ews/types/calendar_item.rb
142
+ - lib/ews/types/status_event.rb
143
+ - lib/ews/types/meeting_message.rb
144
+ - lib/ews/types/moved_event.rb
145
+ - lib/ews/types/deleted_event.rb
146
+ - lib/ews/types/calendar_folder.rb
147
+ - lib/ews/types/modified_event.rb
148
+ - lib/ews/types/tasks_folder.rb
149
+ - lib/ews/types/task.rb
150
+ - lib/ews/types/copied_event.rb
151
+ - lib/ews/types/created_event.rb
152
+ - lib/ews/types/mailbox_user.rb
153
+ - lib/ews/types.rb
154
+ - lib/ews/connection_helper.rb
91
155
  - lib/viewpoint.rb
92
- - lib/exceptions/exceptions.rb
93
- - lib/model/mailbox_user.rb
94
- - lib/model/model.rb
95
- - lib/model/generic_folder.rb
96
- - lib/model/distribution_list.rb
97
- - lib/model/attendee.rb
98
- - lib/model/meeting_response.rb
99
- - lib/model/meeting_cancellation.rb
100
- - lib/model/task.rb
101
- - lib/model/event.rb
102
- - lib/model/tasks_folder.rb
103
- - lib/model/attachment.rb
104
- - lib/model/contacts_folder.rb
105
- - lib/model/meeting_request.rb
106
- - lib/model/item_attachment.rb
107
- - lib/model/meeting_message.rb
108
- - lib/model/folder.rb
109
- - lib/model/search_folder.rb
110
- - lib/model/contact.rb
111
- - lib/model/item.rb
112
- - lib/model/calendar_folder.rb
113
- - lib/model/item_field_uri_map.rb
114
- - lib/model/message.rb
115
- - lib/model/file_attachment.rb
116
- - lib/model/calendar_item.rb
117
- - lib/soap/handsoap/parsers/ews_parser.rb
118
- - lib/soap/handsoap/parser.rb
119
- - lib/soap/handsoap/builder.rb
120
- - lib/soap/handsoap/builders/ews_builder.rb
121
- - lib/soap/handsoap/builders/ews_build_helpers.rb
122
- - lib/soap/handsoap/ews_service.rb
123
- - lib/soap/soap_provider.rb
124
156
  - lib/extensions/string.rb
125
157
  homepage: http://github.com/zenchild/Viewpoint
126
158
  licenses: []
@@ -137,16 +169,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
137
169
  requirements:
138
170
  - - ! '>='
139
171
  - !ruby/object:Gem::Version
140
- version: 1.8.7
172
+ version: 1.9.1
141
173
  required_rubygems_version: !ruby/object:Gem::Requirement
142
174
  none: false
143
175
  requirements:
144
- - - ! '>='
176
+ - - ! '>'
145
177
  - !ruby/object:Gem::Version
146
- version: '0'
178
+ version: 1.3.1
147
179
  requirements: []
148
180
  rubyforge_project:
149
- rubygems_version: 1.8.17
181
+ rubygems_version: 1.8.24
150
182
  signing_key:
151
183
  specification_version: 3
152
184
  summary: A Ruby client access library for Microsoft Exchange Web Services (EWS)
data/README DELETED
@@ -1,114 +0,0 @@
1
- --------------------------------------------------------------------------
2
- Viewpoint for Exchange Web Services
3
- http://github.com/zenchild/Viewpoint/wiki
4
- --------------------------------------------------------------------------
5
- This program attempts to create a client access library for Exchange Web
6
- Services (EWS) in Ruby.
7
-
8
- !!!CAUTION!!! This is currently BETA code and has changed dramatically from
9
- the original version of Viewpoint which was based on Soap4r. This version
10
- has essentially been gutted and written on top of Handsoap. Development
11
- has been much more flexible, but the interface to Viewpoint has changed
12
- quite a bit. I have tried to write good code comments and I will keep
13
- enhancing this. I will also try and post examples on my blog as I write
14
- them or they are asked for.
15
-
16
- BLOG: http://distributed-frostbite.blogspot.com/
17
- Add me in LinkedIn: http://www.linkedin.com/in/danwanek
18
- Find me on irc.freenode.net in #ruby-lang (zenChild)
19
-
20
- --------------------------------------------------------------------------
21
- MAJOR CHANGES TO THE FIRST VERSION:
22
-
23
- New SOAP backend
24
- Viewpoint now uses Handsoap as its back-end instead of soap4r. While
25
- soap4r does some very nice things for you automatically, it ends up
26
- making your code base fairly large and it complicates any customizations
27
- that you might want to make. One example is adding custom headers. Soap4r
28
- required you to create a subclass to use as a sort of hook. I can do the
29
- same thing in Handsoap with a one-liner in the services #on_create_document
30
- method.
31
-
32
- Models are completely rewritten
33
- The models are completely new and not backward compatible with the old
34
- version of Viewpoint. Some of the methods still exist, but don't count
35
- on them. I've tried to make this version much more extensible than the
36
- last.
37
-
38
- Delegate access is supported
39
- One thing that was often asked for, but missing from the previous version
40
- was delegate access to mailboxes and calendars. This is now supported via
41
- the 'act_as' parameter to the GenericFolder::get_folder method. For example:
42
- ofolder = Folder.get_folder(:inbox,'otheruser@test.com')
43
- If your user has delegate access to the Inbox for otheruser@test.com this
44
- operation will retrieve their inbox and allow you to manipulate it as you
45
- would with your own Inbox.
46
-
47
- There is also some support for manipulation of delegate access itself via
48
- the methods MailboxUser#add_delegate!, MailboxUser#update_delegate!, and
49
- MailboxUser#get_delegate_info.
50
-
51
- Misc other changes
52
- Since it's a complete rewrite there are tons of other changes that you'll
53
- notice. I've tried to keep the code comments coming so stay tuned to the
54
- API docs for library information. I'll also be posting more examples to
55
- my blog.
56
-
57
- --------------------------------------------------------------------------
58
- TO USE:
59
- require 'rubygems'
60
- require 'viewpoint'
61
- # See REQUIRED GEMS below
62
-
63
- REQUIRED GEMS:
64
-
65
- # Handsoap (Thanks jrun for pointing me this way!)
66
- gem install -r handsoap
67
- # Nokogiri XML Parser
68
- gem install -r nokogiri
69
- # HttpClient
70
- gem install -r httpclient
71
- # NTLM Library
72
- gem install -r rubyntlm
73
-
74
- # iCalendar (still forthcoming in this release)
75
- gem install -r icalendar
76
-
77
- --------------------------------------------------------------------------
78
- DESIGN GOALS/GUIDELINES:
79
-
80
- 1. The SOAP back-end should not know about the Model.
81
- I went around and around on this one for awhile. There are some
82
- simplicity advantages to creating Model objects within the SOAP
83
- responses, but I ultimately decided against it so that one could use
84
- the SOAP back-end without the Model. Essentially the SOAP classes
85
- pass back a Hash that the Model uses to create its own objects.
86
-
87
- 2. The use of Hashes is not a crime.
88
- While some people decidedly do not like Hashes and believe complex
89
- hashing should be in the form of objects, there are some instances
90
- where hashing is just plain simpler and flexible. To that end, I use
91
- hashes pretty extensively in Viewpoint, both for objects being passed
92
- to the SOAP back-end and returned from it.
93
-
94
- 3. Follow EWS naming conventions where it makes sense.
95
- I try and follow the naming conventions of the Exchange Web Service
96
- operations as much as it makes sense. There are some things howerver
97
- where they do not and I have deviated somewhat. For example,
98
- an instance method named delete_folder doesn't make much sense, but
99
- an instance method named delete! is pretty clear what it deletes.
100
- --------------------------------------------------------------------------
101
- !!!SHOUTS OUT!!!
102
- --------------------------------------------------------------------------
103
- * Thanks to Harold Lee (https://github.com/haroldl) for working on the
104
- get_user_availability code.
105
- --------------------------------------------------------------------------
106
- DISCLAIMER: If you see something that could be done better or would like
107
- to help out in the development of this code please feel free to clone the
108
- 'git' repository and send me patches:
109
- git clone git://github.com/zenchild/Viewpoint.git
110
- or add an issue on GitHub:
111
- http://github.com/zenchild/Viewpoint/issues
112
-
113
- Cheers!
114
- --------------------------------------------------------------------------
@@ -1,46 +0,0 @@
1
- =begin
2
- This file is part of Viewpoint; the Ruby library for Microsoft Exchange Web Services.
3
-
4
- Copyright © 2011 Dan Wanek <dan.wanek@gmail.com>
5
-
6
- Licensed under the Apache License, Version 2.0 (the "License");
7
- you may not use this file except in compliance with the License.
8
- You may obtain a copy of the License at
9
-
10
- http://www.apache.org/licenses/LICENSE-2.0
11
-
12
- Unless required by applicable law or agreed to in writing, software
13
- distributed under the License is distributed on an "AS IS" BASIS,
14
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- See the License for the specific language governing permissions and
16
- limitations under the License.
17
- =end
18
- module Viewpoint
19
- module EWS
20
-
21
- # Generic Ews Error
22
- class EwsError < StandardError
23
- end
24
-
25
- # Raise when authentication/authorization issues occur.
26
- class EwsLoginError < StandardError
27
- end
28
-
29
- # Raised when a user tries to query a folder subscription after the
30
- # subscription has timed out.
31
- class EwsSubscriptionTimeout < StandardError
32
- end
33
-
34
- # Represents a function in EWS that is not yet implemented in Viewpoint
35
- class EwsNotImplemented < StandardError
36
- end
37
-
38
- # Raised when an method is called in the wrong way
39
- class EwsBadArgumentError < StandardError; end
40
-
41
- # Raised when a folder that is asked for is not found
42
- class EwsFolderNotFound < StandardError; end
43
-
44
- end # EWS
45
- end # Viewpoint
46
-
@@ -1,67 +0,0 @@
1
- =begin
2
- This file is part of Viewpoint; the Ruby library for Microsoft Exchange Web Services.
3
-
4
- Copyright © 2011 Dan Wanek <dan.wanek@gmail.com>
5
-
6
- Licensed under the Apache License, Version 2.0 (the "License");
7
- you may not use this file except in compliance with the License.
8
- You may obtain a copy of the License at
9
-
10
- http://www.apache.org/licenses/LICENSE-2.0
11
-
12
- Unless required by applicable law or agreed to in writing, software
13
- distributed under the License is distributed on an "AS IS" BASIS,
14
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- See the License for the specific language governing permissions and
16
- limitations under the License.
17
- =end
18
-
19
- module Viewpoint
20
- module EWS
21
- class CalendarFolder < GenericFolder
22
-
23
- # Find folders of type Task
24
- # @see GenericFolder.find_folders
25
- # @param [String,Symbol] root An folder id, either a DistinguishedFolderId (must me a Symbol)
26
- # or a FolderId (String)
27
- # @param [String] traversal Shallow/Deep/SoftDeleted
28
- # @param [String] shape the shape to return IdOnly/Default/AllProperties
29
- # @param [optional, String] folder_type an optional folder type to limit the search to like 'IPF.Task'
30
- # @return [Array] Returns an Array of Folder or subclasses of Folder
31
- def self.find_folders(root = :msgfolderroot, traversal = 'Deep', shape = 'Default', folder_type = 'IPF.Appointment')
32
- super(root, traversal, shape, folder_type)
33
- end
34
-
35
-
36
- # initialize with an item of CalendarFolderType
37
- def initialize(folder)
38
- super(folder)
39
-
40
- # @todo Handle:
41
- # <SharingEffectiveRights/>
42
- end
43
-
44
- # Fetch only items from today (since midnight)
45
- def todays_items(opts = {})
46
- #This is a bit convoluted for pre-1.9.x ruby versions that don't support to_datetime
47
- items_between(DateTime.parse(Date.today.to_s), DateTime.parse((Date.today + 1).to_s), opts)
48
- end
49
-
50
- # Fetch items since a give DateTime
51
- # @param [DateTime] start_date_time the time to fetch Items since.
52
- def items_since(start_date_time, opts = {})
53
- items_between(start_date_time, DateTime.now, opts)
54
- end
55
-
56
- # Find Calendar Items between two dates
57
- # @param [DateTime] start_date the date to start the search from
58
- # @param [DateTime] end_date the date to end the search at
59
- # @param [Hash] opts misc opts like restrictions, etc
60
- def items_between(start_date, end_date, opts = {})
61
- opts[:calendar_view] = {:max_entries_returned => 256, :start_date => start_date, :end_date => end_date}
62
- find_items(opts)
63
- end
64
-
65
- end # CalendarFolder
66
- end # EWS
67
- end # Viewpoint