gcalapi 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/html/classes/GoogleCalendar.html +149 -149
- data/html/classes/GoogleCalendar/AuthSubFailed.html +162 -162
- data/html/classes/GoogleCalendar/AuthSubUtil.html +352 -352
- data/html/classes/GoogleCalendar/AuthenticationFailed.html +110 -110
- data/html/classes/GoogleCalendar/Calendar.html +381 -381
- data/html/classes/GoogleCalendar/Event.html +699 -699
- data/html/classes/GoogleCalendar/EventDeleteFailed.html +110 -110
- data/html/classes/GoogleCalendar/EventGetFailed.html +110 -110
- data/html/classes/GoogleCalendar/EventInsertFailed.html +110 -110
- data/html/classes/GoogleCalendar/EventUpdateFailed.html +110 -110
- data/html/classes/GoogleCalendar/InvalidCalendarURL.html +110 -110
- data/html/classes/GoogleCalendar/Service.html +245 -305
- data/html/classes/GoogleCalendar/ServiceAuthSub.html +176 -176
- data/html/classes/GoogleCalendar/ServiceBase.html +752 -693
- data/html/created.rid +1 -1
- data/html/files/README.html +117 -117
- data/html/files/lib/googlecalendar/auth_sub_util_rb.html +110 -110
- data/html/files/lib/googlecalendar/calendar_rb.html +109 -109
- data/html/files/lib/googlecalendar/event_rb.html +109 -109
- data/html/files/lib/googlecalendar/service_auth_sub_rb.html +107 -107
- data/html/files/lib/googlecalendar/service_base_rb.html +113 -113
- data/html/files/lib/googlecalendar/service_rb.html +107 -107
- data/html/fr_class_index.html +39 -39
- data/html/fr_file_index.html +32 -32
- data/html/fr_method_index.html +75 -75
- data/html/index.html +23 -23
- data/html/rdoc-style.css +207 -207
- data/lib/googlecalendar/service.rb +1 -18
- data/lib/googlecalendar/service_base.rb +17 -0
- data/test/03_authsub_test.rb +14 -2
- data/test/all.bat +1 -0
- data/test/all.sh +0 -0
- data/test/each.sh +0 -0
- metadata +47 -70
- 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‘s editable feed url.
|
95
|
-
|
96
|
-
<ol>
|
97
|
-
<li>your default calendar‘s feed url is defined in
|
98
|
-
Calendar::DEFAULT_CALENDAR_FEED. To <a href="Event.html#
|
99
|
-
other calendar‘s feed url, read below.
|
100
|
-
|
101
|
-
</li>
|
102
|
-
<li>click "Manage Calendars" 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‘s end into "/private/full". If your
|
113
|
-
calendar‘s private XML address is
|
114
|
-
|
115
|
-
<pre>
|
116
|
-
"http://www.google.com/calendar/feeds/XXX@group.calendar.google.com/private-aaaaaa/basic",
|
117
|
-
</pre>
|
118
|
-
<p>
|
119
|
-
the editable feed url is
|
120
|
-
</p>
|
121
|
-
<pre>
|
122
|
-
"http://www.google.com/calendar/feeds/XXX@group.calendar.google.com/private/full".
|
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#
|
133
|
-
<pre>
|
134
|
-
cal = Calendar.new(Service.new(MAIL, PASS), FEED)
|
135
|
-
event = cal.create_event
|
136
|
-
event.title = "event title"
|
137
|
-
event.desc = "event description"
|
138
|
-
event.where = "event location"
|
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 = "event title"
|
148
|
-
event.desc = "event description"
|
149
|
-
event.where = "event location"
|
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 = "1 days event"
|
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 = "2 days event"
|
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#
|
177
|
-
<pre>
|
178
|
-
event = Event.get(FEED, Service.new(MAIL, PASS))
|
179
|
-
</pre>
|
180
|
-
<h1>TODO</h1>
|
181
|
-
<ul>
|
182
|
-
<li>this class doesn‘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="#
|
197
|
-
<a href="#
|
198
|
-
<a href="#
|
199
|
-
<a href="#
|
200
|
-
<a href="#
|
201
|
-
<a href="#
|
202
|
-
<a href="#
|
203
|
-
<a href="#
|
204
|
-
<a href="#
|
205
|
-
<a href="#
|
206
|
-
<a href="#
|
207
|
-
<a href="#
|
208
|
-
<a href="#
|
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">{
|
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"><<XML <?xml version='1.0' encoding='UTF-8'?> <entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'> <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event'></category> <title type='text'></title> <content type='text'></content> <gd:transparency value='http://schemas.google.com/g/2005#event.opaque'></gd:transparency> <gd:eventStatus value='http://schemas.google.com/g/2005#event.confirmed'></gd:eventStatus> </entry> 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"> [RW] </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"> [RW] </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"> [RW] </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"> [RW] </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"> [RW] </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"> [RW] </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"> [RW] </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"> [RW] </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"> [RW] </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"> [RW] </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‘s editable feed url.
|
95
|
+
|
96
|
+
<ol>
|
97
|
+
<li>your default calendar‘s feed url is defined in
|
98
|
+
Calendar::DEFAULT_CALENDAR_FEED. To <a href="Event.html#M000023">get</a>
|
99
|
+
other calendar‘s feed url, read below.
|
100
|
+
|
101
|
+
</li>
|
102
|
+
<li>click "Manage Calendars" 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‘s end into "/private/full". If your
|
113
|
+
calendar‘s private XML address is
|
114
|
+
|
115
|
+
<pre>
|
116
|
+
"http://www.google.com/calendar/feeds/XXX@group.calendar.google.com/private-aaaaaa/basic",
|
117
|
+
</pre>
|
118
|
+
<p>
|
119
|
+
the editable feed url is
|
120
|
+
</p>
|
121
|
+
<pre>
|
122
|
+
"http://www.google.com/calendar/feeds/XXX@group.calendar.google.com/private/full".
|
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 = "event title"
|
137
|
+
event.desc = "event description"
|
138
|
+
event.where = "event location"
|
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 = "event title"
|
148
|
+
event.desc = "event description"
|
149
|
+
event.where = "event location"
|
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 = "1 days event"
|
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 = "2 days event"
|
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‘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>
|
197
|
+
<a href="#M000021">destroy!</a>
|
198
|
+
<a href="#M000024">do_without_exception</a>
|
199
|
+
<a href="#M000023">get</a>
|
200
|
+
<a href="#M000026">instance_to_xml</a>
|
201
|
+
<a href="#M000017">load_xml</a>
|
202
|
+
<a href="#M000016">new</a>
|
203
|
+
<a href="#M000018">save</a>
|
204
|
+
<a href="#M000019">save!</a>
|
205
|
+
<a href="#M000027">str_to_time</a>
|
206
|
+
<a href="#M000028">time_to_str</a>
|
207
|
+
<a href="#M000022">to_s</a>
|
208
|
+
<a href="#M000025">xml_to_instance</a>
|
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
|
"title" => { "element" => "title"},
|
325
230
|
"desc" => { "element" => "content"},
|
326
231
|
"where" => { "element" => "gd:where", "attribute" => "valueString" },
|
327
232
|
"st" => { "element" => "gd:when", "attribute" => "startTime", "to_xml" => "time_to_str", "from_xml" => "str_to_time" },
|
328
233
|
"en" => { "element" => "gd:when", "attribute" => "endTime", "to_xml" => "time_to_str", "from_xml" => "str_to_time" }</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"><<XML
|
329
239
|
<?xml version='1.0' encoding='UTF-8'?>
|
330
240
|
<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'>
|
331
241
|
<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event'></category>
|
332
242
|
<title type='text'></title>
|
333
243
|
<content type='text'></content>
|
334
244
|
<gd:transparency value='http://schemas.google.com/g/2005#event.opaque'></gd:transparency>
|
335
245
|
<gd:eventStatus value='http://schemas.google.com/g/2005#event.confirmed'></gd:eventStatus>
|
336
246
|
</entry>
|
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"> [RW] </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"> [RW] </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"> [RW] </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"> [RW] </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"> [RW] </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"> [RW] </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"> [RW] </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"> [RW] </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"> [RW] </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"> [RW] </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">"200"</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-
|
338
|
-
<a name="
|
339
|
-
|
340
|
-
<div class="method-heading">
|
341
|
-
<a href="#
|
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('
|
349
|
-
<div class="method-source-code" id="
|
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-
|
364
|
-
<a name="
|
365
|
-
|
366
|
-
<div class="method-heading">
|
367
|
-
<a href="#
|
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#
|
375
|
-
returns false.
|
376
|
-
</p>
|
377
|
-
<p><a class="source-toggle" href="#"
|
378
|
-
onclick="toggleCode('
|
379
|
-
<div class="method-source-code" id="
|
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-
|
391
|
-
<a name="
|
392
|
-
|
393
|
-
<div class="method-heading">
|
394
|
-
<a href="#
|
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('
|
406
|
-
<div class="method-source-code" id="
|
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">"Not Saved"</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-
|
425
|
-
<a name="
|
426
|
-
|
427
|
-
<div class="method-heading">
|
428
|
-
<a href="#
|
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('
|
439
|
-
<div class="method-source-code" id="
|
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-
|
453
|
-
<a name="
|
454
|
-
|
455
|
-
<div class="method-heading">
|
456
|
-
<a href="#
|
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#
|
464
|
-
returns false.
|
465
|
-
</p>
|
466
|
-
<p><a class="source-toggle" href="#"
|
467
|
-
onclick="toggleCode('
|
468
|
-
<div class="method-source-code" id="
|
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-
|
480
|
-
<a name="
|
481
|
-
|
482
|
-
<div class="method-heading">
|
483
|
-
<a href="#
|
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#
|
491
|
-
server. If failed, this method throws an Exception.
|
492
|
-
</p>
|
493
|
-
<p><a class="source-toggle" href="#"
|
494
|
-
onclick="toggleCode('
|
495
|
-
<div class="method-source-code" id="
|
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">"invalid inner status"</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-
|
520
|
-
<a name="
|
521
|
-
|
522
|
-
<div class="method-heading">
|
523
|
-
<a href="#
|
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‘s xml.
|
531
|
-
</p>
|
532
|
-
<p><a class="source-toggle" href="#"
|
533
|
-
onclick="toggleCode('
|
534
|
-
<div class="method-source-code" id="
|
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‘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-
|
550
|
-
<a name="
|
551
|
-
|
552
|
-
<div class="method-heading">
|
553
|
-
<a href="#
|
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('
|
561
|
-
<div class="method-source-code" id="
|
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‘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-
|
579
|
-
<a name="
|
580
|
-
|
581
|
-
<div class="method-heading">
|
582
|
-
<a href="#
|
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('
|
593
|
-
<div class="method-source-code" id="
|
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">"element"</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-
|
615
|
-
<a name="
|
616
|
-
|
617
|
-
<div class="method-heading">
|
618
|
-
<a href="#
|
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 "yyyy-mm-ddZ" which represents UTC. otherwise the
|
628
|
-
wrong data returns. below is the test result. I used 3 countries’
|
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 => 2006-09-18, end =>
|
635
|
-
2006-09-19
|
636
|
-
</p>
|
637
|
-
<pre>
|
638
|
-
output start => 2006-09-18, end => 2006-09-19
|
639
|
-
</pre>
|
640
|
-
<p>
|
641
|
-
B: input start => 2006-09-18Z,end => 2006-09-19Z
|
642
|
-
</p>
|
643
|
-
<pre>
|
644
|
-
output start => 2006-09-18, end => 2006-09-19
|
645
|
-
</pre>
|
646
|
-
<p>
|
647
|
-
C: input start => 2006-09-18-08:00,end => 2006-09-19-08:00
|
648
|
-
</p>
|
649
|
-
<pre>
|
650
|
-
output start => 2006-09-18, end => 2006-09-19
|
651
|
-
</pre>
|
652
|
-
<p>
|
653
|
-
2) UK calenar (A returns wrong data. B and C is OK) A: input start =>
|
654
|
-
2006-09-18, end => 2006-09-19
|
655
|
-
</p>
|
656
|
-
<pre>
|
657
|
-
output start => 2006-09-17, end => 2006-09-18
|
658
|
-
</pre>
|
659
|
-
<p>
|
660
|
-
B: input start => 2006-09-18Z,end => 2006-09-19Z
|
661
|
-
</p>
|
662
|
-
<pre>
|
663
|
-
output start => 2006-09-18, end => 2006-09-19
|
664
|
-
</pre>
|
665
|
-
<p>
|
666
|
-
C: input start => 2006-09-18-00:00,end => 2006-09-19-00:00
|
667
|
-
</p>
|
668
|
-
<pre>
|
669
|
-
output start => 2006-09-18, end => 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
|
-
=> 2006-09-18, end => 2006-09-19
|
674
|
-
</p>
|
675
|
-
<pre>
|
676
|
-
output start => 2006-09-17, end => 2006-09-18
|
677
|
-
</pre>
|
678
|
-
<p>
|
679
|
-
B: input start => 2006-09-18Z,end => 2006-09-19Z
|
680
|
-
</p>
|
681
|
-
<pre>
|
682
|
-
output start => 2006-09-18, end => 2006-09-19
|
683
|
-
</pre>
|
684
|
-
<p>
|
685
|
-
C: input start => 2006-09-18+09:00,end => 2006-09-19+09:00
|
686
|
-
</p>
|
687
|
-
<pre>
|
688
|
-
output start => 2006-09-17, end => 2006-09-18
|
689
|
-
</pre>
|
690
|
-
<p>
|
691
|
-
convert String to Time
|
692
|
-
</p>
|
693
|
-
<p><a class="source-toggle" href="#"
|
694
|
-
onclick="toggleCode('
|
695
|
-
<div class="method-source-code" id="
|
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 "yyyy-mm-ddZ" which represents UTC. otherwise the
|
628
|
+
wrong data returns. below is the test result. I used 3 countries’
|
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 => 2006-09-18, end =>
|
635
|
+
2006-09-19
|
636
|
+
</p>
|
637
|
+
<pre>
|
638
|
+
output start => 2006-09-18, end => 2006-09-19
|
639
|
+
</pre>
|
640
|
+
<p>
|
641
|
+
B: input start => 2006-09-18Z,end => 2006-09-19Z
|
642
|
+
</p>
|
643
|
+
<pre>
|
644
|
+
output start => 2006-09-18, end => 2006-09-19
|
645
|
+
</pre>
|
646
|
+
<p>
|
647
|
+
C: input start => 2006-09-18-08:00,end => 2006-09-19-08:00
|
648
|
+
</p>
|
649
|
+
<pre>
|
650
|
+
output start => 2006-09-18, end => 2006-09-19
|
651
|
+
</pre>
|
652
|
+
<p>
|
653
|
+
2) UK calenar (A returns wrong data. B and C is OK) A: input start =>
|
654
|
+
2006-09-18, end => 2006-09-19
|
655
|
+
</p>
|
656
|
+
<pre>
|
657
|
+
output start => 2006-09-17, end => 2006-09-18
|
658
|
+
</pre>
|
659
|
+
<p>
|
660
|
+
B: input start => 2006-09-18Z,end => 2006-09-19Z
|
661
|
+
</p>
|
662
|
+
<pre>
|
663
|
+
output start => 2006-09-18, end => 2006-09-19
|
664
|
+
</pre>
|
665
|
+
<p>
|
666
|
+
C: input start => 2006-09-18-00:00,end => 2006-09-19-00:00
|
667
|
+
</p>
|
668
|
+
<pre>
|
669
|
+
output start => 2006-09-18, end => 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
|
+
=> 2006-09-18, end => 2006-09-19
|
674
|
+
</p>
|
675
|
+
<pre>
|
676
|
+
output start => 2006-09-17, end => 2006-09-18
|
677
|
+
</pre>
|
678
|
+
<p>
|
679
|
+
B: input start => 2006-09-18Z,end => 2006-09-19Z
|
680
|
+
</p>
|
681
|
+
<pre>
|
682
|
+
output start => 2006-09-18, end => 2006-09-19
|
683
|
+
</pre>
|
684
|
+
<p>
|
685
|
+
C: input start => 2006-09-18+09:00,end => 2006-09-19+09:00
|
686
|
+
</p>
|
687
|
+
<pre>
|
688
|
+
output start => 2006-09-17, end => 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
|
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-
|
719
|
-
<a name="
|
720
|
-
|
721
|
-
<div class="method-heading">
|
722
|
-
<a href="#
|
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('
|
733
|
-
<div class="method-source-code" id="
|
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">""</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">"Z"</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
|
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">"Z"</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-
|
752
|
-
<a name="
|
753
|
-
|
754
|
-
<div class="method-heading">
|
755
|
-
<a href="#
|
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('
|
766
|
-
<div class="method-source-code" id="
|
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">"element"</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">"link"</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">"href"</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">"rel"</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">"edit"</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>
|