gcalapi 0.1.1 → 0.1.2

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 (37) hide show
  1. data/Rakefile +1 -1
  2. data/VERSION +1 -1
  3. data/html/classes/GoogleCalendar.html +149 -149
  4. data/html/classes/GoogleCalendar/AuthSubFailed.html +162 -162
  5. data/html/classes/GoogleCalendar/AuthSubUtil.html +352 -352
  6. data/html/classes/GoogleCalendar/AuthenticationFailed.html +110 -110
  7. data/html/classes/GoogleCalendar/Calendar.html +381 -381
  8. data/html/classes/GoogleCalendar/Event.html +699 -699
  9. data/html/classes/GoogleCalendar/EventDeleteFailed.html +110 -110
  10. data/html/classes/GoogleCalendar/EventGetFailed.html +110 -110
  11. data/html/classes/GoogleCalendar/EventInsertFailed.html +110 -110
  12. data/html/classes/GoogleCalendar/EventUpdateFailed.html +110 -110
  13. data/html/classes/GoogleCalendar/InvalidCalendarURL.html +110 -110
  14. data/html/classes/GoogleCalendar/Service.html +245 -305
  15. data/html/classes/GoogleCalendar/ServiceAuthSub.html +176 -176
  16. data/html/classes/GoogleCalendar/ServiceBase.html +752 -693
  17. data/html/created.rid +1 -1
  18. data/html/files/README.html +117 -117
  19. data/html/files/lib/googlecalendar/auth_sub_util_rb.html +110 -110
  20. data/html/files/lib/googlecalendar/calendar_rb.html +109 -109
  21. data/html/files/lib/googlecalendar/event_rb.html +109 -109
  22. data/html/files/lib/googlecalendar/service_auth_sub_rb.html +107 -107
  23. data/html/files/lib/googlecalendar/service_base_rb.html +113 -113
  24. data/html/files/lib/googlecalendar/service_rb.html +107 -107
  25. data/html/fr_class_index.html +39 -39
  26. data/html/fr_file_index.html +32 -32
  27. data/html/fr_method_index.html +75 -75
  28. data/html/index.html +23 -23
  29. data/html/rdoc-style.css +207 -207
  30. data/lib/googlecalendar/service.rb +1 -18
  31. data/lib/googlecalendar/service_base.rb +17 -0
  32. data/test/03_authsub_test.rb +14 -2
  33. data/test/all.bat +1 -0
  34. data/test/all.sh +0 -0
  35. data/test/each.sh +0 -0
  36. metadata +47 -70
  37. data/VERSION.BAK +0 -1
