gcalapi 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. data/Rakefile +1 -1
  2. data/VERSION +1 -1
  3. data/html/classes/GoogleCalendar.html +149 -149
  4. data/html/classes/GoogleCalendar/AuthSubFailed.html +162 -162
  5. data/html/classes/GoogleCalendar/AuthSubUtil.html +352 -352
  6. data/html/classes/GoogleCalendar/AuthenticationFailed.html +110 -110
  7. data/html/classes/GoogleCalendar/Calendar.html +381 -381
  8. data/html/classes/GoogleCalendar/Event.html +699 -699
  9. data/html/classes/GoogleCalendar/EventDeleteFailed.html +110 -110
  10. data/html/classes/GoogleCalendar/EventGetFailed.html +110 -110
  11. data/html/classes/GoogleCalendar/EventInsertFailed.html +110 -110
  12. data/html/classes/GoogleCalendar/EventUpdateFailed.html +110 -110
  13. data/html/classes/GoogleCalendar/InvalidCalendarURL.html +110 -110
  14. data/html/classes/GoogleCalendar/Service.html +245 -305
  15. data/html/classes/GoogleCalendar/ServiceAuthSub.html +176 -176
  16. data/html/classes/GoogleCalendar/ServiceBase.html +752 -693
  17. data/html/created.rid +1 -1
  18. data/html/files/README.html +117 -117
  19. data/html/files/lib/googlecalendar/auth_sub_util_rb.html +110 -110
  20. data/html/files/lib/googlecalendar/calendar_rb.html +109 -109
  21. data/html/files/lib/googlecalendar/event_rb.html +109 -109
  22. data/html/files/lib/googlecalendar/service_auth_sub_rb.html +107 -107
  23. data/html/files/lib/googlecalendar/service_base_rb.html +113 -113
  24. data/html/files/lib/googlecalendar/service_rb.html +107 -107
  25. data/html/fr_class_index.html +39 -39
  26. data/html/fr_file_index.html +32 -32
  27. data/html/fr_method_index.html +75 -75
  28. data/html/index.html +23 -23
  29. data/html/rdoc-style.css +207 -207
  30. data/lib/googlecalendar/service.rb +1 -18
  31. data/lib/googlecalendar/service_base.rb +17 -0
  32. data/test/03_authsub_test.rb +14 -2
  33. data/test/all.bat +1 -0
  34. data/test/all.sh +0 -0
  35. data/test/each.sh +0 -0
  36. metadata +47 -70
  37. data/VERSION.BAK +0 -1
@@ -1,181 +1,181 @@
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::ServiceAuthSub</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::ServiceAuthSub</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/googlecalendar/service_auth_sub_rb.html">
59
- lib/googlecalendar/service_auth_sub.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
- <a href="ServiceBase.html">
69
- ServiceBase
70
- </a>
71
- </td>
72
- </tr>
73
- </table>
74
- </div>
75
- <!-- banner header -->
76
-
77
- <div id="bodyContent">
78
-
79
-
80
-
81
- <div id="contextContent">
82
-
83
- <div id="description">
84
- <p>
85
- this class interacts with Google <a href="Calendar.html">Calendar</a> and
86
- uses AuthSub interface for authentication.
87
- </p>
88
-
89
- </div>
90
-
91
-
92
- </div>
93
-
94
- <div id="method-list">
95
- <h3 class="section-bar">Methods</h3>
96
-
97
- <div class="name-list">
98
- <a href="#M000002">add_authorize_header</a>&nbsp;&nbsp;
99
- <a href="#M000001">new</a>&nbsp;&nbsp;
100
- </div>
101
- </div>
102
-
103
- </div>
104
-
105
-
106
- <!-- if includes -->
107
-
108
- <div id="section">
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
- <!-- if method_list -->
118
- <div id="methods">
119
- <h3 class="section-bar">Public Class methods</h3>
120
-
121
- <div id="method-M000001" class="method-detail">
122
- <a name="M000001"></a>
123
-
124
- <div class="method-heading">
125
- <a href="#M000001" class="method-signature">
126
- <span class="method-name">new</span><span class="method-args">(token)</span>
127
- </a>
128
- </div>
129
-
130
- <div class="method-description">
131
- <p><a class="source-toggle" href="#"
132
- onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
133
- <div class="method-source-code" id="M000001-source">
134
- <pre>
135
- <span class="ruby-comment cmt"># File lib/googlecalendar/service_auth_sub.rb, line 9</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::ServiceAuthSub</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::ServiceAuthSub</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/googlecalendar/service_auth_sub_rb.html">
59
+ lib/googlecalendar/service_auth_sub.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
+ <a href="ServiceBase.html">
69
+ ServiceBase
70
+ </a>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+ <div id="description">
84
+ <p>
85
+ this class interacts with Google <a href="Calendar.html">Calendar</a> and
86
+ uses AuthSub interface for authentication.
87
+ </p>
88
+
89
+ </div>
90
+
91
+
92
+ </div>
93
+
94
+ <div id="method-list">
95
+ <h3 class="section-bar">Methods</h3>
96
+
97
+ <div class="name-list">
98
+ <a href="#M000002">add_authorize_header</a>&nbsp;&nbsp;
99
+ <a href="#M000001">new</a>&nbsp;&nbsp;
100
+ </div>
101
+ </div>
102
+
103
+ </div>
104
+
105
+
106
+ <!-- if includes -->
107
+
108
+ <div id="section">
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+ <!-- if method_list -->
118
+ <div id="methods">
119
+ <h3 class="section-bar">Public Class methods</h3>
120
+
121
+ <div id="method-M000001" class="method-detail">
122
+ <a name="M000001"></a>
123
+
124
+ <div class="method-heading">
125
+ <a href="#M000001" class="method-signature">
126
+ <span class="method-name">new</span><span class="method-args">(token)</span>
127
+ </a>
128
+ </div>
129
+
130
+ <div class="method-description">
131
+ <p><a class="source-toggle" href="#"
132
+ onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
133
+ <div class="method-source-code" id="M000001-source">
134
+ <pre>
135
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service_auth_sub.rb, line 9</span>
136
136
  9: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">token</span>)
137
137
  10: <span class="ruby-ivar">@auth</span> = <span class="ruby-identifier">token</span>
138
- 11: <span class="ruby-keyword kw">end</span>
139
- </pre>
140
- </div>
141
- </div>
142
- </div>
143
-
144
- <h3 class="section-bar">Private Instance methods</h3>
145
-
146
- <div id="method-M000002" class="method-detail">
147
- <a name="M000002"></a>
148
-
149
- <div class="method-heading">
150
- <a href="#M000002" class="method-signature">
151
- <span class="method-name">add_authorize_header</span><span class="method-args">(header)</span>
152
- </a>
153
- </div>
154
-
155
- <div class="method-description">
156
- <p><a class="source-toggle" href="#"
157
- onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
158
- <div class="method-source-code" id="M000002-source">
159
- <pre>
160
- <span class="ruby-comment cmt"># File lib/googlecalendar/service_auth_sub.rb, line 14</span>
138
+ 11: <span class="ruby-keyword kw">end</span>
139
+ </pre>
140
+ </div>
141
+ </div>
142
+ </div>
143
+
144
+ <h3 class="section-bar">Private Instance methods</h3>
145
+
146
+ <div id="method-M000002" class="method-detail">
147
+ <a name="M000002"></a>
148
+
149
+ <div class="method-heading">
150
+ <a href="#M000002" class="method-signature">
151
+ <span class="method-name">add_authorize_header</span><span class="method-args">(header)</span>
152
+ </a>
153
+ </div>
154
+
155
+ <div class="method-description">
156
+ <p><a class="source-toggle" href="#"
157
+ onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
158
+ <div class="method-source-code" id="M000002-source">
159
+ <pre>
160
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service_auth_sub.rb, line 14</span>
161
161
  14: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_authorize_header</span>(<span class="ruby-identifier">header</span>)
162
162
  15: <span class="ruby-identifier">header</span>[<span class="ruby-value str">&quot;Authorization&quot;</span>] = <span class="ruby-node">&quot;AuthSub token=#{@auth}&quot;</span>
163
- 16: <span class="ruby-keyword kw">end</span>
164
- </pre>
165
- </div>
166
- </div>
167
- </div>
168
-
169
-
170
- </div>
171
-
172
-
173
- </div>
174
-
175
-
176
- <div id="validator-badges">
177
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
178
- </div>
179
-
180
- </body>
163
+ 16: <span class="ruby-keyword kw">end</span>
164
+ </pre>
165
+ </div>
166
+ </div>
167
+ </div>
168
+
169
+
170
+ </div>
171
+
172
+
173
+ </div>
174
+
175
+
176
+ <div id="validator-badges">
177
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
178
+ </div>
179
+
180
+ </body>
181
181
  </html>
