gcalapi 0.0.4 → 0.1.0

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