@@ -1,326 +1,326 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: GoogleCalendar::Event</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">GoogleCalendar::Event</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/googlecalendar/event_rb.html">
59
- lib/googlecalendar/event.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- Object
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
- <div id="description">
82
- <h1>Summary</h1>
83
- <pre>
84
- this class represents an event of a calendar.
85
- </pre>
86
- <h1>How to use this class</h1>
87
- <ul>
88
- <li>MAIL: your gmail account.
89
-
90
- </li>
91
- <li>PASS: password for MAIL.
92
-
93
- </li>
94
- <li>FEED: a calendar&#8216;s editable feed url.
95
-
96
- <ol>
97
- <li>your default calendar&#8216;s feed url is defined in
98
- Calendar::DEFAULT_CALENDAR_FEED. To <a href="Event.html#M000017">get</a>
99
- other calendar&#8216;s feed url, read below.
100
-
101
- </li>
102
- <li>click &quot;Manage Calendars&quot; in Google <a
103
- href="Calendar.html">Calendar</a>.
104
-
105
- </li>
106
- <li>select a calendar you want to edit.
107
-
108
- </li>
109
- <li>copy private address of XML.
110
-
111
- </li>
112
- <li>change the address&#8216;s end into &quot;/private/full&quot;. If your
113
- calendar&#8216;s private XML address is
114
-
115
- <pre>
116
- &quot;http://www.google.com/calendar/feeds/XXX@group.calendar.google.com/private-aaaaaa/basic&quot;,
117
- </pre>
118
- <p>
119
- the editable feed url is
120
- </p>
121
- <pre>
122
- &quot;http://www.google.com/calendar/feeds/XXX@group.calendar.google.com/private/full&quot;.
123
- </pre>
124
- </li>
125
- <li>for detail, See <a
126
- href="http://code.google.com/apis/gdata/calendar.html#Visibility">code.google.com/apis/gdata/calendar.html#Visibility</a>.
127
-
128
- </li>
129
- </ol>
130
- </li>
131
- </ul>
132
- <h2>create <a href="Event.html#M000010">new</a> events</h2>
133
- <pre>
134
- cal = Calendar.new(Service.new(MAIL, PASS), FEED)
135
- event = cal.create_event
136
- event.title = &quot;event title&quot;
137
- event.desc = &quot;event description&quot;
138
- event.where = &quot;event location&quot;
139
- event.st = Time.mktime(2006, 9, 21, 01, 0, 0)
140
- event.en = Time.mktime(2006, 9, 21, 03, 0, 0)
141
- event.save!
142
- </pre>
143
- <h2>udpate existing events</h2>
144
- <pre>
145
- cal = Calendar.new(Service.new(MAIL, PASS), FEED)
146
- event = cal.events[0]
147
- event.title = &quot;event title&quot;
148
- event.desc = &quot;event description&quot;
149
- event.where = &quot;event location&quot;
150
- event.st = Time.mktime(2006, 9, 21, 01, 0, 0)
151
- event.en = Time.mktime(2006, 9, 21, 03, 0, 0)
152
- event.save!
153
- </pre>
154
- <h2>delete events</h2>
155
- <pre>
156
- cal = Calendar.new(Service.new(MAIL, PASS), FEED)
157
- event = cal.events[0]
158
- event.destroy!
159
- </pre>
160
- <h2>create all day events.</h2>
161
- <pre>
162
- event = cal.create_event
163
- event.title = &quot;1 days event&quot;
164
- event.st = Time.mktime(2006, 9, 22)
165
- event.en = Time.mktime(2006, 9, 23)
166
- event.allday = true
167
- event.save!
168
-
169
- event = cal.create_event
170
- event.title = &quot;2 days event&quot;
171
- event.st = Time.mktime(2006, 9, 22)
172
- event.en = Time.mktime(2006, 9, 24)
173
- event.allday = true
174
- event.save!
175
- </pre>
176
- <h2><a href="Event.html#M000017">get</a> existint event</h2>
177
- <pre>
178
- event = Event.get(FEED, Service.new(MAIL, PASS))
179
- </pre>
180
- <h1>TODO</h1>
181
- <ul>
182
- <li>this class doesn&#8216;t support recurring event.
183
-
184
- </li>
185
- </ul>
186
-
187
- </div>
188
-
189
-
190
- </div>
191
-
192
- <div id="method-list">
193
- <h3 class="section-bar">Methods</h3>
194
-
195
- <div class="name-list">
196
- <a href="#M000014">destroy</a>&nbsp;&nbsp;
197
- <a href="#M000015">destroy!</a>&nbsp;&nbsp;
198
- <a href="#M000018">do_without_exception</a>&nbsp;&nbsp;
199
- <a href="#M000017">get</a>&nbsp;&nbsp;
200
- <a href="#M000020">instance_to_xml</a>&nbsp;&nbsp;
201
- <a href="#M000011">load_xml</a>&nbsp;&nbsp;
202
- <a href="#M000010">new</a>&nbsp;&nbsp;
203
- <a href="#M000012">save</a>&nbsp;&nbsp;
204
- <a href="#M000013">save!</a>&nbsp;&nbsp;
205
- <a href="#M000021">str_to_time</a>&nbsp;&nbsp;
206
- <a href="#M000022">time_to_str</a>&nbsp;&nbsp;
207
- <a href="#M000016">to_s</a>&nbsp;&nbsp;
208
- <a href="#M000019">xml_to_instance</a>&nbsp;&nbsp;
209
- </div>
210
- </div>
211
-
212
- </div>
213
-
214
-
215
- <!-- if includes -->
216
-
217
- <div id="section">
218
-
219
-
220
- <div id="constants-list">
221
- <h3 class="section-bar">Constants</h3>
222
-
223
- <div class="name-list">
224
- <table summary="Constants">
225
- <tr class="top-aligned-row context-row">
226
- <td class="context-item-name">ATTRIBUTES_MAP</td>
227
- <td>=</td>
228
- <td class="context-item-value">{ &quot;title&quot; =&gt; { &quot;element&quot; =&gt; &quot;title&quot;}, &quot;desc&quot; =&gt; { &quot;element&quot; =&gt; &quot;content&quot;}, &quot;where&quot; =&gt; { &quot;element&quot; =&gt; &quot;gd:where&quot;, &quot;attribute&quot; =&gt; &quot;valueString&quot; }, &quot;st&quot; =&gt; { &quot;element&quot; =&gt; &quot;gd:when&quot;, &quot;attribute&quot; =&gt; &quot;startTime&quot;, &quot;to_xml&quot; =&gt; &quot;time_to_str&quot;, &quot;from_xml&quot; =&gt; &quot;str_to_time&quot; }, &quot;en&quot; =&gt; { &quot;element&quot; =&gt; &quot;gd:when&quot;, &quot;attribute&quot; =&gt; &quot;endTime&quot;, &quot;to_xml&quot; =&gt; &quot;time_to_str&quot;, &quot;from_xml&quot; =&gt; &quot;str_to_time&quot; }</td>
229
- </tr>
230
- <tr class="top-aligned-row context-row">
231
- <td class="context-item-name">SKELTON</td>
232
- <td>=</td>
233
- <td class="context-item-value">&lt;&lt;XML &lt;?xml version='1.0' encoding='UTF-8'?&gt; &lt;entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'&gt; &lt;category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event'&gt;&lt;/category&gt; &lt;title type='text'&gt;&lt;/title&gt; &lt;content type='text'&gt;&lt;/content&gt; &lt;gd:transparency value='http://schemas.google.com/g/2005#event.opaque'&gt;&lt;/gd:transparency&gt; &lt;gd:eventStatus value='http://schemas.google.com/g/2005#event.confirmed'&gt;&lt;/gd:eventStatus&gt; &lt;/entry&gt; XML</td>
234
- </tr>
235
- </table>
236
- </div>
237
- </div>
238
-
239
-
240
-
241
- <div id="attribute-list">
242
- <h3 class="section-bar">Attributes</h3>
243
-
244
- <div class="name-list">
245
- <table>
246
- <tr class="top-aligned-row context-row">
247
- <td class="context-item-name">allday</td>
248
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
249
- <td class="context-item-desc"></td>
250
- </tr>
251
- <tr class="top-aligned-row context-row">
252
- <td class="context-item-name">desc</td>
253
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
254
- <td class="context-item-desc"></td>
255
- </tr>
256
- <tr class="top-aligned-row context-row">
257
- <td class="context-item-name">en</td>
258
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
259
- <td class="context-item-desc"></td>
260
- </tr>
261
- <tr class="top-aligned-row context-row">
262
- <td class="context-item-name">feed</td>
263
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
264
- <td class="context-item-desc"></td>
265
- </tr>
266
- <tr class="top-aligned-row context-row">
267
- <td class="context-item-name">srv</td>
268
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
269
- <td class="context-item-desc"></td>
270
- </tr>
271
- <tr class="top-aligned-row context-row">
272
- <td class="context-item-name">st</td>
273
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
274
- <td class="context-item-desc"></td>
275
- </tr>
276
- <tr class="top-aligned-row context-row">
277
- <td class="context-item-name">status</td>
278
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
279
- <td class="context-item-desc"></td>
280
- </tr>
281
- <tr class="top-aligned-row context-row">
282
- <td class="context-item-name">title</td>
283
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
284
- <td class="context-item-desc"></td>
285
- </tr>
286
- <tr class="top-aligned-row context-row">
287
- <td class="context-item-name">where</td>
288
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
289
- <td class="context-item-desc"></td>
290
- </tr>
291
- <tr class="top-aligned-row context-row">
292
- <td class="context-item-name">xml</td>
293
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
294
- <td class="context-item-desc"></td>
295
- </tr>
296
- </table>
297
- </div>
298
- </div>
299
-
300
-
301
-
302
- <!-- if method_list -->
303
- <div id="methods">
304
- <h3 class="section-bar">Public Class methods</h3>
305
-
306
- <div id="method-M000017" class="method-detail">
307
- <a name="M000017"></a>
308
-
309
- <div class="method-heading">
310
- <a href="#M000017" class="method-signature">
311
- <span class="method-name">get</span><span class="method-args">(feed, srv)</span>
312
- </a>
313
- </div>
314
-
315
- <div class="method-description">
316
- <p>
317
- <a href="Event.html#M000017">get</a> event from event feed
318
- </p>
319
- <p><a class="source-toggle" href="#"
320
- onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
321
- <div class="method-source-code" id="M000017-source">
322
- <pre>
323
- <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 168</span>
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: GoogleCalendar::Event</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">GoogleCalendar::Event</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/googlecalendar/event_rb.html">
59
+ lib/googlecalendar/event.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <h1>Summary</h1>
83
+ <pre>
84
+ this class represents an event of a calendar.
85
+ </pre>
86
+ <h1>How to use this class</h1>
87
+ <ul>
88
+ <li>MAIL: your gmail account.
89
+
90
+ </li>
91
+ <li>PASS: password for MAIL.
92
+
93
+ </li>
94
+ <li>FEED: a calendar&#8216;s editable feed url.
95
+
96
+ <ol>
97
+ <li>your default calendar&#8216;s feed url is defined in
98
+ Calendar::DEFAULT_CALENDAR_FEED. To <a href="Event.html#M000023">get</a>
99
+ other calendar&#8216;s feed url, read below.
100
+
101
+ </li>
102
+ <li>click &quot;Manage Calendars&quot; in Google <a
103
+ href="Calendar.html">Calendar</a>.
104
+
105
+ </li>
106
+ <li>select a calendar you want to edit.
107
+
108
+ </li>
109
+ <li>copy private address of XML.
110
+
111
+ </li>
112
+ <li>change the address&#8216;s end into &quot;/private/full&quot;. If your
113
+ calendar&#8216;s private XML address is
114
+
115
+ <pre>
116
+ &quot;http://www.google.com/calendar/feeds/XXX@group.calendar.google.com/private-aaaaaa/basic&quot;,
117
+ </pre>
118
+ <p>
119
+ the editable feed url is
120
+ </p>
121
+ <pre>
122
+ &quot;http://www.google.com/calendar/feeds/XXX@group.calendar.google.com/private/full&quot;.
123
+ </pre>
124
+ </li>
125
+ <li>for detail, See <a
126
+ href="http://code.google.com/apis/gdata/calendar.html#Visibility">code.google.com/apis/gdata/calendar.html#Visibility</a>.
127
+
128
+ </li>
129
+ </ol>
130
+ </li>
131
+ </ul>
132
+ <h2>create <a href="Event.html#M000016">new</a> events</h2>
133
+ <pre>
134
+ cal = Calendar.new(Service.new(MAIL, PASS), FEED)
135
+ event = cal.create_event
136
+ event.title = &quot;event title&quot;
137
+ event.desc = &quot;event description&quot;
138
+ event.where = &quot;event location&quot;
139
+ event.st = Time.mktime(2006, 9, 21, 01, 0, 0)
140
+ event.en = Time.mktime(2006, 9, 21, 03, 0, 0)
141
+ event.save!
142
+ </pre>
143
+ <h2>udpate existing events</h2>
144
+ <pre>
145
+ cal = Calendar.new(Service.new(MAIL, PASS), FEED)
146
+ event = cal.events[0]
147
+ event.title = &quot;event title&quot;
148
+ event.desc = &quot;event description&quot;
149
+ event.where = &quot;event location&quot;
150
+ event.st = Time.mktime(2006, 9, 21, 01, 0, 0)
151
+ event.en = Time.mktime(2006, 9, 21, 03, 0, 0)
152
+ event.save!
153
+ </pre>
154
+ <h2>delete events</h2>
155
+ <pre>
156
+ cal = Calendar.new(Service.new(MAIL, PASS), FEED)
157
+ event = cal.events[0]
158
+ event.destroy!
159
+ </pre>
160
+ <h2>create all day events.</h2>
161
+ <pre>
162
+ event = cal.create_event
163
+ event.title = &quot;1 days event&quot;
164
+ event.st = Time.mktime(2006, 9, 22)
165
+ event.en = Time.mktime(2006, 9, 23)
166
+ event.allday = true
167
+ event.save!
168
+
169
+ event = cal.create_event
170
+ event.title = &quot;2 days event&quot;
171
+ event.st = Time.mktime(2006, 9, 22)
172
+ event.en = Time.mktime(2006, 9, 24)
173
+ event.allday = true
174
+ event.save!
175
+ </pre>
176
+ <h2><a href="Event.html#M000023">get</a> existint event</h2>
177
+ <pre>
178
+ event = Event.get(FEED, Service.new(MAIL, PASS))
179
+ </pre>
180
+ <h1>TODO</h1>
181
+ <ul>
182
+ <li>this class doesn&#8216;t support recurring event.
183
+
184
+ </li>
185
+ </ul>
186
+
187
+ </div>
188
+
189
+
190
+ </div>
191
+
192
+ <div id="method-list">
193
+ <h3 class="section-bar">Methods</h3>
194
+
195
+ <div class="name-list">
196
+ <a href="#M000020">destroy</a>&nbsp;&nbsp;
197
+ <a href="#M000021">destroy!</a>&nbsp;&nbsp;
198
+ <a href="#M000024">do_without_exception</a>&nbsp;&nbsp;
199
+ <a href="#M000023">get</a>&nbsp;&nbsp;
200
+ <a href="#M000026">instance_to_xml</a>&nbsp;&nbsp;
201
+ <a href="#M000017">load_xml</a>&nbsp;&nbsp;
202
+ <a href="#M000016">new</a>&nbsp;&nbsp;
203
+ <a href="#M000018">save</a>&nbsp;&nbsp;
204
+ <a href="#M000019">save!</a>&nbsp;&nbsp;
205
+ <a href="#M000027">str_to_time</a>&nbsp;&nbsp;
206
+ <a href="#M000028">time_to_str</a>&nbsp;&nbsp;
207
+ <a href="#M000022">to_s</a>&nbsp;&nbsp;
208
+ <a href="#M000025">xml_to_instance</a>&nbsp;&nbsp;
209
+ </div>
210
+ </div>
211
+
212
+ </div>
213
+
214
+
215
+ <!-- if includes -->
216
+
217
+ <div id="section">
218
+
219
+
220
+ <div id="constants-list">
221
+ <h3 class="section-bar">Constants</h3>
222
+
223
+ <div class="name-list">
224
+ <table summary="Constants">
225
+ <tr class="top-aligned-row context-row">
226
+ <td class="context-item-name">ATTRIBUTES_MAP</td>
227
+ <td>=</td>
228
+ <td class="context-item-value">{
324
229
  &quot;title&quot; =&gt; { &quot;element&quot; =&gt; &quot;title&quot;},
325
230
  &quot;desc&quot; =&gt; { &quot;element&quot; =&gt; &quot;content&quot;},
326
231
  &quot;where&quot; =&gt; { &quot;element&quot; =&gt; &quot;gd:where&quot;, &quot;attribute&quot; =&gt; &quot;valueString&quot; },
327
232
  &quot;st&quot; =&gt; { &quot;element&quot; =&gt; &quot;gd:when&quot;, &quot;attribute&quot; =&gt; &quot;startTime&quot;, &quot;to_xml&quot; =&gt; &quot;time_to_str&quot;, &quot;from_xml&quot; =&gt; &quot;str_to_time&quot; },
328
233
  &quot;en&quot; =&gt; { &quot;element&quot; =&gt; &quot;gd:when&quot;, &quot;attribute&quot; =&gt; &quot;endTime&quot;, &quot;to_xml&quot; =&gt; &quot;time_to_str&quot;, &quot;from_xml&quot; =&gt; &quot;str_to_time&quot; }</td>
234
+ </tr>
235
+ <tr class="top-aligned-row context-row">
236
+ <td class="context-item-name">SKELTON</td>
237
+ <td>=</td>
238
+ <td class="context-item-value">&lt;&lt;XML
329
239
  &lt;?xml version='1.0' encoding='UTF-8'?&gt;
330
240
  &lt;entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'&gt;
331
241
  &lt;category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event'&gt;&lt;/category&gt;
332
242
  &lt;title type='text'&gt;&lt;/title&gt;
333
243
  &lt;content type='text'&gt;&lt;/content&gt;
334
244
  &lt;gd:transparency value='http://schemas.google.com/g/2005#event.opaque'&gt;&lt;/gd:transparency&gt;
335
245
  &lt;gd:eventStatus value='http://schemas.google.com/g/2005#event.confirmed'&gt;&lt;/gd:eventStatus&gt;
336
246
  &lt;/entry&gt;
337
247
  XML</td>
248
+ </tr>
249
+ </table>
250
+ </div>
251
+ </div>
252
+
253
+
254
+
255
+ <div id="attribute-list">
256
+ <h3 class="section-bar">Attributes</h3>
257
+
258
+ <div class="name-list">
259
+ <table>
260
+ <tr class="top-aligned-row context-row">
261
+ <td class="context-item-name">allday</td>
262
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
263
+ <td class="context-item-desc"></td>
264
+ </tr>
265
+ <tr class="top-aligned-row context-row">
266
+ <td class="context-item-name">desc</td>
267
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
268
+ <td class="context-item-desc"></td>
269
+ </tr>
270
+ <tr class="top-aligned-row context-row">
271
+ <td class="context-item-name">en</td>
272
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
273
+ <td class="context-item-desc"></td>
274
+ </tr>
275
+ <tr class="top-aligned-row context-row">
276
+ <td class="context-item-name">feed</td>
277
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
278
+ <td class="context-item-desc"></td>
279
+ </tr>
280
+ <tr class="top-aligned-row context-row">
281
+ <td class="context-item-name">srv</td>
282
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
283
+ <td class="context-item-desc"></td>
284
+ </tr>
285
+ <tr class="top-aligned-row context-row">
286
+ <td class="context-item-name">st</td>
287
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
288
+ <td class="context-item-desc"></td>
289
+ </tr>
290
+ <tr class="top-aligned-row context-row">
291
+ <td class="context-item-name">status</td>
292
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
293
+ <td class="context-item-desc"></td>
294
+ </tr>
295
+ <tr class="top-aligned-row context-row">
296
+ <td class="context-item-name">title</td>
297
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
298
+ <td class="context-item-desc"></td>
299
+ </tr>
300
+ <tr class="top-aligned-row context-row">
301
+ <td class="context-item-name">where</td>
302
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
303
+ <td class="context-item-desc"></td>
304
+ </tr>
305
+ <tr class="top-aligned-row context-row">
306
+ <td class="context-item-name">xml</td>
307
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
308
+ <td class="context-item-desc"></td>
309
+ </tr>
310
+ </table>
311
+ </div>
312
+ </div>
313
+
314
+
315
+
316
+ <!-- if method_list -->
317
+ <div id="methods">
318
+ <h3 class="section-bar">Public Class methods</h3>
319
+
320
+ <div id="method-M000023" class="method-detail">
321
+ <a name="M000023"></a>
322
+
323
+ <div class="method-heading">
324
+ <a href="#M000023" class="method-signature">
325
+ <span class="method-name">get</span><span class="method-args">(feed, srv)</span>
326
+ </a>
327
+ </div>
328
+
329
+ <div class="method-description">
330
+ <p>
331
+ <a href="Event.html#M000023">get</a> event from event feed
332
+ </p>
333
+ <p><a class="source-toggle" href="#"
334
+ onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
335
+ <div class="method-source-code" id="M000023-source">
336
+ <pre>
337
+ <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 168</span>
338
338
  168: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">feed</span>, <span class="ruby-identifier">srv</span>)
339
339
  169: <span class="ruby-identifier">ret</span> = <span class="ruby-identifier">srv</span>.<span class="ruby-identifier">query</span>(<span class="ruby-identifier">feed</span>)
340
340
  170: <span class="ruby-identifier">raise</span> <span class="ruby-constant">EventGetFailed</span>, <span class="ruby-identifier">ret</span>.<span class="ruby-identifier">body</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">ret</span>.<span class="ruby-identifier">code</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;200&quot;</span>
@@ -328,84 +328,84 @@ href="http://code.google.com/apis/gdata/calendar.html#Visibility">code.google.co
328
328
  172: <span class="ruby-identifier">evt</span>.<span class="ruby-identifier">srv</span> = <span class="ruby-identifier">srv</span>
329
329
  173: <span class="ruby-identifier">evt</span>.<span class="ruby-identifier">load_xml</span>(<span class="ruby-identifier">ret</span>.<span class="ruby-identifier">body</span>)
330
330
  174: <span class="ruby-identifier">evt</span>
331
- 175: <span class="ruby-keyword kw">end</span>
332
- </pre>
333
- </div>
334
- </div>
335
- </div>
336
-
337
- <div id="method-M000010" class="method-detail">
338
- <a name="M000010"></a>
339
-
340
- <div class="method-heading">
341
- <a href="#M000010" class="method-signature">
342
- <span class="method-name">new</span><span class="method-args">()</span>
343
- </a>
344
- </div>
345
-
346
- <div class="method-description">
347
- <p><a class="source-toggle" href="#"
348
- onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
349
- <div class="method-source-code" id="M000010-source">
350
- <pre>
351
- <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 108</span>
331
+ 175: <span class="ruby-keyword kw">end</span>
332
+ </pre>
333
+ </div>
334
+ </div>
335
+ </div>
336
+
337
+ <div id="method-M000016" class="method-detail">
338
+ <a name="M000016"></a>
339
+
340
+ <div class="method-heading">
341
+ <a href="#M000016" class="method-signature">
342
+ <span class="method-name">new</span><span class="method-args">()</span>
343
+ </a>
344
+ </div>
345
+
346
+ <div class="method-description">
347
+ <p><a class="source-toggle" href="#"
348
+ onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
349
+ <div class="method-source-code" id="M000016-source">
350
+ <pre>
351
+ <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 108</span>
352
352
  108: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>()
353
353
  109: <span class="ruby-ivar">@xml</span> = <span class="ruby-keyword kw">nil</span>
354
354
  110: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">status</span> = <span class="ruby-identifier">:new</span>
355
- 111: <span class="ruby-keyword kw">end</span>
356
- </pre>
357
- </div>
358
- </div>
359
- </div>
360
-
361
- <h3 class="section-bar">Public Instance methods</h3>
362
-
363
- <div id="method-M000014" class="method-detail">
364
- <a name="M000014"></a>
365
-
366
- <div class="method-heading">
367
- <a href="#M000014" class="method-signature">
368
- <span class="method-name">destroy</span><span class="method-args">()</span>
369
- </a>
370
- </div>
371
-
372
- <div class="method-description">
373
- <p>
374
- same as <a href="Event.html#M000015">destroy!</a> If failed, this method
375
- returns false.
376
- </p>
377
- <p><a class="source-toggle" href="#"
378
- onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
379
- <div class="method-source-code" id="M000014-source">
380
- <pre>
381
- <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 144</span>
355
+ 111: <span class="ruby-keyword kw">end</span>
356
+ </pre>
357
+ </div>
358
+ </div>
359
+ </div>
360
+
361
+ <h3 class="section-bar">Public Instance methods</h3>
362
+
363
+ <div id="method-M000020" class="method-detail">
364
+ <a name="M000020"></a>
365
+
366
+ <div class="method-heading">
367
+ <a href="#M000020" class="method-signature">
368
+ <span class="method-name">destroy</span><span class="method-args">()</span>
369
+ </a>
370
+ </div>
371
+
372
+ <div class="method-description">
373
+ <p>
374
+ same as <a href="Event.html#M000021">destroy!</a> If failed, this method
375
+ returns false.
376
+ </p>
377
+ <p><a class="source-toggle" href="#"
378
+ onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
379
+ <div class="method-source-code" id="M000020-source">
380
+ <pre>
381
+ <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 144</span>
382
382
  144: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">destroy</span>
383
383
  145: <span class="ruby-identifier">do_without_exception</span>(<span class="ruby-identifier">:destroy!</span>)
384
- 146: <span class="ruby-keyword kw">end</span>
385
- </pre>
386
- </div>
387
- </div>
388
- </div>
389
-
390
- <div id="method-M000015" class="method-detail">
391
- <a name="M000015"></a>
392
-
393
- <div class="method-heading">
394
- <a href="#M000015" class="method-signature">
395
- <span class="method-name">destroy!</span><span class="method-args">()</span>
396
- </a>
397
- </div>
398
-
399
- <div class="method-description">
400
- <p>
401
- delete this event from google calendar server. If failed, this method
402
- throws an Exception.
403
- </p>
404
- <p><a class="source-toggle" href="#"
405
- onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
406
- <div class="method-source-code" id="M000015-source">
407
- <pre>
408
- <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 149</span>
384
+ 146: <span class="ruby-keyword kw">end</span>
385
+ </pre>
386
+ </div>
387
+ </div>
388
+ </div>
389
+
390
+ <div id="method-M000021" class="method-detail">
391
+ <a name="M000021"></a>
392
+
393
+ <div class="method-heading">
394
+ <a href="#M000021" class="method-signature">
395
+ <span class="method-name">destroy!</span><span class="method-args">()</span>
396
+ </a>
397
+ </div>
398
+
399
+ <div class="method-description">
400
+ <p>
401
+ delete this event from google calendar server. If failed, this method
402
+ throws an Exception.
403
+ </p>
404
+ <p><a class="source-toggle" href="#"
405
+ onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
406
+ <div class="method-source-code" id="M000021-source">
407
+ <pre>
408
+ <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 149</span>
409
409
  149: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">destroy!</span>
410
410
  150: <span class="ruby-identifier">ret</span> = <span class="ruby-keyword kw">nil</span>
411
411
  151: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">status</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:old</span>
@@ -415,86 +415,86 @@ throws an Exception.
415
415
  155: <span class="ruby-identifier">raise</span> <span class="ruby-constant">EventDeleteFailed</span>, <span class="ruby-value str">&quot;Not Saved&quot;</span>
416
416
  156: <span class="ruby-keyword kw">end</span>
417
417
  157: <span class="ruby-identifier">status</span> = <span class="ruby-identifier">:deleted</span>
418
- 158: <span class="ruby-keyword kw">end</span>
419
- </pre>
420
- </div>
421
- </div>
422
- </div>
423
-
424
- <div id="method-M000011" class="method-detail">
425
- <a name="M000011"></a>
426
-
427
- <div class="method-heading">
428
- <a href="#M000011" class="method-signature">
429
- <span class="method-name">load_xml</span><span class="method-args">(str)</span>
430
- </a>
431
- </div>
432
-
433
- <div class="method-description">
434
- <p>
435
- load xml into this instance
436
- </p>
437
- <p><a class="source-toggle" href="#"
438
- onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
439
- <div class="method-source-code" id="M000011-source">
440
- <pre>
441
- <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 114</span>
418
+ 158: <span class="ruby-keyword kw">end</span>
419
+ </pre>
420
+ </div>
421
+ </div>
422
+ </div>
423
+
424
+ <div id="method-M000017" class="method-detail">
425
+ <a name="M000017"></a>
426
+
427
+ <div class="method-heading">
428
+ <a href="#M000017" class="method-signature">
429
+ <span class="method-name">load_xml</span><span class="method-args">(str)</span>
430
+ </a>
431
+ </div>
432
+
433
+ <div class="method-description">
434
+ <p>
435
+ load xml into this instance
436
+ </p>
437
+ <p><a class="source-toggle" href="#"
438
+ onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
439
+ <div class="method-source-code" id="M000017-source">
440
+ <pre>
441
+ <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 114</span>
442
442
  114: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_xml</span>(<span class="ruby-identifier">str</span>)
443
443
  115: <span class="ruby-ivar">@xml</span> = <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">Document</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">str</span>.<span class="ruby-identifier">to_s</span>)
444
444
  116: <span class="ruby-identifier">xml_to_instance</span>
445
445
  117: <span class="ruby-keyword kw">self</span>
446
- 118: <span class="ruby-keyword kw">end</span>
447
- </pre>
448
- </div>
449
- </div>
450
- </div>
451
-
452
- <div id="method-M000012" class="method-detail">
453
- <a name="M000012"></a>
454
-
455
- <div class="method-heading">
456
- <a href="#M000012" class="method-signature">
457
- <span class="method-name">save</span><span class="method-args">()</span>
458
- </a>
459
- </div>
460
-
461
- <div class="method-description">
462
- <p>
463
- same as <a href="Event.html#M000013">save!</a> If failed, this method
464
- returns false.
465
- </p>
466
- <p><a class="source-toggle" href="#"
467
- onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
468
- <div class="method-source-code" id="M000012-source">
469
- <pre>
470
- <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 121</span>
446
+ 118: <span class="ruby-keyword kw">end</span>
447
+ </pre>
448
+ </div>
449
+ </div>
450
+ </div>
451
+
452
+ <div id="method-M000018" class="method-detail">
453
+ <a name="M000018"></a>
454
+
455
+ <div class="method-heading">
456
+ <a href="#M000018" class="method-signature">
457
+ <span class="method-name">save</span><span class="method-args">()</span>
458
+ </a>
459
+ </div>
460
+
461
+ <div class="method-description">
462
+ <p>
463
+ same as <a href="Event.html#M000019">save!</a> If failed, this method
464
+ returns false.
465
+ </p>
466
+ <p><a class="source-toggle" href="#"
467
+ onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
468
+ <div class="method-source-code" id="M000018-source">
469
+ <pre>
470
+ <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 121</span>
471
471
  121: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">save</span>
472
472
  122: <span class="ruby-identifier">do_without_exception</span>(<span class="ruby-identifier">:save!</span>)
473
- 123: <span class="ruby-keyword kw">end</span>
474
- </pre>
475
- </div>
476
- </div>
477
- </div>
478
-
479
- <div id="method-M000013" class="method-detail">
480
- <a name="M000013"></a>
481
-
482
- <div class="method-heading">
483
- <a href="#M000013" class="method-signature">
484
- <span class="method-name">save!</span><span class="method-args">()</span>
485
- </a>
486
- </div>
487
-
488
- <div class="method-description">
489
- <p>
490
- <a href="Event.html#M000012">save</a> this event into google calendar
491
- server. If failed, this method throws an Exception.
492
- </p>
493
- <p><a class="source-toggle" href="#"
494
- onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
495
- <div class="method-source-code" id="M000013-source">
496
- <pre>
497
- <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 126</span>
473
+ 123: <span class="ruby-keyword kw">end</span>
474
+ </pre>
475
+ </div>
476
+ </div>
477
+ </div>
478
+
479
+ <div id="method-M000019" class="method-detail">
480
+ <a name="M000019"></a>
481
+
482
+ <div class="method-heading">
483
+ <a href="#M000019" class="method-signature">
484
+ <span class="method-name">save!</span><span class="method-args">()</span>
485
+ </a>
486
+ </div>
487
+
488
+ <div class="method-description">
489
+ <p>
490
+ <a href="Event.html#M000018">save</a> this event into google calendar
491
+ server. If failed, this method throws an Exception.
492
+ </p>
493
+ <p><a class="source-toggle" href="#"
494
+ onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
495
+ <div class="method-source-code" id="M000019-source">
496
+ <pre>
497
+ <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 126</span>
498
498
  126: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">save!</span>
499
499
  127: <span class="ruby-identifier">ret</span> = <span class="ruby-keyword kw">nil</span>
500
500
  128: <span class="ruby-keyword kw">case</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">status</span>
@@ -510,57 +510,57 @@ server. If failed, this method throws an Exception.
510
510
  138: <span class="ruby-identifier">raise</span> <span class="ruby-constant">StandardError</span>, <span class="ruby-value str">&quot;invalid inner status&quot;</span>
511
511
  139: <span class="ruby-keyword kw">end</span>
512
512
  140: <span class="ruby-identifier">load_xml</span>(<span class="ruby-identifier">ret</span>.<span class="ruby-identifier">body</span>)
513
- 141: <span class="ruby-keyword kw">end</span>
514
- </pre>
515
- </div>
516
- </div>
517
- </div>
518
-
519
- <div id="method-M000016" class="method-detail">
520
- <a name="M000016"></a>
521
-
522
- <div class="method-heading">
523
- <a href="#M000016" class="method-signature">
524
- <span class="method-name">to_s</span><span class="method-args">()</span>
525
- </a>
526
- </div>
527
-
528
- <div class="method-description">
529
- <p>
530
- retuns this event&#8216;s xml.
531
- </p>
532
- <p><a class="source-toggle" href="#"
533
- onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
534
- <div class="method-source-code" id="M000016-source">
535
- <pre>
536
- <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 161</span>
513
+ 141: <span class="ruby-keyword kw">end</span>
514
+ </pre>
515
+ </div>
516
+ </div>
517
+ </div>
518
+
519
+ <div id="method-M000022" class="method-detail">
520
+ <a name="M000022"></a>
521
+
522
+ <div class="method-heading">
523
+ <a href="#M000022" class="method-signature">
524
+ <span class="method-name">to_s</span><span class="method-args">()</span>
525
+ </a>
526
+ </div>
527
+
528
+ <div class="method-description">
529
+ <p>
530
+ retuns this event&#8216;s xml.
531
+ </p>
532
+ <p><a class="source-toggle" href="#"
533
+ onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
534
+ <div class="method-source-code" id="M000022-source">
535
+ <pre>
536
+ <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 161</span>
537
537
  161: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
538
538
  162: <span class="ruby-ivar">@xml</span> = <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">Document</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">SKELTON</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">status</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:new</span>
539
539
  163: <span class="ruby-identifier">instance_to_xml</span>
540
540
  164: <span class="ruby-ivar">@xml</span>.<span class="ruby-identifier">to_s</span>
541
- 165: <span class="ruby-keyword kw">end</span>
542
- </pre>
543
- </div>
544
- </div>
545
- </div>
546
-
547
- <h3 class="section-bar">Private Instance methods</h3>
548
-
549
- <div id="method-M000018" class="method-detail">
550
- <a name="M000018"></a>
551
-
552
- <div class="method-heading">
553
- <a href="#M000018" class="method-signature">
554
- <span class="method-name">do_without_exception</span><span class="method-args">(method)</span>
555
- </a>
556
- </div>
557
-
558
- <div class="method-description">
559
- <p><a class="source-toggle" href="#"
560
- onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
561
- <div class="method-source-code" id="M000018-source">
562
- <pre>
563
- <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 178</span>
541
+ 165: <span class="ruby-keyword kw">end</span>
542
+ </pre>
543
+ </div>
544
+ </div>
545
+ </div>
546
+
547
+ <h3 class="section-bar">Private Instance methods</h3>
548
+
549
+ <div id="method-M000024" class="method-detail">
550
+ <a name="M000024"></a>
551
+
552
+ <div class="method-heading">
553
+ <a href="#M000024" class="method-signature">
554
+ <span class="method-name">do_without_exception</span><span class="method-args">(method)</span>
555
+ </a>
556
+ </div>
557
+
558
+ <div class="method-description">
559
+ <p><a class="source-toggle" href="#"
560
+ onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
561
+ <div class="method-source-code" id="M000024-source">
562
+ <pre>
563
+ <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 178</span>
564
564
  178: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">do_without_exception</span>(<span class="ruby-identifier">method</span>)
565
565
  179: <span class="ruby-identifier">ret</span> = <span class="ruby-keyword kw">true</span>
566
566
  180: <span class="ruby-keyword kw">begin</span>
@@ -569,30 +569,30 @@ retuns this event&#8216;s xml.
569
569
  183: <span class="ruby-identifier">ret</span> = <span class="ruby-keyword kw">false</span>
570
570
  184: <span class="ruby-keyword kw">end</span>
571
571
  185: <span class="ruby-identifier">ret</span>
572
- 186: <span class="ruby-keyword kw">end</span>
573
- </pre>
574
- </div>
575
- </div>
576
- </div>
577
-
578
- <div id="method-M000020" class="method-detail">
579
- <a name="M000020"></a>
580
-
581
- <div class="method-heading">
582
- <a href="#M000020" class="method-signature">
583
- <span class="method-name">instance_to_xml</span><span class="method-args">()</span>
584
- </a>
585
- </div>
586
-
587
- <div class="method-description">
588
- <p>
589
- set attributes of an instance into xml
590
- </p>
591
- <p><a class="source-toggle" href="#"
592
- onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
593
- <div class="method-source-code" id="M000020-source">
594
- <pre>
595
- <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 206</span>
572
+ 186: <span class="ruby-keyword kw">end</span>
573
+ </pre>
574
+ </div>
575
+ </div>
576
+ </div>
577
+
578
+ <div id="method-M000026" class="method-detail">
579
+ <a name="M000026"></a>
580
+
581
+ <div class="method-heading">
582
+ <a href="#M000026" class="method-signature">
583
+ <span class="method-name">instance_to_xml</span><span class="method-args">()</span>
584
+ </a>
585
+ </div>
586
+
587
+ <div class="method-description">
588
+ <p>
589
+ set attributes of an instance into xml
590
+ </p>
591
+ <p><a class="source-toggle" href="#"
592
+ onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
593
+ <div class="method-source-code" id="M000026-source">
594
+ <pre>
595
+ <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 206</span>
596
596
  206: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">instance_to_xml</span>
597
597
  207: <span class="ruby-constant">ATTRIBUTES_MAP</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">hash</span><span class="ruby-operator">|</span>
598
598
  208: <span class="ruby-identifier">elem</span> = <span class="ruby-ivar">@xml</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">elements</span>[<span class="ruby-identifier">hash</span>[<span class="ruby-value str">&quot;element&quot;</span>]]
@@ -605,96 +605,96 @@ set attributes of an instance into xml
605
605
  215: <span class="ruby-identifier">elem</span>.<span class="ruby-identifier">text</span> = <span class="ruby-identifier">val</span>
606
606
  216: <span class="ruby-keyword kw">end</span>
607
607
  217: <span class="ruby-keyword kw">end</span>
608
- 218: <span class="ruby-keyword kw">end</span>
609
- </pre>
610
- </div>
611
- </div>
612
- </div>
613
-
614
- <div id="method-M000021" class="method-detail">
615
- <a name="M000021"></a>
616
-
617
- <div class="method-heading">
618
- <a href="#M000021" class="method-signature">
619
- <span class="method-name">str_to_time</span><span class="method-args">(st)</span>
620
- </a>
621
- </div>
622
-
623
- <div class="method-description">
624
- <h2>Allday <a href="Event.html">Event</a> Bugs</h2>
625
- <p>
626
- When creating all day event, the format of gd:when startTime and gd:when
627
- endTime must be &quot;yyyy-mm-ddZ&quot; which represents UTC. otherwise the
628
- wrong data returns. below is the test result. I used 3 countries&#8217;
629
- calendar. US, UK, and Japan. And in each calendar, I created all day events
630
- in three types of date format. A) yyyy-mm-dd B) yyyy-mm-ddZ C)
631
- yyyy-mm-dd+(-)hh:mm only type B format always returns the correct data.
632
- </p>
633
- <p>
634
- 1) US calendar (all type is OK) A: input start =&gt; 2006-09-18, end =&gt;
635
- 2006-09-19
636
- </p>
637
- <pre>
638
- output start =&gt; 2006-09-18, end =&gt; 2006-09-19
639
- </pre>
640
- <p>
641
- B: input start =&gt; 2006-09-18Z,end =&gt; 2006-09-19Z
642
- </p>
643
- <pre>
644
- output start =&gt; 2006-09-18, end =&gt; 2006-09-19
645
- </pre>
646
- <p>
647
- C: input start =&gt; 2006-09-18-08:00,end =&gt; 2006-09-19-08:00
648
- </p>
649
- <pre>
650
- output start =&gt; 2006-09-18, end =&gt; 2006-09-19
651
- </pre>
652
- <p>
653
- 2) UK calenar (A returns wrong data. B and C is OK) A: input start =&gt;
654
- 2006-09-18, end =&gt; 2006-09-19
655
- </p>
656
- <pre>
657
- output start =&gt; 2006-09-17, end =&gt; 2006-09-18
658
- </pre>
659
- <p>
660
- B: input start =&gt; 2006-09-18Z,end =&gt; 2006-09-19Z
661
- </p>
662
- <pre>
663
- output start =&gt; 2006-09-18, end =&gt; 2006-09-19
664
- </pre>
665
- <p>
666
- C: input start =&gt; 2006-09-18-00:00,end =&gt; 2006-09-19-00:00
667
- </p>
668
- <pre>
669
- output start =&gt; 2006-09-18, end =&gt; 2006-09-19
670
- </pre>
671
- <p>
672
- 3) Japan calendar (A and C returns wrong data. only B is OK) A: input start
673
- =&gt; 2006-09-18, end =&gt; 2006-09-19
674
- </p>
675
- <pre>
676
- output start =&gt; 2006-09-17, end =&gt; 2006-09-18
677
- </pre>
678
- <p>
679
- B: input start =&gt; 2006-09-18Z,end =&gt; 2006-09-19Z
680
- </p>
681
- <pre>
682
- output start =&gt; 2006-09-18, end =&gt; 2006-09-19
683
- </pre>
684
- <p>
685
- C: input start =&gt; 2006-09-18+09:00,end =&gt; 2006-09-19+09:00
686
- </p>
687
- <pre>
688
- output start =&gt; 2006-09-17, end =&gt; 2006-09-18
689
- </pre>
690
- <p>
691
- convert String to Time
692
- </p>
693
- <p><a class="source-toggle" href="#"
694
- onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
695
- <div class="method-source-code" id="M000021-source">
696
- <pre>
697
- <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 261</span>
608
+ 218: <span class="ruby-keyword kw">end</span>
609
+ </pre>
610
+ </div>
611
+ </div>
612
+ </div>
613
+
614
+ <div id="method-M000027" class="method-detail">
615
+ <a name="M000027"></a>
616
+
617
+ <div class="method-heading">
618
+ <a href="#M000027" class="method-signature">
619
+ <span class="method-name">str_to_time</span><span class="method-args">(st)</span>
620
+ </a>
621
+ </div>
622
+
623
+ <div class="method-description">
624
+ <h2>Allday <a href="Event.html">Event</a> Bugs</h2>
625
+ <p>
626
+ When creating all day event, the format of gd:when startTime and gd:when
627
+ endTime must be &quot;yyyy-mm-ddZ&quot; which represents UTC. otherwise the
628
+ wrong data returns. below is the test result. I used 3 countries&#8217;
629
+ calendar. US, UK, and Japan. And in each calendar, I created all day events
630
+ in three types of date format. A) yyyy-mm-dd B) yyyy-mm-ddZ C)
631
+ yyyy-mm-dd+(-)hh:mm only type B format always returns the correct data.
632
+ </p>
633
+ <p>
634
+ 1) US calendar (all type is OK) A: input start =&gt; 2006-09-18, end =&gt;
635
+ 2006-09-19
636
+ </p>
637
+ <pre>
638
+ output start =&gt; 2006-09-18, end =&gt; 2006-09-19
639
+ </pre>
640
+ <p>
641
+ B: input start =&gt; 2006-09-18Z,end =&gt; 2006-09-19Z
642
+ </p>
643
+ <pre>
644
+ output start =&gt; 2006-09-18, end =&gt; 2006-09-19
645
+ </pre>
646
+ <p>
647
+ C: input start =&gt; 2006-09-18-08:00,end =&gt; 2006-09-19-08:00
648
+ </p>
649
+ <pre>
650
+ output start =&gt; 2006-09-18, end =&gt; 2006-09-19
651
+ </pre>
652
+ <p>
653
+ 2) UK calenar (A returns wrong data. B and C is OK) A: input start =&gt;
654
+ 2006-09-18, end =&gt; 2006-09-19
655
+ </p>
656
+ <pre>
657
+ output start =&gt; 2006-09-17, end =&gt; 2006-09-18
658
+ </pre>
659
+ <p>
660
+ B: input start =&gt; 2006-09-18Z,end =&gt; 2006-09-19Z
661
+ </p>
662
+ <pre>
663
+ output start =&gt; 2006-09-18, end =&gt; 2006-09-19
664
+ </pre>
665
+ <p>
666
+ C: input start =&gt; 2006-09-18-00:00,end =&gt; 2006-09-19-00:00
667
+ </p>
668
+ <pre>
669
+ output start =&gt; 2006-09-18, end =&gt; 2006-09-19
670
+ </pre>
671
+ <p>
672
+ 3) Japan calendar (A and C returns wrong data. only B is OK) A: input start
673
+ =&gt; 2006-09-18, end =&gt; 2006-09-19
674
+ </p>
675
+ <pre>
676
+ output start =&gt; 2006-09-17, end =&gt; 2006-09-18
677
+ </pre>
678
+ <p>
679
+ B: input start =&gt; 2006-09-18Z,end =&gt; 2006-09-19Z
680
+ </p>
681
+ <pre>
682
+ output start =&gt; 2006-09-18, end =&gt; 2006-09-19
683
+ </pre>
684
+ <p>
685
+ C: input start =&gt; 2006-09-18+09:00,end =&gt; 2006-09-19+09:00
686
+ </p>
687
+ <pre>
688
+ output start =&gt; 2006-09-17, end =&gt; 2006-09-18
689
+ </pre>
690
+ <p>
691
+ convert String to Time
692
+ </p>
693
+ <p><a class="source-toggle" href="#"
694
+ onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
695
+ <div class="method-source-code" id="M000027-source">
696
+ <pre>
697
+ <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 261</span>
698
698
  261: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">str_to_time</span>(<span class="ruby-identifier">st</span>)
