gcalapi 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/html/classes/GoogleCalendar.html +149 -149
- data/html/classes/GoogleCalendar/AuthSubFailed.html +162 -162
- data/html/classes/GoogleCalendar/AuthSubUtil.html +352 -352
- data/html/classes/GoogleCalendar/AuthenticationFailed.html +110 -110
- data/html/classes/GoogleCalendar/Calendar.html +381 -381
- data/html/classes/GoogleCalendar/Event.html +699 -699
- data/html/classes/GoogleCalendar/EventDeleteFailed.html +110 -110
- data/html/classes/GoogleCalendar/EventGetFailed.html +110 -110
- data/html/classes/GoogleCalendar/EventInsertFailed.html +110 -110
- data/html/classes/GoogleCalendar/EventUpdateFailed.html +110 -110
- data/html/classes/GoogleCalendar/InvalidCalendarURL.html +110 -110
- data/html/classes/GoogleCalendar/Service.html +245 -305
- data/html/classes/GoogleCalendar/ServiceAuthSub.html +176 -176
- data/html/classes/GoogleCalendar/ServiceBase.html +752 -693
- data/html/created.rid +1 -1
- data/html/files/README.html +117 -117
- data/html/files/lib/googlecalendar/auth_sub_util_rb.html +110 -110
- data/html/files/lib/googlecalendar/calendar_rb.html +109 -109
- data/html/files/lib/googlecalendar/event_rb.html +109 -109
- data/html/files/lib/googlecalendar/service_auth_sub_rb.html +107 -107
- data/html/files/lib/googlecalendar/service_base_rb.html +113 -113
- data/html/files/lib/googlecalendar/service_rb.html +107 -107
- data/html/fr_class_index.html +39 -39
- data/html/fr_file_index.html +32 -32
- data/html/fr_method_index.html +75 -75
- data/html/index.html +23 -23
- data/html/rdoc-style.css +207 -207
- data/lib/googlecalendar/service.rb +1 -18
- data/lib/googlecalendar/service_base.rb +17 -0
- data/test/03_authsub_test.rb +14 -2
- data/test/all.bat +1 -0
- data/test/all.sh +0 -0
- data/test/each.sh +0 -0
- metadata +47 -70
- data/VERSION.BAK +0 -1
@@ -1,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>
|
99
|
-
<a href="#M000001">new</a>
|
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>
|
99
|
+
<a href="#M000001">new</a>
|
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">"Authorization"</span>] = <span class="ruby-node">"AuthSub token=#{@auth}"</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="#
|
96
|
-
<a href="#
|
97
|
-
<a href="#
|
98
|
-
<a href="#
|
99
|
-
<a href="#
|
100
|
-
<a href="#
|
101
|
-
<a href="#
|
102
|
-
<a href="#
|
103
|
-
<a href="#
|
104
|
-
<a href="#
|
105
|
-
<a href="#
|
106
|
-
<a href="#
|
107
|
-
<a href="#
|
108
|
-
<a href="#
|
109
|
-
<a href="#
|
110
|
-
<a href="#
|
111
|
-
<a href="#
|
112
|
-
</
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
<
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
<td class="context-item-
|
132
|
-
<td
|
133
|
-
<td class="context-item-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
<
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
</
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
<
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
</
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
<
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
</
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
<
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
</
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
<
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
</
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
<
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
</
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
<
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
</
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
<
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
</
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
</
|
357
|
-
</div>
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
<
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
<
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
<
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
<
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
<
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
</
|
431
|
-
<
|
432
|
-
<
|
433
|
-
|
434
|
-
</
|
435
|
-
<
|
436
|
-
|
437
|
-
</
|
438
|
-
|
439
|
-
|
440
|
-
</
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
<
|
445
|
-
|
446
|
-
|
447
|
-
<
|
448
|
-
|
449
|
-
</
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
<
|
455
|
-
|
456
|
-
|
457
|
-
</
|
458
|
-
<
|
459
|
-
|
460
|
-
</
|
461
|
-
</
|
462
|
-
<
|
463
|
-
|
464
|
-
|
465
|
-
</
|
466
|
-
<
|
467
|
-
|
468
|
-
</
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
</
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
<
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
</
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
<
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
<
|
543
|
-
<span class="ruby-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
</
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
<p><a class="source-toggle" href="#"
|
563
|
-
onclick="toggleCode('
|
564
|
-
<div class="method-source-code" id="
|
565
|
-
<pre>
|
566
|
-
<span class="ruby-comment cmt"># File lib/googlecalendar/service_base.rb, line
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
</
|
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">"POST:"</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>
|
96
|
+
<a href="#M000037">calendar_list</a>
|
97
|
+
<a href="#M000038">calendars</a>
|
98
|
+
<a href="#M000040">delete</a>
|
99
|
+
<a href="#M000045">do_get</a>
|
100
|
+
<a href="#M000044">do_post</a>
|
101
|
+
<a href="#M000041">insert</a>
|
102
|
+
<a href="#M000047">path_with_authorized_query</a>
|
103
|
+
<a href="#M000029">proxy_addr</a>
|
104
|
+
<a href="#M000030">proxy_addr=</a>
|
105
|
+
<a href="#M000035">proxy_pass</a>
|
106
|
+
<a href="#M000036">proxy_pass=</a>
|
107
|
+
<a href="#M000031">proxy_port</a>
|
108
|
+
<a href="#M000032">proxy_port=</a>
|
109
|
+
<a href="#M000033">proxy_user</a>
|
110
|
+
<a href="#M000034">proxy_user=</a>
|
111
|
+
<a href="#M000039">query</a>
|
112
|
+
<a href="#M000046">try_http</a>
|
113
|
+
<a href="#M000042">update</a>
|
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">"www.google.com"</td>
|
134
|
+
<td width="3em"> </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">"http://www.google.com/calendar/feeds/default/allcalendars/full"</td>
|
144
|
+
<td width="3em"> </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"> [RW] </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‘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">"-- calendar list st --"</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">"-- calendar list en(#{res.message}) --"</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">"-- delete st --"</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">"X-HTTP-Method-Override"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"DELETE"</span>,
|
433
|
+
118: <span class="ruby-value str">"Content-Type"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/atom+xml"</span>,
|
434
|
+
119: <span class="ruby-value str">"Content-Length"</span> =<span class="ruby-operator">></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">"-- delete en (#{res.message}) --"</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">"-- insert st --"</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">"Content-Type"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/atom+xml"</span>,
|
467
|
+
133: <span class="ruby-value str">"Content-Length"</span> =<span class="ruby-operator">></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">"-- insert en (#{res.message}) --"</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 => <a href="ServiceBase.html#M000039">query</a> string
|
492
|
+
|
493
|
+
</li>
|
494
|
+
<li>:max-results => max contents count. (default: 25)
|
495
|
+
|
496
|
+
</li>
|
497
|
+
<li>:start-index => 1-based index of the first result to be retrieved
|
498
|
+
|
499
|
+
</li>
|
500
|
+
<li>:orderby => the order of retrieved data.
|
501
|
+
|
502
|
+
</li>
|
503
|
+
<li>:published-min => Bounds on the entry publication date(oldest)
|
504
|
+
|
505
|
+
</li>
|
506
|
+
<li>:published-max => Bounds on the entry publication date(newest)
|
507
|
+
|
508
|
+
</li>
|
509
|
+
<li>:updated-min => Bounds on the entry <a
|
510
|
+
href="ServiceBase.html#M000042">update</a> date(oldest)
|
511
|
+
|
512
|
+
</li>
|
513
|
+
<li>:updated-max => Bounds on the entry <a
|
514
|
+
href="ServiceBase.html#M000042">update</a> date(newest)
|
515
|
+
|
516
|
+
</li>
|
517
|
+
<li>:author => 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">"-- query st --"</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">"#{key}=#{URI.escape(val.kind_of?(Time) ? val.getutc.iso8601 : val.to_s)}"</span>
|
539
|
+
103: <span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"&"</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">"-- query en (#{res.message}) --"</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">"-- update st --"</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">"X-HTTP-Method-Override"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"PUT"</span>,
|
573
|
+
147: <span class="ruby-value str">"Content-Type"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/atom+xml"</span>,
|
574
|
+
148: <span class="ruby-value str">"Content-Length"</span> =<span class="ruby-operator">></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">"-- update en (#{res.message}) --"</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
|
-
<
|
610
|
-
|
611
|
-
|
612
|
-
<
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
<
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
</
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
<
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
<
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
</div>
|
693
|
-
|
694
|
-
|
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">"GET:"</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">"POST:"</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">""</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">"gsessionid"</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">"#{CGI.escape(k)}=#{CGI.escape(v[0])}"</span> <span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"&"</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">"#{uri.path}?#{qs}"</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">"Cookie"</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">"302"</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">"set-cookie"</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">"set-cookie"</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">"location"</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">"location"</span>)
|
720
|
+
190: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">uri</span> <span class="ruby-operator">&&</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">"gsessionid"</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">"gsessionid"</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">&&</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">"cookie: #{ck}, gsessionid:#{sess}"</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">"Cookie"</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>
|