gcalapi 0.0.4 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. data/Rakefile +19 -15
  2. data/VERSION +1 -1
  3. data/example/mixi2gcal.rb +88 -0
  4. data/html/classes/GoogleCalendar.html +149 -280
  5. data/html/classes/GoogleCalendar/AuthSubFailed.html +165 -0
  6. data/html/classes/GoogleCalendar/AuthSubUtil.html +397 -0
  7. data/html/classes/GoogleCalendar/AuthenticationFailed.html +110 -110
  8. data/html/classes/GoogleCalendar/Calendar.html +381 -203
  9. data/html/classes/GoogleCalendar/Event.html +800 -510
  10. data/html/classes/GoogleCalendar/EventDeleteFailed.html +110 -110
  11. data/html/classes/GoogleCalendar/EventGetFailed.html +111 -0
  12. data/html/classes/GoogleCalendar/EventInsertFailed.html +110 -110
  13. data/html/classes/GoogleCalendar/EventUpdateFailed.html +110 -110
  14. data/html/classes/GoogleCalendar/InvalidCalendarURL.html +110 -110
  15. data/html/classes/GoogleCalendar/Service.html +305 -594
  16. data/html/classes/GoogleCalendar/ServiceAuthSub.html +181 -0
  17. data/html/classes/GoogleCalendar/ServiceBase.html +694 -0
  18. data/html/created.rid +1 -1
  19. data/html/files/README.html +116 -116
  20. data/html/files/lib/googlecalendar/auth_sub_util_rb.html +111 -0
  21. data/html/files/lib/googlecalendar/calendar_rb.html +109 -109
  22. data/html/files/lib/googlecalendar/event_rb.html +109 -109
  23. data/html/files/lib/googlecalendar/service_auth_sub_rb.html +108 -0
  24. data/html/files/lib/googlecalendar/service_base_rb.html +114 -0
  25. data/html/files/lib/googlecalendar/service_rb.html +107 -113
  26. data/html/fr_class_index.html +39 -34
  27. data/html/fr_file_index.html +32 -29
  28. data/html/fr_method_index.html +75 -52
  29. data/html/index.html +23 -23
  30. data/html/rdoc-style.css +207 -207
  31. data/lib/googlecalendar/auth_sub_util.rb +143 -0
  32. data/lib/googlecalendar/calendar.rb +48 -36
  33. data/lib/googlecalendar/event.rb +16 -11
  34. data/lib/googlecalendar/service.rb +30 -180
  35. data/lib/googlecalendar/service_auth_sub.rb +18 -0
  36. data/lib/googlecalendar/service_base.rb +197 -0
  37. data/test/00_service_test.rb +2 -1
  38. data/test/01_calendar_test.rb +1 -1
  39. data/test/02_event_test.rb +28 -1
  40. data/test/03_authsub_test.rb +119 -0
  41. data/test/base_unit.rb +3 -0
  42. metadata +105 -62
@@ -1,111 +1,111 @@
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::EventUpdateFailed</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::EventUpdateFailed</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/googlecalendar/event_rb.html">
59
- lib/googlecalendar/event.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- StandardError
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
-
82
-
83
- </div>
84
-
85
-
86
- </div>
87
-
88
-
89
- <!-- if includes -->
90
-
91
- <div id="section">
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
- <!-- if method_list -->
101
-
102
-
103
- </div>
104
-
105
-
106
- <div id="validator-badges">
107
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
108
- </div>
109
-
110
- </body>
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::EventUpdateFailed</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::EventUpdateFailed</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/googlecalendar/event_rb.html">
59
+ lib/googlecalendar/event.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ StandardError
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
+
82
+
83
+ </div>
84
+
85
+
86
+ </div>
87
+
88
+
89
+ <!-- if includes -->
90
+
91
+ <div id="section">
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+ <!-- if method_list -->
101
+
102
+
103
+ </div>
104
+
105
+
106
+ <div id="validator-badges">
107
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
108
+ </div>
109
+
110
+ </body>
111
111
  </html>