699
699
  262: <span class="ruby-identifier">ret</span> = <span class="ruby-keyword kw">nil</span>
700
700
  263: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">st</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Time</span> <span class="ruby-keyword kw">then</span>
@@ -704,68 +704,68 @@ convert String to Time
704
704
  267: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">allday</span> = <span class="ruby-keyword kw">false</span>
705
705
  268: <span class="ruby-identifier">ret</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">iso8601</span>(<span class="ruby-identifier">st</span>)
706
706
  269: <span class="ruby-keyword kw">rescue</span>
707
- 270: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">allday</span> = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">st</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\d{4}-\d{2}-\d{2}/</span> <span class="ruby-comment cmt"># yyyy-mm-dd</span>
707
+ 270: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">allday</span> = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">st</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\d{4}-\d{2}-\d{2}/</span> <span class="ruby-comment cmt"># yyyy-mm-dd
708
708
  271: <span class="ruby-identifier">ret</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">st</span>)
709
709
  272: <span class="ruby-keyword kw">end</span>
710
710
  273: <span class="ruby-keyword kw">end</span>
711
711
  274: <span class="ruby-identifier">ret</span>
712
- 275: <span class="ruby-keyword kw">end</span>
713
- </pre>
714
- </div>
715
- </div>
716
- </div>
717
-
718
- <div id="method-M000022" class="method-detail">
719
- <a name="M000022"></a>
720
-
721
- <div class="method-heading">
722
- <a href="#M000022" class="method-signature">
723
- <span class="method-name">time_to_str</span><span class="method-args">(dt)</span>
724
- </a>
725
- </div>
726
-
727
- <div class="method-description">
728
- <p>
729
- returns string represents date or datetime
730
- </p>
731
- <p><a class="source-toggle" href="#"
732
- onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
733
- <div class="method-source-code" id="M000022-source">
734
- <pre>
735
- <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 278</span>
712
+ 275: <span class="ruby-keyword kw">end</span>
713
+ </pre>
714
+ </div>
715
+ </div>
716
+ </div>
717
+
718
+ <div id="method-M000028" class="method-detail">
719
+ <a name="M000028"></a>
720
+
721
+ <div class="method-heading">
722
+ <a href="#M000028" class="method-signature">
723
+ <span class="method-name">time_to_str</span><span class="method-args">(dt)</span>
724
+ </a>
725
+ </div>
726
+
727
+ <div class="method-description">
728
+ <p>
729
+ returns string represents date or datetime
730
+ </p>
731
+ <p><a class="source-toggle" href="#"
732
+ onclick="toggleCode('M000028-source');return false;">[Source]</a></p>
733
+ <div class="method-source-code" id="M000028-source">
734
+ <pre>
735
+ <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 278</span>
736
736
  278: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">time_to_str</span>(<span class="ruby-identifier">dt</span>)