@@ -1,695 +1,754 @@
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::ServiceBase</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::ServiceBase</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/googlecalendar/service_base_rb.html">
59
- lib/googlecalendar/service_base.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
- <p>
83
- This class interacts with google calendar service.
84
- </p>
85
-
86
- </div>
87
-
88
-
89
- </div>
90
-
91
- <div id="method-list">
92
- <h3 class="section-bar">Methods</h3>
93
-
94
- <div class="name-list">
95
- <a href="#M000041">auth</a>&nbsp;&nbsp;
96
- <a href="#M000038">delete</a>&nbsp;&nbsp;
97
- <a href="#M000043">do_get</a>&nbsp;&nbsp;
98
- <a href="#M000042">do_post</a>&nbsp;&nbsp;
99
- <a href="#M000039">insert</a>&nbsp;&nbsp;
100
- <a href="#M000045">path_with_authorized_query</a>&nbsp;&nbsp;
101
- <a href="#M000029">proxy_addr</a>&nbsp;&nbsp;
102
- <a href="#M000030">proxy_addr=</a>&nbsp;&nbsp;
103
- <a href="#M000035">proxy_pass</a>&nbsp;&nbsp;
104
- <a href="#M000036">proxy_pass=</a>&nbsp;&nbsp;
105
- <a href="#M000031">proxy_port</a>&nbsp;&nbsp;
106
- <a href="#M000032">proxy_port=</a>&nbsp;&nbsp;
107
- <a href="#M000033">proxy_user</a>&nbsp;&nbsp;
108
- <a href="#M000034">proxy_user=</a>&nbsp;&nbsp;
109
- <a href="#M000037">query</a>&nbsp;&nbsp;
110
- <a href="#M000044">try_http</a>&nbsp;&nbsp;
111
- <a href="#M000040">update</a>&nbsp;&nbsp;
112
- </div>
113
- </div>
114
-
115
- </div>
116
-
117
-
118
- <!-- if includes -->
119
-
120
- <div id="section">
121
-
122
-
123
- <div id="constants-list">
124
- <h3 class="section-bar">Constants</h3>
125
-
126
- <div class="name-list">
127
- <table summary="Constants">
128
- <tr class="top-aligned-row context-row">
129
- <td class="context-item-name">AUTH_SERVER</td>
130
- <td>=</td>
131
- <td class="context-item-value">&quot;www.google.com&quot;</td>
132
- <td width="3em">&nbsp;</td>
133
- <td class="context-item-desc">
134
- Server name to Authenticate
135
-
136
- </td>
137
- </tr>
138
- </table>
139
- </div>
140
- </div>
141
-
142
-
143
-
144
- <div id="attribute-list">
145
- <h3 class="section-bar">Attributes</h3>
146
-
147
- <div class="name-list">
148
- <table>
149
- <tr class="top-aligned-row context-row">
150
- <td class="context-item-name">logger</td>
151
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
152
- <td class="context-item-desc"></td>
153
- </tr>
154
- </table>
155
- </div>
156
- </div>
157
-
158
-
159
-
160
- <!-- if method_list -->
161
- <div id="methods">
162
- <h3 class="section-bar">Public Class methods</h3>
163
-
164
- <div id="method-M000029" class="method-detail">
165
- <a name="M000029"></a>
166
-
167
- <div class="method-heading">
168
- <a href="#M000029" class="method-signature">
169
- <span class="method-name">proxy_addr</span><span class="method-args">()</span>
170
- </a>
171
- </div>
172
-
173
- <div class="method-description">
174
- <p><a class="source-toggle" href="#"
175
- onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
176
- <div class="method-source-code" id="M000029-source">
177
- <pre>
178
- <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 24</span>
179
- 24: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">proxy_addr</span>
180
- 25: <span class="ruby-ivar">@@proxy_addr</span>
181
- 26: <span class="ruby-keyword kw">end</span>
182
- </pre>
183
- </div>
184
- </div>
185
- </div>
186
-
187
- <div id="method-M000030" class="method-detail">
188
- <a name="M000030"></a>
189
-
190
- <div class="method-heading">
191
- <a href="#M000030" class="method-signature">
192
- <span class="method-name">proxy_addr=</span><span class="method-args">(addr)</span>
193
- </a>
194
- </div>
195
-
196
- <div class="method-description">
197
- <p><a class="source-toggle" href="#"
198
- onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
199
- <div class="method-source-code" id="M000030-source">
200
- <pre>
201
- <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 28</span>
202
- 28: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">proxy_addr=</span>(<span class="ruby-identifier">addr</span>)
203
- 29: <span class="ruby-ivar">@@proxy_addr</span>=<span class="ruby-identifier">addr</span>
204
- 30: <span class="ruby-keyword kw">end</span>
205
- </pre>
206
- </div>
207
- </div>
208
- </div>
209
-
210
- <div id="method-M000035" class="method-detail">
211
- <a name="M000035"></a>
212
-
213
- <div class="method-heading">
214
- <a href="#M000035" class="method-signature">
215
- <span class="method-name">proxy_pass</span><span class="method-args">()</span>
216
- </a>
217
- </div>
218
-
219
- <div class="method-description">
220
- <p><a class="source-toggle" href="#"
221
- onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
222
- <div class="method-source-code" id="M000035-source">
223
- <pre>
224
- <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 54</span>
225
- 54: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">proxy_pass</span>
226
- 55: <span class="ruby-ivar">@@proxy_pass</span>
227
- 56: <span class="ruby-keyword kw">end</span>
228
- </pre>
229
- </div>
230
- </div>
231
- </div>
232
-
233
- <div id="method-M000036" class="method-detail">
234
- <a name="M000036"></a>
235
-
236
- <div class="method-heading">
237
- <a href="#M000036" class="method-signature">
238
- <span class="method-name">proxy_pass=</span><span class="method-args">(pass)</span>
239
- </a>
240
- </div>
241
-
242
- <div class="method-description">
243
- <p><a class="source-toggle" href="#"
244
- onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
245
- <div class="method-source-code" id="M000036-source">
246
- <pre>
247
- <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 58</span>
248
- 58: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">proxy_pass=</span>(<span class="ruby-identifier">pass</span>)
249
- 59: <span class="ruby-ivar">@@proxy_pass</span> = <span class="ruby-identifier">pass</span>
250
- 60: <span class="ruby-keyword kw">end</span>
251
- </pre>
252
- </div>
253
- </div>
254
- </div>
255
-
256
- <div id="method-M000031" class="method-detail">
257
- <a name="M000031"></a>
258
-
259
- <div class="method-heading">
260
- <a href="#M000031" class="method-signature">
261
- <span class="method-name">proxy_port</span><span class="method-args">()</span>
262
- </a>
263
- </div>
264
-
265
- <div class="method-description">
266
- <p><a class="source-toggle" href="#"
267
- onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
268
- <div class="method-source-code" id="M000031-source">
269
- <pre>
270
- <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 34</span>
271
- 34: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">proxy_port</span>
272
- 35: <span class="ruby-ivar">@@proxy_port</span>
273
- 36: <span class="ruby-keyword kw">end</span>
274
- </pre>
275
- </div>
276
- </div>
277
- </div>
278
-
279
- <div id="method-M000032" class="method-detail">
280
- <a name="M000032"></a>
281
-
282
- <div class="method-heading">
283
- <a href="#M000032" class="method-signature">
284
- <span class="method-name">proxy_port=</span><span class="method-args">(port)</span>
285
- </a>
286
- </div>
287
-
288
- <div class="method-description">
289
- <p><a class="source-toggle" href="#"
290
- onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
291
- <div class="method-source-code" id="M000032-source">
292
- <pre>
293
- <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 38</span>
294
- 38: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">proxy_port=</span>(<span class="ruby-identifier">port</span>)
295
- 39: <span class="ruby-ivar">@@proxy_port</span> = <span class="ruby-identifier">port</span>
296
- 40: <span class="ruby-keyword kw">end</span>
297
- </pre>
298
- </div>
299
- </div>
300
- </div>
301
-
302
- <div id="method-M000033" class="method-detail">
303
- <a name="M000033"></a>
304
-
305
- <div class="method-heading">
306
- <a href="#M000033" class="method-signature">
307
- <span class="method-name">proxy_user</span><span class="method-args">()</span>
308
- </a>
309
- </div>
310
-
311
- <div class="method-description">
312
- <p><a class="source-toggle" href="#"
313
- onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
314
- <div class="method-source-code" id="M000033-source">
315
- <pre>
316
- <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 44</span>
317
- 44: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">proxy_user</span>
318
- 45: <span class="ruby-ivar">@@proxy_user</span>
319
- 46: <span class="ruby-keyword kw">end</span>
320
- </pre>
321
- </div>
322
- </div>
323
- </div>
324
-
325
- <div id="method-M000034" class="method-detail">
326
- <a name="M000034"></a>
327
-
328
- <div class="method-heading">
329
- <a href="#M000034" class="method-signature">
330
- <span class="method-name">proxy_user=</span><span class="method-args">(user)</span>
331
- </a>
332
- </div>
333
-
334
- <div class="method-description">
335
- <p><a class="source-toggle" href="#"
336
- onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
337
- <div class="method-source-code" id="M000034-source">
338
- <pre>
339
- <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 48</span>
340
- 48: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">proxy_user=</span>(<span class="ruby-identifier">user</span>)
341
- 49: <span class="ruby-ivar">@@proxy_user</span> = <span class="ruby-identifier">user</span>
342
- 50: <span class="ruby-keyword kw">end</span>
343
- </pre>
344
- </div>
345
- </div>
346
- </div>
347
-
348
- <h3 class="section-bar">Public Instance methods</h3>
349
-
350
- <div id="method-M000038" class="method-detail">
351
- <a name="M000038"></a>
352
-
353
- <div class="method-heading">
354
- <a href="#M000038" class="method-signature">
355
- <span class="method-name">delete</span><span class="method-args">(feed, event)</span>
356
- </a>
357
- </div>
358
-
359
- <div class="method-description">
360
- <p>
361
- <a href="ServiceBase.html#M000038">delete</a> an event.
362
- </p>
363
- <p><a class="source-toggle" href="#"
364
- onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
365
- <div class="method-source-code" id="M000038-source">
366
- <pre>
367
- <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 95</span>
368
- 95: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">feed</span>, <span class="ruby-identifier">event</span>)
369
- 96: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">&quot;-- delete st --&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
370
- 97: <span class="ruby-identifier">auth</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@auth</span>
371
- 98: <span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">feed</span>)
372
- 99: <span class="ruby-identifier">res</span> = <span class="ruby-identifier">do_post</span>(<span class="ruby-identifier">uri</span>,
373
- 100: {<span class="ruby-value str">&quot;X-HTTP-Method-Override&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;DELETE&quot;</span>,
374
- 101: <span class="ruby-value str">&quot;Content-Type&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;application/atom+xml&quot;</span>,
375
- 102: <span class="ruby-value str">&quot;Content-Length&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">event</span>.<span class="ruby-identifier">length</span>.<span class="ruby-identifier">to_s</span>}, <span class="ruby-identifier">event</span>)
376
- 103: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">&quot;-- delete en (#{res.message}) --&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
377
- 104: <span class="ruby-identifier">res</span>
378
- 105: <span class="ruby-keyword kw">end</span>
379
- </pre>
380
- </div>
381
- </div>
382
- </div>
383
-
384
- <div id="method-M000039" class="method-detail">
385
- <a name="M000039"></a>
386
-
387
- <div class="method-heading">
388
- <a href="#M000039" class="method-signature">
389
- <span class="method-name">insert</span><span class="method-args">(feed, event)</span>
390
- </a>
391
- </div>
392
-
393
- <div class="method-description">
394
- <p>
395
- <a href="ServiceBase.html#M000039">insert</a> an event
396
- </p>
397
- <p><a class="source-toggle" href="#"
398
- onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
399
- <div class="method-source-code" id="M000039-source">
400
- <pre>
401
- <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 110</span>
402
- 110: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">insert</span>(<span class="ruby-identifier">feed</span>, <span class="ruby-identifier">event</span>)
403
- 111: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">&quot;-- insert st --&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
404
- 112: <span class="ruby-identifier">auth</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@auth</span>
405
- 113: <span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">feed</span>)
406
- 114: <span class="ruby-identifier">res</span> = <span class="ruby-identifier">do_post</span>(<span class="ruby-identifier">uri</span>,
407
- 115: {<span class="ruby-value str">&quot;Content-Type&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;application/atom+xml&quot;</span>,
408
- 116: <span class="ruby-value str">&quot;Content-Length&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">event</span>.<span class="ruby-identifier">length</span>.<span class="ruby-identifier">to_s</span>}, <span class="ruby-identifier">event</span>)
409
- 117: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">&quot;-- insert en (#{res.message}) --&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
410
- 118: <span class="ruby-identifier">res</span>
411
- 119: <span class="ruby-keyword kw">end</span>
412
- </pre>
413
- </div>
414
- </div>
415
- </div>
416
-
417
- <div id="method-M000037" class="method-detail">
418
- <a name="M000037"></a>
419
-
420
- <div class="method-heading">
421
- <a href="#M000037" class="method-signature">
422
- <span class="method-name">query</span><span class="method-args">(cal_url, conditions = nil)</span>
423
- </a>
424
- </div>
425
-
426
- <div class="method-description">
427
- <p>
428
- send <a href="ServiceBase.html#M000037">query</a> for events of a calendar
429
- and returns http response object. available condtions are
430
- </p>
431
- <ul>
432
- <li>:q =&gt; <a href="ServiceBase.html#M000037">query</a> string
433
-
434
- </li>
435
- <li>:max-results =&gt; max contents count. (default: 25)
436
-
437
- </li>
438
- <li>:start-index =&gt; 1-based index of the first result to be retrieved
439
-
440
- </li>
441
- <li>:orderby =&gt; the order of retrieved data.
442
-
443
- </li>
444
- <li>:published-min =&gt; Bounds on the entry publication date(oldest)
445
-
446
- </li>
447
- <li>:published-max =&gt; Bounds on the entry publication date(newest)
448
-
449
- </li>
450
- <li>:updated-min =&gt; Bounds on the entry <a
451
- href="ServiceBase.html#M000040">update</a> date(oldest)
452
-
453
- </li>
454
- <li>:updated-max =&gt; Bounds on the entry <a
455
- href="ServiceBase.html#M000040">update</a> date(newest)
456
-
457
- </li>
458
- <li>:author =&gt; Entry author
459
-
460
- </li>
461
- </ul>
462
- <p>
463
- and so on. For detail, see <a
464
- href="http://code.google.com/apis/gdata/protocol.html#Queries">code.google.com/apis/gdata/protocol.html#Queries</a>
465
- </p>
466
- <pre>
467
- and http://code.google.com/apis/calendar/reference.html#Parameters
468
- </pre>
469
- <p><a class="source-toggle" href="#"
470
- onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
471
- <div class="method-source-code" id="M000037-source">
472
- <pre>
473
- <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 80</span>
474
- 80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query</span>(<span class="ruby-identifier">cal_url</span>, <span class="ruby-identifier">conditions</span> = <span class="ruby-keyword kw">nil</span>)
475
- 81: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">&quot;-- query st --&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
476
- 82: <span class="ruby-identifier">auth</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@auth</span>
477
- 83: <span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">cal_url</span>)
478
- 84: <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">query</span> = <span class="ruby-identifier">conditions</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">val</span><span class="ruby-operator">|</span>
479
- 85: <span class="ruby-node">&quot;#{key}=#{URI.escape(val.kind_of?(Time) ? val.getutc.iso8601 : val.to_s)}&quot;</span>
480
- 86: <span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;&amp;&quot;</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">conditions</span>.<span class="ruby-identifier">nil?</span>
481
- 87: <span class="ruby-identifier">res</span> = <span class="ruby-identifier">do_get</span>(<span class="ruby-identifier">uri</span>, {})
482
- 88: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">&quot;-- query en (#{res.message}) --&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
483
- 89: <span class="ruby-identifier">res</span>
484
- 90: <span class="ruby-keyword kw">end</span>
485
- </pre>
486
- </div>
487
- </div>
488
- </div>
489
-
490
- <div id="method-M000040" class="method-detail">
491
- <a name="M000040"></a>
492
-
493
- <div class="method-heading">
494
- <a href="#M000040" class="method-signature">
495
- <span class="method-name">update</span><span class="method-args">(feed, event)</span>
496
- </a>
497
- </div>
498
-
499
- <div class="method-description">
500
- <p>
501
- <a href="ServiceBase.html#M000040">update</a> an event.
502
- </p>
503
- <p><a class="source-toggle" href="#"
504
- onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
505
- <div class="method-source-code" id="M000040-source">
506
- <pre>
507
- <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 124</span>
508
- 124: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update</span>(<span class="ruby-identifier">feed</span>, <span class="ruby-identifier">event</span>)
509
- 125: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">&quot;-- update st --&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
510
- 126: <span class="ruby-identifier">auth</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@auth</span>
511
- 127: <span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">feed</span>)
512
- 128: <span class="ruby-identifier">res</span> = <span class="ruby-identifier">do_post</span>(<span class="ruby-identifier">uri</span>,
513
- 129: {<span class="ruby-value str">&quot;X-HTTP-Method-Override&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;PUT&quot;</span>,
514
- 130: <span class="ruby-value str">&quot;Content-Type&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;application/atom+xml&quot;</span>,
515
- 131: <span class="ruby-value str">&quot;Content-Length&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">event</span>.<span class="ruby-identifier">length</span>.<span class="ruby-identifier">to_s</span>}, <span class="ruby-identifier">event</span>)
516
- 132: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">&quot;-- update en (#{res.message}) --&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
517
- 133: <span class="ruby-identifier">res</span>
518
- 134: <span class="ruby-keyword kw">end</span>
519
- </pre>
520
- </div>
521
- </div>
522
- </div>
523
-
524
- <h3 class="section-bar">Private Instance methods</h3>
525
-
526
- <div id="method-M000041" class="method-detail">
527
- <a name="M000041"></a>
528
-
529
- <div class="method-heading">
530
- <a href="#M000041" class="method-signature">
531
- <span class="method-name">auth</span><span class="method-args">()</span>
532
- </a>
533
- </div>
534
-
535
- <div class="method-description">
536
- <p>
537
- authencate
538
- </p>
539
- <p><a class="source-toggle" href="#"
540
- onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
541
- <div class="method-source-code" id="M000041-source">
542
- <pre>
543
- <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 139</span>
544
- 139: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">auth</span>
545
- 140: <span class="ruby-identifier">raise</span> <span class="ruby-constant">AuthenticationFailed</span>
546
- 141: <span class="ruby-keyword kw">end</span>
547
- </pre>
548
- </div>
549
- </div>
550
- </div>
551
-
552
- <div id="method-M000043" class="method-detail">
553
- <a name="M000043"></a>
554
-
555
- <div class="method-heading">
556
- <a href="#M000043" class="method-signature">
557
- <span class="method-name">do_get</span><span class="method-args">(uri, header)</span>
558
- </a>
559
- </div>
560
-
561
- <div class="method-description">
562
- <p><a class="source-toggle" href="#"
563
- onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
564
- <div class="method-source-code" id="M000043-source">
565
- <pre>
566
- <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 153</span>
567
- 153: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">do_get</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">header</span>)
568
- 154: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">&quot;GET:&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">to_s</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
569
- 155: <span class="ruby-identifier">res</span> = <span class="ruby-keyword kw">nil</span>
570
- 156: <span class="ruby-identifier">try_http</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">header</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">http</span>,<span class="ruby-identifier">path</span>,<span class="ruby-identifier">head</span><span class="ruby-operator">|</span>
571
- 157: <span class="ruby-identifier">res</span> = <span class="ruby-identifier">http</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">head</span>)
572
- 158: <span class="ruby-keyword kw">end</span>
573
- 159: <span class="ruby-identifier">res</span>
574
- 160: <span class="ruby-keyword kw">end</span>
575
- </pre>
576
- </div>
577
- </div>
578
- </div>
579
-
580
- <div id="method-M000042" class="method-detail">
581
- <a name="M000042"></a>
582
-
583
- <div class="method-heading">
584
- <a href="#M000042" class="method-signature">
585
- <span class="method-name">do_post</span><span class="method-args">(uri, header, content)</span>
586
- </a>
587
- </div>
588
-
589
- <div class="method-description">
590
- <p><a class="source-toggle" href="#"
591
- onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
592
- <div class="method-source-code" id="M000042-source">
593
- <pre>
594
- <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 143</span>
595
- 143: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">do_post</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">header</span>, <span class="ruby-identifier">content</span>)
596
- 144: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">&quot;POST:&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">to_s</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
597
- 145: <span class="ruby-identifier">res</span> = <span class="ruby-keyword kw">nil</span>
598
- 146: <span class="ruby-identifier">try_http</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">header</span>, <span class="ruby-identifier">content</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">http</span>,<span class="ruby-identifier">path</span>,<span class="ruby-identifier">head</span>,<span class="ruby-identifier">args</span><span class="ruby-operator">|</span>
599
- 147: <span class="ruby-identifier">cont</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>]
600
- 148: <span class="ruby-identifier">res</span> = <span class="ruby-identifier">http</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">cont</span>, <span class="ruby-identifier">head</span>)
601
- 149: <span class="ruby-keyword kw">end</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::ServiceBase</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::ServiceBase</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/googlecalendar/service_base_rb.html">
59
+ lib/googlecalendar/service_base.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
+ <p>
83
+ This class interacts with google calendar service.
84
+ </p>
85
+
86
+ </div>
87
+
88
+
89
+ </div>
90
+
91
+ <div id="method-list">
92
+ <h3 class="section-bar">Methods</h3>
93
+
94
+ <div class="name-list">
95
+ <a href="#M000043">auth</a>&nbsp;&nbsp;
96
+ <a href="#M000037">calendar_list</a>&nbsp;&nbsp;
97
+ <a href="#M000038">calendars</a>&nbsp;&nbsp;
98
+ <a href="#M000040">delete</a>&nbsp;&nbsp;
99
+ <a href="#M000045">do_get</a>&nbsp;&nbsp;
100
+ <a href="#M000044">do_post</a>&nbsp;&nbsp;
101
+ <a href="#M000041">insert</a>&nbsp;&nbsp;
102
+ <a href="#M000047">path_with_authorized_query</a>&nbsp;&nbsp;
103
+ <a href="#M000029">proxy_addr</a>&nbsp;&nbsp;
104
+ <a href="#M000030">proxy_addr=</a>&nbsp;&nbsp;
105
+ <a href="#M000035">proxy_pass</a>&nbsp;&nbsp;
106
+ <a href="#M000036">proxy_pass=</a>&nbsp;&nbsp;
107
+ <a href="#M000031">proxy_port</a>&nbsp;&nbsp;
108
+ <a href="#M000032">proxy_port=</a>&nbsp;&nbsp;
109
+ <a href="#M000033">proxy_user</a>&nbsp;&nbsp;
110
+ <a href="#M000034">proxy_user=</a>&nbsp;&nbsp;
111
+ <a href="#M000039">query</a>&nbsp;&nbsp;
112
+ <a href="#M000046">try_http</a>&nbsp;&nbsp;
113
+ <a href="#M000042">update</a>&nbsp;&nbsp;
114
+ </div>
115
+ </div>
116
+
117
+ </div>
118
+
119
+
120
+ <!-- if includes -->
121
+
122
+ <div id="section">
123
+
124
+
125
+ <div id="constants-list">
126
+ <h3 class="section-bar">Constants</h3>
127
+
128
+ <div class="name-list">
129
+ <table summary="Constants">
130
+ <tr class="top-aligned-row context-row">
131
+ <td class="context-item-name">AUTH_SERVER</td>
132
+ <td>=</td>
133
+ <td class="context-item-value">&quot;www.google.com&quot;</td>
134
+ <td width="3em">&nbsp;</td>
135
+ <td class="context-item-desc">
136
+ Server name to Authenticate
137
+
138
+ </td>
139
+ </tr>
140
+ <tr class="top-aligned-row context-row">
141
+ <td class="context-item-name">CALENDAR_LIST_PATH</td>
142
+ <td>=</td>
143
+ <td class="context-item-value">&quot;http://www.google.com/calendar/feeds/default/allcalendars/full&quot;</td>
144
+ <td width="3em">&nbsp;</td>
145
+ <td class="context-item-desc">
146
+ URL to get calendar list
147
+
148
+ </td>
149
+ </tr>
150
+ </table>
151
+ </div>
152
+ </div>
153
+
154
+
155
+
156
+ <div id="attribute-list">
157
+ <h3 class="section-bar">Attributes</h3>
158
+
159
+ <div class="name-list">
160
+ <table>
161
+ <tr class="top-aligned-row context-row">
162
+ <td class="context-item-name">logger</td>
163
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
164
+ <td class="context-item-desc"></td>
165
+ </tr>
166
+ </table>
167
+ </div>
168
+ </div>
169
+
170
+
171
+
172
+ <!-- if method_list -->
173
+ <div id="methods">
174
+ <h3 class="section-bar">Public Class methods</h3>
175
+
176
+ <div id="method-M000029" class="method-detail">
177
+ <a name="M000029"></a>
178
+
179
+ <div class="method-heading">
180
+ <a href="#M000029" class="method-signature">
181
+ <span class="method-name">proxy_addr</span><span class="method-args">()</span>
182
+ </a>
183
+ </div>
184
+
185
+ <div class="method-description">
186
+ <p><a class="source-toggle" href="#"
187
+ onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
188
+ <div class="method-source-code" id="M000029-source">
189
+ <pre>
190
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 27</span>
191
+ 27: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">proxy_addr</span>
192
+ 28: <span class="ruby-ivar">@@proxy_addr</span>
193
+ 29: <span class="ruby-keyword kw">end</span>
194
+ </pre>
195
+ </div>
196
+ </div>
197
+ </div>
198
+
199
+ <div id="method-M000030" class="method-detail">
200
+ <a name="M000030"></a>
201
+
202
+ <div class="method-heading">
203
+ <a href="#M000030" class="method-signature">
204
+ <span class="method-name">proxy_addr=</span><span class="method-args">(addr)</span>
205
+ </a>
206
+ </div>
207
+
208
+ <div class="method-description">
209
+ <p><a class="source-toggle" href="#"
210
+ onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
211
+ <div class="method-source-code" id="M000030-source">
212
+ <pre>
213
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 31</span>
214
+ 31: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">proxy_addr=</span>(<span class="ruby-identifier">addr</span>)
215
+ 32: <span class="ruby-ivar">@@proxy_addr</span>=<span class="ruby-identifier">addr</span>
216
+ 33: <span class="ruby-keyword kw">end</span>
217
+ </pre>
218
+ </div>
219
+ </div>
220
+ </div>
221
+
222
+ <div id="method-M000035" class="method-detail">
223
+ <a name="M000035"></a>
224
+
225
+ <div class="method-heading">
226
+ <a href="#M000035" class="method-signature">
227
+ <span class="method-name">proxy_pass</span><span class="method-args">()</span>
228
+ </a>
229
+ </div>
230
+
231
+ <div class="method-description">
232
+ <p><a class="source-toggle" href="#"
233
+ onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
234
+ <div class="method-source-code" id="M000035-source">
235
+ <pre>
236
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 57</span>
237
+ 57: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">proxy_pass</span>
238
+ 58: <span class="ruby-ivar">@@proxy_pass</span>
239
+ 59: <span class="ruby-keyword kw">end</span>
240
+ </pre>
241
+ </div>
242
+ </div>
243
+ </div>
244
+
245
+ <div id="method-M000036" class="method-detail">
246
+ <a name="M000036"></a>
247
+
248
+ <div class="method-heading">
249
+ <a href="#M000036" class="method-signature">
250
+ <span class="method-name">proxy_pass=</span><span class="method-args">(pass)</span>
251
+ </a>
252
+ </div>
253
+
254
+ <div class="method-description">
255
+ <p><a class="source-toggle" href="#"
256
+ onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
257
+ <div class="method-source-code" id="M000036-source">
258
+ <pre>
259
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 61</span>
260
+ 61: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">proxy_pass=</span>(<span class="ruby-identifier">pass</span>)
261
+ 62: <span class="ruby-ivar">@@proxy_pass</span> = <span class="ruby-identifier">pass</span>
262
+ 63: <span class="ruby-keyword kw">end</span>
263
+ </pre>
264
+ </div>
265
+ </div>
266
+ </div>
267
+
268
+ <div id="method-M000031" class="method-detail">
269
+ <a name="M000031"></a>
270
+
271
+ <div class="method-heading">
272
+ <a href="#M000031" class="method-signature">
273
+ <span class="method-name">proxy_port</span><span class="method-args">()</span>
274
+ </a>
275
+ </div>
276
+
277
+ <div class="method-description">
278
+ <p><a class="source-toggle" href="#"
279
+ onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
280
+ <div class="method-source-code" id="M000031-source">
281
+ <pre>
282
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 37</span>
283
+ 37: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">proxy_port</span>
284
+ 38: <span class="ruby-ivar">@@proxy_port</span>
285
+ 39: <span class="ruby-keyword kw">end</span>
286
+ </pre>
287
+ </div>
288
+ </div>
289
+ </div>
290
+
291
+ <div id="method-M000032" class="method-detail">
292
+ <a name="M000032"></a>
293
+
294
+ <div class="method-heading">
295
+ <a href="#M000032" class="method-signature">
296
+ <span class="method-name">proxy_port=</span><span class="method-args">(port)</span>
297
+ </a>
298
+ </div>
299
+
300
+ <div class="method-description">
301
+ <p><a class="source-toggle" href="#"
302
+ onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
303
+ <div class="method-source-code" id="M000032-source">
304
+ <pre>
305
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 41</span>
306
+ 41: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">proxy_port=</span>(<span class="ruby-identifier">port</span>)
307
+ 42: <span class="ruby-ivar">@@proxy_port</span> = <span class="ruby-identifier">port</span>
308
+ 43: <span class="ruby-keyword kw">end</span>
309
+ </pre>
310
+ </div>
311
+ </div>
312
+ </div>
313
+
314
+ <div id="method-M000033" class="method-detail">
315
+ <a name="M000033"></a>
316
+
317
+ <div class="method-heading">
318
+ <a href="#M000033" class="method-signature">
319
+ <span class="method-name">proxy_user</span><span class="method-args">()</span>
320
+ </a>
321
+ </div>
322
+
323
+ <div class="method-description">
324
+ <p><a class="source-toggle" href="#"
325
+ onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
326
+ <div class="method-source-code" id="M000033-source">
327
+ <pre>
328
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 47</span>
329
+ 47: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">proxy_user</span>
330
+ 48: <span class="ruby-ivar">@@proxy_user</span>
331
+ 49: <span class="ruby-keyword kw">end</span>
332
+ </pre>
333
+ </div>
334
+ </div>
335
+ </div>
336
+
337
+ <div id="method-M000034" class="method-detail">
338
+ <a name="M000034"></a>
339
+
340
+ <div class="method-heading">
341
+ <a href="#M000034" class="method-signature">
342
+ <span class="method-name">proxy_user=</span><span class="method-args">(user)</span>
343
+ </a>
344
+ </div>
345
+
346
+ <div class="method-description">
347
+ <p><a class="source-toggle" href="#"
348
+ onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
349
+ <div class="method-source-code" id="M000034-source">
350
+ <pre>
351
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 51</span>
352
+ 51: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">proxy_user=</span>(<span class="ruby-identifier">user</span>)
353
+ 52: <span class="ruby-ivar">@@proxy_user</span> = <span class="ruby-identifier">user</span>
354
+ 53: <span class="ruby-keyword kw">end</span>
355
+ </pre>
356
+ </div>
357
+ </div>
358
+ </div>
359
+
360
+ <h3 class="section-bar">Public Instance methods</h3>
361
+
362
+ <div id="method-M000037" class="method-detail">
363
+ <a name="M000037"></a>
364
+
365
+ <div class="method-heading">
366
+ <a href="#M000037" class="method-signature">
367
+ <span class="method-name">calendar_list</span><span class="method-args">()</span>
368
+ </a>
369
+ </div>
370
+
371
+ <div class="method-description">
372
+ <p>
373
+ get the list of user&#8216;s <a
374
+ href="ServiceBase.html#M000038">calendars</a> and returns http response
375
+ object
376
+ </p>
377
+ <p><a class="source-toggle" href="#"
378
+ onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
379
+ <div class="method-source-code" id="M000037-source">
380
+ <pre>
381
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 70</span>
382
+ 70: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calendar_list</span>
383
+ 71: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">&quot;-- calendar list st --&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
384
+ 72: <span class="ruby-identifier">auth</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@auth</span>
385
+ 73: <span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-constant">CALENDAR_LIST_PATH</span>)
386
+ 74: <span class="ruby-identifier">res</span> = <span class="ruby-identifier">do_get</span>(<span class="ruby-identifier">uri</span>, {})
387
+ 75: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">&quot;-- calendar list en(#{res.message}) --&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
388
+ 76: <span class="ruby-identifier">res</span>
389
+ 77: <span class="ruby-keyword kw">end</span>
390
+ </pre>
391
+ </div>
392
+ </div>
393
+ </div>
394
+
395
+ <div id="method-M000038" class="method-detail">
396
+ <a name="M000038"></a>
397
+
398
+ <div class="method-heading">
399
+ <span class="method-name">calendars</span><span class="method-args">()</span>
400
+ </div>
401
+
402
+ <div class="method-description">
403
+ <p>
404
+ Alias for <a href="ServiceBase.html#M000037">calendar_list</a>
405
+ </p>
406
+ </div>
407
+ </div>
408
+
409
+ <div id="method-M000040" class="method-detail">
410
+ <a name="M000040"></a>
411
+
412
+ <div class="method-heading">
413
+ <a href="#M000040" class="method-signature">
414
+ <span class="method-name">delete</span><span class="method-args">(feed, event)</span>
415
+ </a>
416
+ </div>
417
+
418
+ <div class="method-description">
419
+ <p>
420
+ <a href="ServiceBase.html#M000040">delete</a> an event.
421
+ </p>
422
+ <p><a class="source-toggle" href="#"
423
+ onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
424
+ <div class="method-source-code" id="M000040-source">
425
+ <pre>
426
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 112</span>
427
+ 112: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">feed</span>, <span class="ruby-identifier">event</span>)
428
+ 113: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">&quot;-- delete st --&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
429
+ 114: <span class="ruby-identifier">auth</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@auth</span>
430
+ 115: <span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">feed</span>)
431
+ 116: <span class="ruby-identifier">res</span> = <span class="ruby-identifier">do_post</span>(<span class="ruby-identifier">uri</span>,
432
+ 117: {<span class="ruby-value str">&quot;X-HTTP-Method-Override&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;DELETE&quot;</span>,
433
+ 118: <span class="ruby-value str">&quot;Content-Type&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;application/atom+xml&quot;</span>,
434
+ 119: <span class="ruby-value str">&quot;Content-Length&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">event</span>.<span class="ruby-identifier">length</span>.<span class="ruby-identifier">to_s</span>}, <span class="ruby-identifier">event</span>)
435
+ 120: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">&quot;-- delete en (#{res.message}) --&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
436
+ 121: <span class="ruby-identifier">res</span>
437
+ 122: <span class="ruby-keyword kw">end</span>
438
+ </pre>
439
+ </div>
440
+ </div>
441
+ </div>
442
+
443
+ <div id="method-M000041" class="method-detail">
444
+ <a name="M000041"></a>
445
+
446
+ <div class="method-heading">
447
+ <a href="#M000041" class="method-signature">
448
+ <span class="method-name">insert</span><span class="method-args">(feed, event)</span>
449
+ </a>
450
+ </div>
451
+
452
+ <div class="method-description">
453
+ <p>
454
+ <a href="ServiceBase.html#M000041">insert</a> an event
455
+ </p>
456
+ <p><a class="source-toggle" href="#"
457
+ onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
458
+ <div class="method-source-code" id="M000041-source">
459
+ <pre>
460
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 127</span>
461
+ 127: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">insert</span>(<span class="ruby-identifier">feed</span>, <span class="ruby-identifier">event</span>)
462
+ 128: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">&quot;-- insert st --&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
463
+ 129: <span class="ruby-identifier">auth</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@auth</span>
464
+ 130: <span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">feed</span>)
465
+ 131: <span class="ruby-identifier">res</span> = <span class="ruby-identifier">do_post</span>(<span class="ruby-identifier">uri</span>,
466
+ 132: {<span class="ruby-value str">&quot;Content-Type&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;application/atom+xml&quot;</span>,
467
+ 133: <span class="ruby-value str">&quot;Content-Length&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">event</span>.<span class="ruby-identifier">length</span>.<span class="ruby-identifier">to_s</span>}, <span class="ruby-identifier">event</span>)
468
+ 134: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">&quot;-- insert en (#{res.message}) --&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
469
+ 135: <span class="ruby-identifier">res</span>
470
+ 136: <span class="ruby-keyword kw">end</span>
471
+ </pre>
472
+ </div>
473
+ </div>
474
+ </div>
475
+
476
+ <div id="method-M000039" class="method-detail">
477
+ <a name="M000039"></a>
478
+
479
+ <div class="method-heading">
480
+ <a href="#M000039" class="method-signature">
481
+ <span class="method-name">query</span><span class="method-args">(cal_url, conditions = nil)</span>
482
+ </a>
483
+ </div>
484
+
485
+ <div class="method-description">
486
+ <p>
487
+ send <a href="ServiceBase.html#M000039">query</a> for events of a calendar
488
+ and returns http response object. available condtions are
489
+ </p>
490
+ <ul>
491
+ <li>:q =&gt; <a href="ServiceBase.html#M000039">query</a> string
492
+
493
+ </li>
494
+ <li>:max-results =&gt; max contents count. (default: 25)
495
+
496
+ </li>
497
+ <li>:start-index =&gt; 1-based index of the first result to be retrieved
498
+
499
+ </li>
500
+ <li>:orderby =&gt; the order of retrieved data.
501
+
502
+ </li>
503
+ <li>:published-min =&gt; Bounds on the entry publication date(oldest)
504
+
505
+ </li>
506
+ <li>:published-max =&gt; Bounds on the entry publication date(newest)
507
+
508
+ </li>
509
+ <li>:updated-min =&gt; Bounds on the entry <a
510
+ href="ServiceBase.html#M000042">update</a> date(oldest)
511
+
512
+ </li>
513
+ <li>:updated-max =&gt; Bounds on the entry <a
514
+ href="ServiceBase.html#M000042">update</a> date(newest)
515
+
516
+ </li>
517
+ <li>:author =&gt; Entry author
518
+
519
+ </li>
520
+ </ul>
521
+ <p>
522
+ and so on. For detail, see <a
523
+ href="http://code.google.com/apis/gdata/protocol.html#Queries">code.google.com/apis/gdata/protocol.html#Queries</a>
524
+ </p>
525
+ <pre>
526
+ and http://code.google.com/apis/calendar/reference.html#Parameters
527
+ </pre>
528
+ <p><a class="source-toggle" href="#"
529
+ onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
530
+ <div class="method-source-code" id="M000039-source">
531
+ <pre>
532
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 97</span>
533
+ 97: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query</span>(<span class="ruby-identifier">cal_url</span>, <span class="ruby-identifier">conditions</span> = <span class="ruby-keyword kw">nil</span>)
534
+ 98: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">&quot;-- query st --&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
535
+ 99: <span class="ruby-identifier">auth</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@auth</span>
536
+ 100: <span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">cal_url</span>)
537
+ 101: <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">query</span> = <span class="ruby-identifier">conditions</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">val</span><span class="ruby-operator">|</span>
538
+ 102: <span class="ruby-node">&quot;#{key}=#{URI.escape(val.kind_of?(Time) ? val.getutc.iso8601 : val.to_s)}&quot;</span>
539
+ 103: <span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;&amp;&quot;</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">conditions</span>.<span class="ruby-identifier">nil?</span>
540
+ 104: <span class="ruby-identifier">res</span> = <span class="ruby-identifier">do_get</span>(<span class="ruby-identifier">uri</span>, {})
541
+ 105: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">&quot;-- query en (#{res.message}) --&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
542
+ 106: <span class="ruby-identifier">res</span>
543
+ 107: <span class="ruby-keyword kw">end</span>
544
+ </pre>
545
+ </div>
546
+ </div>
547
+ </div>
548
+
549
+ <div id="method-M000042" class="method-detail">
550
+ <a name="M000042"></a>
551
+
552
+ <div class="method-heading">
553
+ <a href="#M000042" class="method-signature">
554
+ <span class="method-name">update</span><span class="method-args">(feed, event)</span>
555
+ </a>
556
+ </div>
557
+
558
+ <div class="method-description">
559
+ <p>
560
+ <a href="ServiceBase.html#M000042">update</a> an event.
561
+ </p>
562
+ <p><a class="source-toggle" href="#"
563
+ onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
564
+ <div class="method-source-code" id="M000042-source">
565
+ <pre>
566
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 141</span>
567
+ 141: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update</span>(<span class="ruby-identifier">feed</span>, <span class="ruby-identifier">event</span>)
568
+ 142: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">&quot;-- update st --&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
569
+ 143: <span class="ruby-identifier">auth</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@auth</span>
570
+ 144: <span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">feed</span>)
571
+ 145: <span class="ruby-identifier">res</span> = <span class="ruby-identifier">do_post</span>(<span class="ruby-identifier">uri</span>,
572
+ 146: {<span class="ruby-value str">&quot;X-HTTP-Method-Override&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;PUT&quot;</span>,
573
+ 147: <span class="ruby-value str">&quot;Content-Type&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;application/atom+xml&quot;</span>,
574
+ 148: <span class="ruby-value str">&quot;Content-Length&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">event</span>.<span class="ruby-identifier">length</span>.<span class="ruby-identifier">to_s</span>}, <span class="ruby-identifier">event</span>)
575
+ 149: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">&quot;-- update en (#{res.message}) --&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
602
576
  150: <span class="ruby-identifier">res</span>
603
- 151: <span class="ruby-keyword kw">end</span>
604
- </pre>
605
- </div>
606
- </div>
607
- </div>
608
-
609
- <div id="method-M000045" class="method-detail">
610
- <a name="M000045"></a>
611
-
612
- <div class="method-heading">
613
- <a href="#M000045" class="method-signature">
614
- <span class="method-name">path_with_authorized_query</span><span class="method-args">(uri)</span>
615
- </a>
616
- </div>
617
-
618
- <div class="method-description">
619
- <p><a class="source-toggle" href="#"
620
- onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
621
- <div class="method-source-code" id="M000045-source">
622
- <pre>
623
- <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 191</span>
624
- 191: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">path_with_authorized_query</span>(<span class="ruby-identifier">uri</span>)
625
- 192: <span class="ruby-identifier">query</span> = <span class="ruby-constant">CGI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">query</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-value str">&quot;&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">query</span>)
626
- 193: <span class="ruby-identifier">query</span>[<span class="ruby-value str">&quot;gsessionid&quot;</span>] = [<span class="ruby-ivar">@session</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@session</span>
627
- 194: <span class="ruby-identifier">qs</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-node">&quot;#{CGI.escape(k)}=#{CGI.escape(v[0])}&quot;</span> <span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;&amp;&quot;</span>)
628
- 195: <span class="ruby-identifier">qs</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-value">? </span><span class="ruby-identifier">uri</span>.<span class="ruby-identifier">path</span> <span class="ruby-operator">:</span> <span class="ruby-node">&quot;#{uri.path}?#{qs}&quot;</span>
629
- 196: <span class="ruby-keyword kw">end</span>
630
- </pre>
631
- </div>
632
- </div>
633
- </div>
634
-
635
- <div id="method-M000044" class="method-detail">
636
- <a name="M000044"></a>
637
-
638
- <div class="method-heading">
639
- <a href="#M000044" class="method-signature">
640
- <span class="method-name">try_http</span><span class="method-args">(uri, header, *args) {|http, path_with_authorized_query(uri, header, args)| ...}</span>
641
- </a>
642
- </div>
643
-
644
- <div class="method-description">
645
- <p><a class="source-toggle" href="#"
646
- onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
647
- <div class="method-source-code" id="M000044-source">
648
- <pre>
649
- <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 162</span>
650
- 162: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">try_http</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">header</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
651
- 163: <span class="ruby-identifier">res</span> = <span class="ruby-keyword kw">nil</span>
652
- 164: <span class="ruby-identifier">add_authorize_header</span>(<span class="ruby-identifier">header</span>)
653
- 165: <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">start</span>(<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">host</span>, <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">port</span>, <span class="ruby-ivar">@@proxy_addr</span>, <span class="ruby-ivar">@@proxy_port</span>, <span class="ruby-ivar">@@proxy_user</span>, <span class="ruby-ivar">@@proxy_pass</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">http</span><span class="ruby-operator">|</span>
654
- 166: <span class="ruby-identifier">header</span>[<span class="ruby-value str">&quot;Cookie&quot;</span>] = <span class="ruby-ivar">@cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@cookie</span>
655
- 167: <span class="ruby-identifier">res</span> = <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">http</span>, <span class="ruby-identifier">path_with_authorized_query</span>(<span class="ruby-identifier">uri</span>), <span class="ruby-identifier">header</span>, <span class="ruby-identifier">args</span>)
656
- 168: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-identifier">res</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
657
- 169: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">res</span>.<span class="ruby-identifier">code</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;302&quot;</span>
658
- 170: <span class="ruby-identifier">ck</span> = <span class="ruby-identifier">sess</span> = <span class="ruby-keyword kw">nil</span>
659
- 171: <span class="ruby-identifier">ck</span> = <span class="ruby-identifier">res</span>[<span class="ruby-value str">&quot;set-cookie&quot;</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">res</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">&quot;set-cookie&quot;</span>)
660
- 172: <span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">res</span>[<span class="ruby-value str">&quot;location&quot;</span>]) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">res</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">&quot;location&quot;</span>)
661
- 173: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">uri</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">query</span>
662
- 174: <span class="ruby-identifier">qr</span> = <span class="ruby-constant">CGI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">query</span>)
663
- 175: <span class="ruby-identifier">sess</span> = <span class="ruby-identifier">qr</span>[<span class="ruby-value str">&quot;gsessionid&quot;</span>][<span class="ruby-value">0</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">qr</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">&quot;gsessionid&quot;</span>)
664
- 176: <span class="ruby-keyword kw">end</span>
665
- 177: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ck</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">sess</span>
666
- 178: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">&quot;cookie: #{ck}, gsessionid:#{sess}&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
667
- 179: <span class="ruby-identifier">header</span>[<span class="ruby-value str">&quot;Cookie&quot;</span>] = <span class="ruby-ivar">@cookie</span> = <span class="ruby-identifier">ck</span>
668
- 180: <span class="ruby-ivar">@session</span> = <span class="ruby-identifier">sess</span>
669
- 181: <span class="ruby-identifier">res</span> = <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">http</span>, <span class="ruby-identifier">path_with_authorized_query</span>(<span class="ruby-identifier">uri</span>), <span class="ruby-identifier">header</span>, <span class="ruby-identifier">args</span>)
670
- 182: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-identifier">res</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
671
- 183: <span class="ruby-keyword kw">else</span>
672
- 184: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">fatal</span> <span class="ruby-identifier">res</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\n/</span>, <span class="ruby-value str">' '</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
673
- 185: <span class="ruby-keyword kw">end</span>
674
- 186: <span class="ruby-keyword kw">end</span>
675
- 187: <span class="ruby-keyword kw">end</span>
676
- 188: <span class="ruby-identifier">res</span>
677
- 189: <span class="ruby-keyword kw">end</span>
678
- </pre>
679
- </div>
680
- </div>
681
- </div>
682
-
683
-
684
- </div>
685
-
686
-
687
- </div>
688
-
689
-
690
- <div id="validator-badges">
691
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
692
- </div>
693
-
694
- </body>
577
+ 151: <span class="ruby-keyword kw">end</span>
578
+ </pre>
579
+ </div>
580
+ </div>
581
+ </div>
582
+
583
+ <h3 class="section-bar">Private Instance methods</h3>
584
+
585
+ <div id="method-M000043" class="method-detail">
586
+ <a name="M000043"></a>
587
+
588
+ <div class="method-heading">
589
+ <a href="#M000043" class="method-signature">
590
+ <span class="method-name">auth</span><span class="method-args">()</span>
591
+ </a>
592
+ </div>
593
+
594
+ <div class="method-description">
595
+ <p>
596
+ authencate
597
+ </p>
598
+ <p><a class="source-toggle" href="#"
599
+ onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
600
+ <div class="method-source-code" id="M000043-source">
601
+ <pre>
602
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 156</span>
603
+ 156: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">auth</span>
604
+ 157: <span class="ruby-identifier">raise</span> <span class="ruby-constant">AuthenticationFailed</span>
605
+ 158: <span class="ruby-keyword kw">end</span>
606
+ </pre>
607
+ </div>
608
+ </div>
609
+ </div>
610
+
611
+ <div id="method-M000045" class="method-detail">
612
+ <a name="M000045"></a>
613
+
614
+ <div class="method-heading">
615
+ <a href="#M000045" class="method-signature">
616
+ <span class="method-name">do_get</span><span class="method-args">(uri, header)</span>
617
+ </a>
618
+ </div>
619
+
620
+ <div class="method-description">
621
+ <p><a class="source-toggle" href="#"
622
+ onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
623
+ <div class="method-source-code" id="M000045-source">
624
+ <pre>
625
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 170</span>
626
+ 170: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">do_get</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">header</span>)
627
+ 171: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">&quot;GET:&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">to_s</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
628
+ 172: <span class="ruby-identifier">res</span> = <span class="ruby-keyword kw">nil</span>
629
+ 173: <span class="ruby-identifier">try_http</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">header</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">http</span>,<span class="ruby-identifier">path</span>,<span class="ruby-identifier">head</span><span class="ruby-operator">|</span>
630
+ 174: <span class="ruby-identifier">res</span> = <span class="ruby-identifier">http</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">head</span>)
631
+ 175: <span class="ruby-keyword kw">end</span>
632
+ 176: <span class="ruby-identifier">res</span>
633
+ 177: <span class="ruby-keyword kw">end</span>
634
+ </pre>
635
+ </div>
636
+ </div>
637
+ </div>
638
+
639
+ <div id="method-M000044" class="method-detail">
640
+ <a name="M000044"></a>
641
+
642
+ <div class="method-heading">
643
+ <a href="#M000044" class="method-signature">
644
+ <span class="method-name">do_post</span><span class="method-args">(uri, header, content)</span>
645
+ </a>
646
+ </div>
647
+
648
+ <div class="method-description">
649
+ <p><a class="source-toggle" href="#"
650
+ onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
651
+ <div class="method-source-code" id="M000044-source">
652
+ <pre>
653
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 160</span>
654
+ 160: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">do_post</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">header</span>, <span class="ruby-identifier">content</span>)
655
+ 161: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">&quot;POST:&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">to_s</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
656
+ 162: <span class="ruby-identifier">res</span> = <span class="ruby-keyword kw">nil</span>
657
+ 163: <span class="ruby-identifier">try_http</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">header</span>, <span class="ruby-identifier">content</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">http</span>,<span class="ruby-identifier">path</span>,<span class="ruby-identifier">head</span>,<span class="ruby-identifier">args</span><span class="ruby-operator">|</span>
658
+ 164: <span class="ruby-identifier">cont</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>]
659
+ 165: <span class="ruby-identifier">res</span> = <span class="ruby-identifier">http</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">cont</span>, <span class="ruby-identifier">head</span>)
660
+ 166: <span class="ruby-keyword kw">end</span>
661
+ 167: <span class="ruby-identifier">res</span>
662
+ 168: <span class="ruby-keyword kw">end</span>
663
+ </pre>
664
+ </div>
665
+ </div>
666
+ </div>
667
+
668
+ <div id="method-M000047" class="method-detail">
669
+ <a name="M000047"></a>
670
+
671
+ <div class="method-heading">
672
+ <a href="#M000047" class="method-signature">
673
+ <span class="method-name">path_with_authorized_query</span><span class="method-args">(uri)</span>
674
+ </a>
675
+ </div>
676
+
677
+ <div class="method-description">
678
+ <p><a class="source-toggle" href="#"
679
+ onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
680
+ <div class="method-source-code" id="M000047-source">
681
+ <pre>
682
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 208</span>
683
+ 208: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">path_with_authorized_query</span>(<span class="ruby-identifier">uri</span>)
684
+ 209: <span class="ruby-identifier">query</span> = <span class="ruby-constant">CGI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">query</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-value str">&quot;&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">query</span>)
685
+ 210: <span class="ruby-identifier">query</span>[<span class="ruby-value str">&quot;gsessionid&quot;</span>] = [<span class="ruby-ivar">@session</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@session</span>
686
+ 211: <span class="ruby-identifier">qs</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-node">&quot;#{CGI.escape(k)}=#{CGI.escape(v[0])}&quot;</span> <span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;&amp;&quot;</span>)
687
+ 212: <span class="ruby-identifier">qs</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-value">? </span><span class="ruby-identifier">uri</span>.<span class="ruby-identifier">path</span> <span class="ruby-operator">:</span> <span class="ruby-node">&quot;#{uri.path}?#{qs}&quot;</span>
688
+ 213: <span class="ruby-keyword kw">end</span>
689
+ </pre>
690
+ </div>
691
+ </div>
692
+ </div>
693
+
694
+ <div id="method-M000046" class="method-detail">
695
+ <a name="M000046"></a>
696
+
697
+ <div class="method-heading">
698
+ <a href="#M000046" class="method-signature">
699
+ <span class="method-name">try_http</span><span class="method-args">(uri, header, *args) {|http, path_with_authorized_query(uri, header, args)| ...}</span>
700
+ </a>
701
+ </div>
702
+
703
+ <div class="method-description">
704
+ <p><a class="source-toggle" href="#"
705
+ onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
706
+ <div class="method-source-code" id="M000046-source">
707
+ <pre>
708
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line 179</span>
709
+ 179: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">try_http</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">header</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
710
+ 180: <span class="ruby-identifier">res</span> = <span class="ruby-keyword kw">nil</span>
711
+ 181: <span class="ruby-identifier">add_authorize_header</span>(<span class="ruby-identifier">header</span>)
712
+ 182: <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">start</span>(<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">host</span>, <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">port</span>, <span class="ruby-ivar">@@proxy_addr</span>, <span class="ruby-ivar">@@proxy_port</span>, <span class="ruby-ivar">@@proxy_user</span>, <span class="ruby-ivar">@@proxy_pass</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">http</span><span class="ruby-operator">|</span>
713
+ 183: <span class="ruby-identifier">header</span>[<span class="ruby-value str">&quot;Cookie&quot;</span>] = <span class="ruby-ivar">@cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@cookie</span>
714
+ 184: <span class="ruby-identifier">res</span> = <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">http</span>, <span class="ruby-identifier">path_with_authorized_query</span>(<span class="ruby-identifier">uri</span>), <span class="ruby-identifier">header</span>, <span class="ruby-identifier">args</span>)
715
+ 185: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-identifier">res</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
716
+ 186: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">res</span>.<span class="ruby-identifier">code</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;302&quot;</span>
717
+ 187: <span class="ruby-identifier">ck</span> = <span class="ruby-identifier">sess</span> = <span class="ruby-keyword kw">nil</span>
718
+ 188: <span class="ruby-identifier">ck</span> = <span class="ruby-identifier">res</span>[<span class="ruby-value str">&quot;set-cookie&quot;</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">res</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">&quot;set-cookie&quot;</span>)
719
+ 189: <span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">res</span>[<span class="ruby-value str">&quot;location&quot;</span>]) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">res</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">&quot;location&quot;</span>)
720
+ 190: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">uri</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">query</span>
721
+ 191: <span class="ruby-identifier">qr</span> = <span class="ruby-constant">CGI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">query</span>)
722
+ 192: <span class="ruby-identifier">sess</span> = <span class="ruby-identifier">qr</span>[<span class="ruby-value str">&quot;gsessionid&quot;</span>][<span class="ruby-value">0</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">qr</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">&quot;gsessionid&quot;</span>)
723
+ 193: <span class="ruby-keyword kw">end</span>
724
+ 194: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ck</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">sess</span>
725
+ 195: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">&quot;cookie: #{ck}, gsessionid:#{sess}&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
726
+ 196: <span class="ruby-identifier">header</span>[<span class="ruby-value str">&quot;Cookie&quot;</span>] = <span class="ruby-ivar">@cookie</span> = <span class="ruby-identifier">ck</span>
727
+ 197: <span class="ruby-ivar">@session</span> = <span class="ruby-identifier">sess</span>
728
+ 198: <span class="ruby-identifier">res</span> = <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">http</span>, <span class="ruby-identifier">path_with_authorized_query</span>(<span class="ruby-identifier">uri</span>), <span class="ruby-identifier">header</span>, <span class="ruby-identifier">args</span>)
729
+ 199: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-identifier">res</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
730
+ 200: <span class="ruby-keyword kw">else</span>
731
+ 201: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">fatal</span> <span class="ruby-identifier">res</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\n/</span>, <span class="ruby-value str">' '</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
732
+ 202: <span class="ruby-keyword kw">end</span>
733
+ 203: <span class="ruby-keyword kw">end</span>
734
+ 204: <span class="ruby-keyword kw">end</span>
735
+ 205: <span class="ruby-identifier">res</span>
736
+ 206: <span class="ruby-keyword kw">end</span>
737
+ </pre>
738
+ </div>
739
+ </div>
740
+ </div>
741
+
742
+
743
+ </div>
744
+
745
+
746
+ </div>
747
+
748
+
749
+ <div id="validator-badges">
750
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
751
+ </div>
752
+
753
+ </body>
695
754
  </html>