@@ -1,111 +1,111 @@
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::InvalidCalendarURL</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::InvalidCalendarURL</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/googlecalendar/calendar_rb.html">
59
- lib/googlecalendar/calendar.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
- StandardError
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
-
82
-
83
- </div>
84
-
85
-
86
- </div>
87
-
88
-
89
- <!-- if includes -->
90
-
91
- <div id="section">
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
- <!-- if method_list -->
101
-
102
-
103
- </div>
104
-
105
-
106
- <div id="validator-badges">
107
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
108
- </div>
109
-
110
- </body>
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::InvalidCalendarURL</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::InvalidCalendarURL</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/googlecalendar/calendar_rb.html">
59
+ lib/googlecalendar/calendar.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
+ StandardError
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
+
82
+
83
+ </div>
84
+
85
+
86
+ </div>
87
+
88
+
89
+ <!-- if includes -->
90
+
91
+ <div id="section">
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+ <!-- if method_list -->
101
+
102
+
103
+ </div>
104
+
105
+
106
+ <div id="validator-badges">
107
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
108
+ </div>
109
+
110
+ </body>
111
111
  </html>
@@ -1,595 +1,306 @@
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::Service</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::Service</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/googlecalendar/service_rb.html">
59
- lib/googlecalendar/service.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="#M000022">calendar_list</a>&nbsp;&nbsp;
96
- <a href="#M000023">calendars</a>&nbsp;&nbsp;
97
- <a href="#M000025">delete</a>&nbsp;&nbsp;
98
- <a href="#M000026">insert</a>&nbsp;&nbsp;
99
- <a href="#M000021">new</a>&nbsp;&nbsp;
100
- <a href="#M000013">proxy_addr</a>&nbsp;&nbsp;
101
- <a href="#M000014">proxy_addr=</a>&nbsp;&nbsp;
102
- <a href="#M000019">proxy_pass</a>&nbsp;&nbsp;
103
- <a href="#M000020">proxy_pass=</a>&nbsp;&nbsp;
104
- <a href="#M000015">proxy_port</a>&nbsp;&nbsp;
105
- <a href="#M000016">proxy_port=</a>&nbsp;&nbsp;
106
- <a href="#M000017">proxy_user</a>&nbsp;&nbsp;
107
- <a href="#M000018">proxy_user=</a>&nbsp;&nbsp;
108
- <a href="#M000024">query</a>&nbsp;&nbsp;
109
- <a href="#M000027">update</a>&nbsp;&nbsp;
110
- </div>
111
- </div>
112
-
113
- </div>
114
-
115
-
116
- <!-- if includes -->
117
-
118
- <div id="section">
119
-
120
-
121
- <div id="constants-list">
122
- <h3 class="section-bar">Constants</h3>
123
-
124
- <div class="name-list">
125
- <table summary="Constants">
126
- <tr class="top-aligned-row context-row">
127
- <td class="context-item-name">AUTH_SERVER</td>
128
- <td>=</td>
129
- <td class="context-item-value">&quot;www.google.com&quot;</td>
130
- <td width="3em">&nbsp;</td>
131
- <td class="context-item-desc">
132
- Server name to Authenticate
133
-
134
- </td>
135
- </tr>
136
- <tr class="top-aligned-row context-row">
137
- <td class="context-item-name">AUTH_PATH</td>
138
- <td>=</td>
139
- <td class="context-item-value">&quot;/accounts/ClientLogin&quot;</td>
140
- <td width="3em">&nbsp;</td>
141
- <td class="context-item-desc">
142
- Server Path to authenticate
143
-
144
- </td>
145
- </tr>
146
- <tr class="top-aligned-row context-row">
147
- <td class="context-item-name">CALENDAR_LIST_PATH</td>
148
- <td>=</td>
149
- <td class="context-item-value">&quot;http://www.google.com/calendar/feeds/&quot;</td>
150
- <td width="3em">&nbsp;</td>
151
- <td class="context-item-desc">
152
- URL to get calendar list
153
-
154
- </td>
155
- </tr>
156
- </table>
157
- </div>
158
- </div>
159
-
160
-
161
-
162
-
163
-
164
-
165
- <!-- if method_list -->
166
- <div id="methods">
167
- <h3 class="section-bar">Public Class methods</h3>
168
-
169
- <div id="method-M000021" class="method-detail">
170
- <a name="M000021"></a>
171
-
172
- <div class="method-heading">
173
- <a href="#M000021" class="method-signature">
174
- <span class="method-name">new</span><span class="method-args">(email, pass)</span>
175
- </a>
176
- </div>
177
-
178
- <div class="method-description">
179
- <p><a class="source-toggle" href="#"
180
- onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
181
- <div class="method-source-code" id="M000021-source">
182
- <pre>
183
- <span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 69</span>
184
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">email</span>, <span class="ruby-identifier">pass</span>)
185
- <span class="ruby-ivar">@email</span> = <span class="ruby-identifier">email</span>
186
- <span class="ruby-ivar">@pass</span> = <span class="ruby-identifier">pass</span>
187
- <span class="ruby-ivar">@session</span> = <span class="ruby-keyword kw">nil</span>
188
- <span class="ruby-ivar">@cookie</span> = <span class="ruby-keyword kw">nil</span>
189
- <span class="ruby-ivar">@auth</span> = <span class="ruby-keyword kw">nil</span>
190
- <span class="ruby-keyword kw">end</span>
191
- </pre>
192
- </div>
193
- </div>
194
- </div>
195
-
196
- <div id="method-M000013" class="method-detail">
197
- <a name="M000013"></a>
198
-
199
- <div class="method-heading">
200
- <a href="#M000013" class="method-signature">
201
- <span class="method-name">proxy_addr</span><span class="method-args">()</span>
202
- </a>
203
- </div>
204
-
205
- <div class="method-description">
206
- <p><a class="source-toggle" href="#"
207
- onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
208
- <div class="method-source-code" id="M000013-source">
209
- <pre>
210
- <span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 30</span>
211
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">proxy_addr</span>
212
- <span class="ruby-ivar">@@proxy_addr</span>
213
- <span class="ruby-keyword kw">end</span>
214
- </pre>
215
- </div>
216
- </div>
217
- </div>
218
-
219
- <div id="method-M000014" class="method-detail">
220
- <a name="M000014"></a>
221
-
222
- <div class="method-heading">
223
- <a href="#M000014" class="method-signature">
224
- <span class="method-name">proxy_addr=</span><span class="method-args">(addr)</span>
225
- </a>
226
- </div>
227
-
228
- <div class="method-description">
229
- <p><a class="source-toggle" href="#"
230
- onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
231
- <div class="method-source-code" id="M000014-source">
232
- <pre>
233
- <span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 34</span>
234
- <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>)
235
- <span class="ruby-ivar">@@proxy_addr</span>=<span class="ruby-identifier">addr</span>
236
- <span class="ruby-keyword kw">end</span>
237
- </pre>
238
- </div>
239
- </div>
240
- </div>
241
-
242
- <div id="method-M000019" class="method-detail">
243
- <a name="M000019"></a>
244
-
245
- <div class="method-heading">
246
- <a href="#M000019" class="method-signature">
247
- <span class="method-name">proxy_pass</span><span class="method-args">()</span>
248
- </a>
249
- </div>
250
-
251
- <div class="method-description">
252
- <p><a class="source-toggle" href="#"
253
- onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
254
- <div class="method-source-code" id="M000019-source">
255
- <pre>
256
- <span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 60</span>
257
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">proxy_pass</span>
258
- <span class="ruby-ivar">@@proxy_pass</span>
259
- <span class="ruby-keyword kw">end</span>
260
- </pre>
261
- </div>
262
- </div>
263
- </div>
264
-
265
- <div id="method-M000020" class="method-detail">
266
- <a name="M000020"></a>
267
-
268
- <div class="method-heading">
269
- <a href="#M000020" class="method-signature">
270
- <span class="method-name">proxy_pass=</span><span class="method-args">(pass)</span>
271
- </a>
272
- </div>
273
-
274
- <div class="method-description">
275
- <p><a class="source-toggle" href="#"
276
- onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
277
- <div class="method-source-code" id="M000020-source">
278
- <pre>
279
- <span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 64</span>
280
- <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>)
281
- <span class="ruby-ivar">@@proxy_pass</span> = <span class="ruby-identifier">pass</span>
282
- <span class="ruby-keyword kw">end</span>
283
- </pre>
284
- </div>
285
- </div>
286
- </div>
287
-
288
- <div id="method-M000015" class="method-detail">
289
- <a name="M000015"></a>
290
-
291
- <div class="method-heading">
292
- <a href="#M000015" class="method-signature">
293
- <span class="method-name">proxy_port</span><span class="method-args">()</span>
294
- </a>
295
- </div>
296
-
297
- <div class="method-description">
298
- <p><a class="source-toggle" href="#"
299
- onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
300
- <div class="method-source-code" id="M000015-source">
301
- <pre>
302
- <span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 40</span>
303
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">proxy_port</span>
304
- <span class="ruby-ivar">@@proxy_port</span>
305
- <span class="ruby-keyword kw">end</span>
306
- </pre>
307
- </div>
308
- </div>
309
- </div>
310
-
311
- <div id="method-M000016" class="method-detail">
312
- <a name="M000016"></a>
313
-
314
- <div class="method-heading">
315
- <a href="#M000016" class="method-signature">
316
- <span class="method-name">proxy_port=</span><span class="method-args">(port)</span>
317
- </a>
318
- </div>
319
-
320
- <div class="method-description">
321
- <p><a class="source-toggle" href="#"
322
- onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
323
- <div class="method-source-code" id="M000016-source">
324
- <pre>
325
- <span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 44</span>
326
- <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>)
327
- <span class="ruby-ivar">@@proxy_port</span> = <span class="ruby-identifier">port</span>
328
- <span class="ruby-keyword kw">end</span>
329
- </pre>
330
- </div>
331
- </div>
332
- </div>
333
-
334
- <div id="method-M000017" class="method-detail">
335
- <a name="M000017"></a>
336
-
337
- <div class="method-heading">
338
- <a href="#M000017" class="method-signature">
339
- <span class="method-name">proxy_user</span><span class="method-args">()</span>
340
- </a>
341
- </div>
342
-
343
- <div class="method-description">
344
- <p><a class="source-toggle" href="#"
345
- onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
346
- <div class="method-source-code" id="M000017-source">
347
- <pre>
348
- <span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 50</span>
349
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">proxy_user</span>
350
- <span class="ruby-ivar">@@proxy_user</span>
351
- <span class="ruby-keyword kw">end</span>
352
- </pre>
353
- </div>
354
- </div>
355
- </div>
356
-
357
- <div id="method-M000018" class="method-detail">
358
- <a name="M000018"></a>
359
-
360
- <div class="method-heading">
361
- <a href="#M000018" class="method-signature">
362
- <span class="method-name">proxy_user=</span><span class="method-args">(user)</span>
363
- </a>
364
- </div>
365
-
366
- <div class="method-description">
367
- <p><a class="source-toggle" href="#"
368
- onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
369
- <div class="method-source-code" id="M000018-source">
370
- <pre>
371
- <span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 54</span>
372
- <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>)
373
- <span class="ruby-ivar">@@proxy_user</span> = <span class="ruby-identifier">user</span>
374
- <span class="ruby-keyword kw">end</span>
375
- </pre>
376
- </div>
377
- </div>
378
- </div>
379
-
380
- <h3 class="section-bar">Public Instance methods</h3>
381
-
382
- <div id="method-M000022" class="method-detail">
383
- <a name="M000022"></a>
384
-
385
- <div class="method-heading">
386
- <a href="#M000022" class="method-signature">
387
- <span class="method-name">calendar_list</span><span class="method-args">()</span>
388
- </a>
389
- </div>
390
-
391
- <div class="method-description">
392
- <p>
393
- get the list of user&#8217;s calendars and returns http response object
394
- </p>
395
- <p><a class="source-toggle" href="#"
396
- onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
397
- <div class="method-source-code" id="M000022-source">
398
- <pre>
399
- <span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 80</span>
400
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calendar_list</span>
401
- <span class="ruby-identifier">auth</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@auth</span>
402
- <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> <span class="ruby-operator">+</span> <span class="ruby-ivar">@email</span>)
403
- <span class="ruby-identifier">do_get</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-value str">&quot;Authorization&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-node">&quot;GoogleLogin auth=#{@auth}&quot;</span>)
404
- <span class="ruby-keyword kw">end</span>
405
- </pre>
406
- </div>
407
- </div>
408
- </div>
409
-
410
- <div id="method-M000023" class="method-detail">
411
- <a name="M000023"></a>
412
-
413
- <div class="method-heading">
414
- <span class="method-name">calendars</span><span class="method-args">()</span>
415
- </div>
416
-
417
- <div class="method-description">
418
- <p>
419
- Alias for <a href="Service.html#M000022">calendar_list</a>
420
- </p>
421
- </div>
422
- </div>
423
-
424
- <div id="method-M000025" class="method-detail">
425
- <a name="M000025"></a>
426
-
427
- <div class="method-heading">
428
- <a href="#M000025" class="method-signature">
429
- <span class="method-name">delete</span><span class="method-args">(feed)</span>
430
- </a>
431
- </div>
432
-
433
- <div class="method-description">
434
- <p>
435
- delete an event.
436
- </p>
437
- <p><a class="source-toggle" href="#"
438
- onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
439
- <div class="method-source-code" id="M000025-source">
440
- <pre>
441
- <span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 115</span>
442
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">feed</span>)
443
- <span class="ruby-identifier">auth</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@auth</span>
444
- <span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">feed</span>)
445
- <span class="ruby-identifier">do_post</span>(<span class="ruby-identifier">uri</span>,
446
- {<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>,
447
- <span class="ruby-value str">&quot;Authorization&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-node">&quot;GoogleLogin auth=#{@auth}&quot;</span>},
448
- <span class="ruby-value str">&quot;DELETE &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">path</span>)
449
- <span class="ruby-keyword kw">end</span>
450
- </pre>
451
- </div>
452
- </div>
453
- </div>
454
-
455
- <div id="method-M000026" class="method-detail">
456
- <a name="M000026"></a>
457
-
458
- <div class="method-heading">
459
- <a href="#M000026" class="method-signature">
460
- <span class="method-name">insert</span><span class="method-args">(feed, event)</span>
461
- </a>
462
- </div>
463
-
464
- <div class="method-description">
465
- <p>
466
- insert an event
467
- </p>
468
- <p><a class="source-toggle" href="#"
469
- onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
470
- <div class="method-source-code" id="M000026-source">
471
- <pre>
472
- <span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 127</span>
473
- <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>)
474
- <span class="ruby-identifier">auth</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@auth</span>
475
- <span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">feed</span>)
476
- <span class="ruby-identifier">do_post</span>(<span class="ruby-identifier">uri</span>,
477
- {<span class="ruby-value str">&quot;Authorization&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-node">&quot;GoogleLogin auth=#{@auth}&quot;</span>,
478
- <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>,
479
- <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>)
480
- <span class="ruby-keyword kw">end</span>
481
- </pre>
482
- </div>
483
- </div>
484
- </div>
485
-
486
- <div id="method-M000024" class="method-detail">
487
- <a name="M000024"></a>
488
-
489
- <div class="method-heading">
490
- <a href="#M000024" class="method-signature">
491
- <span class="method-name">query</span><span class="method-args">(cal_url, conditions)</span>
492
- </a>
493
- </div>
494
-
495
- <div class="method-description">
496
- <p>
497
- send query for events of a calendar and returns http response object.
498
- available condtions are
499
- </p>
500
- <ul>
501
- <li>:q =&gt; query string
502
-
503
- </li>
504
- <li>:max-results =&gt; max contents count. (default: 25)
505
-
506
- </li>
507
- <li>:start-index =&gt; 1-based index of the first result to be retrieved
508
-
509
- </li>
510
- <li>:orderby =&gt; the order of retrieved data.
511
-
512
- </li>
513
- <li>:published-min =&gt; Bounds on the entry publication date(oldest)
514
-
515
- </li>
516
- <li>:published-max =&gt; Bounds on the entry publication date(newest)
517
-
518
- </li>
519
- <li>:updated-min =&gt; Bounds on the entry update date(oldest)
520
-
521
- </li>
522
- <li>:updated-max =&gt; Bounds on the entry update date(newest)
523
-
524
- </li>
525
- <li>:author =&gt; Entry author
526
-
527
- </li>
528
- </ul>
529
- <p>
530
- For detail, see <a
531
- href="http://code.google.com/apis/gdata/protocol.html#Queries">code.google.com/apis/gdata/protocol.html#Queries</a>
532
- </p>
533
- <p><a class="source-toggle" href="#"
534
- onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
535
- <div class="method-source-code" id="M000024-source">
536
- <pre>
537
- <span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 103</span>
538
- <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>)
539
- <span class="ruby-identifier">auth</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@auth</span>
540
- <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>)
541
- <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>
542
- <span class="ruby-node">&quot;#{key}=#{URI.escape(val.kind_of?(Time) ? val.getutc.iso8601 : val.to_s)}&quot;</span>
543
- <span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;&amp;&quot;</span>)
544
- <span class="ruby-identifier">do_get</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-value str">&quot;Authorization&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-node">&quot;GoogleLogin auth=#{@auth}&quot;</span>)
545
- <span class="ruby-keyword kw">end</span>
546
- </pre>
547
- </div>
548
- </div>
549
- </div>
550
-
551
- <div id="method-M000027" class="method-detail">
552
- <a name="M000027"></a>
553
-
554
- <div class="method-heading">
555
- <a href="#M000027" class="method-signature">
556
- <span class="method-name">update</span><span class="method-args">(feed, event)</span>
557
- </a>
558
- </div>
559
-
560
- <div class="method-description">
561
- <p>
562
- update an event.
563
- </p>
564
- <p><a class="source-toggle" href="#"
565
- onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
566
- <div class="method-source-code" id="M000027-source">
567
- <pre>
568
- <span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 139</span>
569
- <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>)
570
- <span class="ruby-identifier">auth</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@auth</span>
571
- <span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">feed</span>)
572
- <span class="ruby-identifier">do_post</span>(<span class="ruby-identifier">uri</span>,
573
- {<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>,
574
- <span class="ruby-value str">&quot;Authorization&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-node">&quot;GoogleLogin auth=#{@auth}&quot;</span>,
575
- <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>,
576
- <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>)
577
- <span class="ruby-keyword kw">end</span>
578
- </pre>
579
- </div>
580
- </div>
581
- </div>
582
-
583
-
584
- </div>
585
-
586
-
587
- </div>
588
-
589
-
590
- <div id="validator-badges">
591
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
592
- </div>
593
-
594
- </body>
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::Service</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::Service</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/googlecalendar/service_rb.html">
59
+ lib/googlecalendar/service.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 calendar service. If you want to use
86
+ ClientLogin for authentication, use this class. If you want to use AuthSub,
87
+ use <a href="ServiceAuthSub.html">ServiceAuthSub</a>.
88
+ </p>
89
+
90
+ </div>
91
+
92
+
93
+ </div>
94
+
95
+ <div id="method-list">
96
+ <h3 class="section-bar">Methods</h3>
97
+
98
+ <div class="name-list">
99
+ <a href="#M000050">add_authorize_header</a>&nbsp;&nbsp;
100
+ <a href="#M000049">auth</a>&nbsp;&nbsp;
101
+ <a href="#M000046">calendar_list</a>&nbsp;&nbsp;
102
+ <a href="#M000047">calendars</a>&nbsp;&nbsp;
103
+ <a href="#M000048">new</a>&nbsp;&nbsp;
104
+ </div>
105
+ </div>
106
+
107
+ </div>
108
+
109
+
110
+ <!-- if includes -->
111
+
112
+ <div id="section">
113
+
114
+
115
+ <div id="constants-list">
116
+ <h3 class="section-bar">Constants</h3>
117
+
118
+ <div class="name-list">
119
+ <table summary="Constants">
120
+ <tr class="top-aligned-row context-row">
121
+ <td class="context-item-name">AUTH_PATH</td>
122
+ <td>=</td>
123
+ <td class="context-item-value">&quot;/accounts/ClientLogin&quot;</td>
124
+ <td width="3em">&nbsp;</td>
125
+ <td class="context-item-desc">
126
+ Server Path to authenticate
127
+
128
+ </td>
129
+ </tr>
130
+ <tr class="top-aligned-row context-row">
131
+ <td class="context-item-name">CALENDAR_LIST_PATH</td>
132
+ <td>=</td>
133
+ <td class="context-item-value">&quot;http://www.google.com/calendar/feeds/&quot;</td>
134
+ <td width="3em">&nbsp;</td>
135
+ <td class="context-item-desc">
136
+ URL to get calendar list
137
+
138
+ </td>
139
+ </tr>
140
+ </table>
141
+ </div>
142
+ </div>
143
+
144
+
145
+
146
+
147
+
148
+
149
+ <!-- if method_list -->
150
+ <div id="methods">
151
+ <h3 class="section-bar">Public Class methods</h3>
152
+
153
+ <div id="method-M000048" class="method-detail">
154
+ <a name="M000048"></a>
155
+
156
+ <div class="method-heading">
157
+ <a href="#M000048" class="method-signature">
158
+ <span class="method-name">new</span><span class="method-args">(email, pass)</span>
159
+ </a>
160
+ </div>
161
+
162
+ <div class="method-description">
163
+ <p><a class="source-toggle" href="#"
164
+ onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
165
+ <div class="method-source-code" id="M000048-source">
166
+ <pre>
167
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 31</span>
168
+ 31: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">email</span>, <span class="ruby-identifier">pass</span>)
169
+ 32: <span class="ruby-ivar">@email</span> = <span class="ruby-identifier">email</span>
170
+ 33: <span class="ruby-ivar">@pass</span> = <span class="ruby-identifier">pass</span>
171
+ 34: <span class="ruby-ivar">@session</span> = <span class="ruby-keyword kw">nil</span>
172
+ 35: <span class="ruby-ivar">@cookie</span> = <span class="ruby-keyword kw">nil</span>
173
+ 36: <span class="ruby-ivar">@auth</span> = <span class="ruby-keyword kw">nil</span>
174
+ 37: <span class="ruby-keyword kw">end</span>
175
+ </pre>
176
+ </div>
177
+ </div>
178
+ </div>
179
+
180
+ <h3 class="section-bar">Public Instance methods</h3>
181
+
182
+ <div id="method-M000046" class="method-detail">
183
+ <a name="M000046"></a>
184
+
185
+ <div class="method-heading">
186
+ <a href="#M000046" class="method-signature">
187
+ <span class="method-name">calendar_list</span><span class="method-args">()</span>
188
+ </a>
189
+ </div>
190
+
191
+ <div class="method-description">
192
+ <p>
193
+ get the list of user&#8216;s <a href="Service.html#M000047">calendars</a>
194
+ and returns http response object
195
+ </p>
196
+ <p><a class="source-toggle" href="#"
197
+ onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
198
+ <div class="method-source-code" id="M000046-source">
199
+ <pre>
200
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 20</span>
201
+ 20: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calendar_list</span>
202
+ 21: <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>
203
+ 22: <span class="ruby-identifier">auth</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@auth</span>
204
+ 23: <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> <span class="ruby-operator">+</span> <span class="ruby-ivar">@email</span>)
205
+ 24: <span class="ruby-identifier">res</span> = <span class="ruby-identifier">do_get</span>(<span class="ruby-identifier">uri</span>, {})
206
+ 25: <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>
207
+ 26: <span class="ruby-identifier">res</span>
208
+ 27: <span class="ruby-keyword kw">end</span>
209
+ </pre>
210
+ </div>
211
+ </div>
212
+ </div>
213
+
214
+ <div id="method-M000047" class="method-detail">
215
+ <a name="M000047"></a>
216
+
217
+ <div class="method-heading">
218
+ <span class="method-name">calendars</span><span class="method-args">()</span>
219
+ </div>
220
+
221
+ <div class="method-description">
222
+ <p>
223
+ Alias for <a href="Service.html#M000046">calendar_list</a>
224
+ </p>
225
+ </div>
226
+ </div>
227
+
228
+ <h3 class="section-bar">Private Instance methods</h3>
229
+
230
+ <div id="method-M000050" class="method-detail">
231
+ <a name="M000050"></a>
232
+
233
+ <div class="method-heading">
234
+ <a href="#M000050" class="method-signature">
235
+ <span class="method-name">add_authorize_header</span><span class="method-args">(header)</span>
236
+ </a>
237
+ </div>
238
+
239
+ <div class="method-description">
240
+ <p><a class="source-toggle" href="#"
241
+ onclick="toggleCode('M000050-source');return false;">[Source]</a></p>
242
+ <div class="method-source-code" id="M000050-source">
243
+ <pre>
244
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 62</span>
245
+ 62: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_authorize_header</span>(<span class="ruby-identifier">header</span>)
246
+ 63: <span class="ruby-identifier">header</span>[<span class="ruby-value str">&quot;Authorization&quot;</span>] = <span class="ruby-node">&quot;GoogleLogin auth=#{@auth}&quot;</span>
247
+ 64: <span class="ruby-keyword kw">end</span>
248
+ </pre>
249
+ </div>
250
+ </div>
251
+ </div>
252
+
253
+ <div id="method-M000049" class="method-detail">
254
+ <a name="M000049"></a>
255
+
256
+ <div class="method-heading">
257
+ <a href="#M000049" class="method-signature">
258
+ <span class="method-name">auth</span><span class="method-args">()</span>
259
+ </a>
260
+ </div>
261
+
262
+ <div class="method-description">
263
+ <p><a class="source-toggle" href="#"
264
+ onclick="toggleCode('M000049-source');return false;">[Source]</a></p>
265
+ <div class="method-source-code" id="M000049-source">
266
+ <pre>
267
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 40</span>
268
+ 40: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">auth</span>
269
+ 41: <span class="ruby-identifier">https</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">AUTH_SERVER</span>, <span class="ruby-value">443</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>)
270
+ 42: <span class="ruby-identifier">https</span>.<span class="ruby-identifier">use_ssl</span> = <span class="ruby-keyword kw">true</span>
271
+ 43: <span class="ruby-identifier">https</span>.<span class="ruby-identifier">verify_mode</span> = <span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">SSL</span><span class="ruby-operator">::</span><span class="ruby-constant">VERIFY_NONE</span>
272
+ 44: <span class="ruby-identifier">head</span> = {<span class="ruby-value str">'Content-Type'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'application/x-www-form-urlencoded'</span>}
273
+ 45: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">&quot;-- auth st --&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
274
+ 46: <span class="ruby-identifier">https</span>.<span class="ruby-identifier">start</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">w</span><span class="ruby-operator">|</span>
275
+ 47: <span class="ruby-identifier">res</span> = <span class="ruby-identifier">w</span>.<span class="ruby-identifier">post</span>(<span class="ruby-constant">AUTH_PATH</span>, <span class="ruby-node">&quot;Email=#{@email}&amp;Passwd=#{@pass}&amp;source=company-app-1&amp;service=cl&quot;</span>, <span class="ruby-identifier">head</span>)
276
+ 48: <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>
277
+ 49: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">res</span>.<span class="ruby-identifier">body</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/Auth=(.+)/</span>
278
+ 50: <span class="ruby-ivar">@auth</span> = <span class="ruby-identifier">$1</span>
279
+ 51: <span class="ruby-keyword kw">else</span>
280
+ 52: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
281
+ 53: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">fatal</span>(<span class="ruby-identifier">res</span>)
282
+ 54: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">fatal</span>(<span class="ruby-identifier">res</span>.<span class="ruby-identifier">body</span>)
283
+ 55: <span class="ruby-keyword kw">end</span>
284
+ 56: <span class="ruby-identifier">raise</span> <span class="ruby-constant">AuthenticationFailed</span>
285
+ 57: <span class="ruby-keyword kw">end</span>
286
+ 58: <span class="ruby-keyword kw">end</span>
287
+ 59: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">&quot;-- auth en --&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
288
+ 60: <span class="ruby-keyword kw">end</span>
289
+ </pre>
290
+ </div>
291
+ </div>
292
+ </div>
293
+
294
+
295
+ </div>
296
+
297
+
298
+ </div>
299
+
300
+
301
+ <div id="validator-badges">
302
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
303
+ </div>
304
+
305
+ </body>
595
306
  </html>