737
737
  279: <span class="ruby-identifier">ret</span> = <span class="ruby-keyword kw">nil</span>
738
738
  280: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dt</span>.<span class="ruby-identifier">nil?</span>
739
739
  281: <span class="ruby-identifier">ret</span> = <span class="ruby-value str">&quot;&quot;</span>
740
740
  282: <span class="ruby-keyword kw">else</span>
741
741
  283: <span class="ruby-identifier">ret</span> = <span class="ruby-identifier">dt</span>.<span class="ruby-identifier">iso8601</span>
742
- 284: <span class="ruby-identifier">ret</span>[<span class="ruby-value">10</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>] = <span class="ruby-value str">&quot;Z&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">allday</span> <span class="ruby-comment cmt"># yyyy-mm-ddZ</span>
742
+ 284: <span class="ruby-identifier">ret</span>[<span class="ruby-value">10</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>] = <span class="ruby-value str">&quot;Z&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">allday</span> <span class="ruby-comment cmt"># yyyy-mm-ddZ
743
743
  285: <span class="ruby-keyword kw">end</span>
744
744
  286: <span class="ruby-identifier">ret</span>
745
- 287: <span class="ruby-keyword kw">end</span>
746
- </pre>
747
- </div>
748
- </div>
749
- </div>
750
-
751
- <div id="method-M000019" class="method-detail">
752
- <a name="M000019"></a>
753
-
754
- <div class="method-heading">
755
- <a href="#M000019" class="method-signature">
756
- <span class="method-name">xml_to_instance</span><span class="method-args">()</span>
757
- </a>
758
- </div>
759
-
760
- <div class="method-description">
761
- <p>
762
- set xml data to attributes of an instance
763
- </p>
764
- <p><a class="source-toggle" href="#"
765
- onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
766
- <div class="method-source-code" id="M000019-source">
767
- <pre>
768
- <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 189</span>
745
+ 287: <span class="ruby-keyword kw">end</span>
746
+ </pre>
747
+ </div>
748
+ </div>
749
+ </div>
750
+
751
+ <div id="method-M000025" class="method-detail">
752
+ <a name="M000025"></a>
753
+
754
+ <div class="method-heading">
755
+ <a href="#M000025" class="method-signature">
756
+ <span class="method-name">xml_to_instance</span><span class="method-args">()</span>
757
+ </a>
758
+ </div>
759
+
760
+ <div class="method-description">
761
+ <p>
762
+ set xml data to attributes of an instance
763
+ </p>
764
+ <p><a class="source-toggle" href="#"
765
+ onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
766
+ <div class="method-source-code" id="M000025-source">
767
+ <pre>
768
+ <span class="ruby-comment cmt"># File lib/googlecalendar/event.rb, line 189</span>
769
769
  189: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">xml_to_instance</span>
770
770
  190: <span class="ruby-constant">ATTRIBUTES_MAP</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">hash</span><span class="ruby-operator">|</span>
771
771
  191: <span class="ruby-identifier">elem</span> = <span class="ruby-ivar">@xml</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">elements</span>[<span class="ruby-identifier">hash</span>[<span class="ruby-value str">&quot;element&quot;</span>]]
@@ -780,22 +780,22 @@ set xml data to attributes of an instance
780
780
  200: <span class="ruby-ivar">@xml</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">elements</span>.<span class="ruby-identifier">each</span>(<span class="ruby-value str">&quot;link&quot;</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">link</span><span class="ruby-operator">|</span>
781
781
  201: <span class="ruby-ivar">@feed</span> = <span class="ruby-identifier">link</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">&quot;href&quot;</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">link</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">&quot;rel&quot;</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;edit&quot;</span>
782
782
  202: <span class="ruby-keyword kw">end</span>
783
- 203: <span class="ruby-keyword kw">end</span>
784
- </pre>
785
- </div>
786
- </div>
787
- </div>
788
-
789
-
790
- </div>
791
-
792
-
793
- </div>
794
-
795
-
796
- <div id="validator-badges">
797
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
798
- </div>
799
-
800
- </body>
783
+ 203: <span class="ruby-keyword kw">end</span>
784
+ </pre>
785
+ </div>
786
+ </div>
787
+ </div>
788
+
789
+
790
+ </div>
791
+
792
+
793
+ </div>
794
+
795
+
796
+ <div id="validator-badges">
797
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
798
+ </div>
799
+
800
+ </body>
801
801
  </html>