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.
Files changed (37) hide show
  1. data/Rakefile +1 -1
  2. data/VERSION +1 -1
  3. data/html/classes/GoogleCalendar.html +149 -149
  4. data/html/classes/GoogleCalendar/AuthSubFailed.html +162 -162
  5. data/html/classes/GoogleCalendar/AuthSubUtil.html +352 -352
  6. data/html/classes/GoogleCalendar/AuthenticationFailed.html +110 -110
  7. data/html/classes/GoogleCalendar/Calendar.html +381 -381
  8. data/html/classes/GoogleCalendar/Event.html +699 -699
  9. data/html/classes/GoogleCalendar/EventDeleteFailed.html +110 -110
  10. data/html/classes/GoogleCalendar/EventGetFailed.html +110 -110
  11. data/html/classes/GoogleCalendar/EventInsertFailed.html +110 -110
  12. data/html/classes/GoogleCalendar/EventUpdateFailed.html +110 -110
  13. data/html/classes/GoogleCalendar/InvalidCalendarURL.html +110 -110
  14. data/html/classes/GoogleCalendar/Service.html +245 -305
  15. data/html/classes/GoogleCalendar/ServiceAuthSub.html +176 -176
  16. data/html/classes/GoogleCalendar/ServiceBase.html +752 -693
  17. data/html/created.rid +1 -1
  18. data/html/files/README.html +117 -117
  19. data/html/files/lib/googlecalendar/auth_sub_util_rb.html +110 -110
  20. data/html/files/lib/googlecalendar/calendar_rb.html +109 -109
  21. data/html/files/lib/googlecalendar/event_rb.html +109 -109
  22. data/html/files/lib/googlecalendar/service_auth_sub_rb.html +107 -107
  23. data/html/files/lib/googlecalendar/service_base_rb.html +113 -113
  24. data/html/files/lib/googlecalendar/service_rb.html +107 -107
  25. data/html/fr_class_index.html +39 -39
  26. data/html/fr_file_index.html +32 -32
  27. data/html/fr_method_index.html +75 -75
  28. data/html/index.html +23 -23
  29. data/html/rdoc-style.css +207 -207
  30. data/lib/googlecalendar/service.rb +1 -18
  31. data/lib/googlecalendar/service_base.rb +17 -0
  32. data/test/03_authsub_test.rb +14 -2
  33. data/test/all.bat +1 -0
  34. data/test/all.sh +0 -0
  35. data/test/each.sh +0 -0
  36. metadata +47 -70
  37. data/VERSION.BAK +0 -1
@@ -1,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,306 +1,246 @@
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>
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="#M000048">new</a>&nbsp;&nbsp;
102
+ </div>
103
+ </div>
104
+
105
+ </div>
106
+
107
+
108
+ <!-- if includes -->
109
+
110
+ <div id="section">
111
+
112
+
113
+ <div id="constants-list">
114
+ <h3 class="section-bar">Constants</h3>
115
+
116
+ <div class="name-list">
117
+ <table summary="Constants">
118
+ <tr class="top-aligned-row context-row">
119
+ <td class="context-item-name">AUTH_PATH</td>
120
+ <td>=</td>
121
+ <td class="context-item-value">&quot;/accounts/ClientLogin&quot;</td>
122
+ <td width="3em">&nbsp;</td>
123
+ <td class="context-item-desc">
124
+ Server Path to authenticate
125
+
126
+ </td>
127
+ </tr>
128
+ </table>
129
+ </div>
130
+ </div>
131
+
132
+
133
+
134
+
135
+
136
+
137
+ <!-- if method_list -->
138
+ <div id="methods">
139
+ <h3 class="section-bar">Public Class methods</h3>
140
+
141
+ <div id="method-M000048" class="method-detail">
142
+ <a name="M000048"></a>
143
+
144
+ <div class="method-heading">
145
+ <a href="#M000048" class="method-signature">
146
+ <span class="method-name">new</span><span class="method-args">(email, pass)</span>
147
+ </a>
148
+ </div>
149
+
150
+ <div class="method-description">
151
+ <p><a class="source-toggle" href="#"
152
+ onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
153
+ <div class="method-source-code" id="M000048-source">
154
+ <pre>
155
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 14</span>
156
+ 14: <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>)
157
+ 15: <span class="ruby-ivar">@email</span> = <span class="ruby-identifier">email</span>
158
+ 16: <span class="ruby-ivar">@pass</span> = <span class="ruby-identifier">pass</span>
159
+ 17: <span class="ruby-ivar">@session</span> = <span class="ruby-keyword kw">nil</span>
160
+ 18: <span class="ruby-ivar">@cookie</span> = <span class="ruby-keyword kw">nil</span>
161
+ 19: <span class="ruby-ivar">@auth</span> = <span class="ruby-keyword kw">nil</span>
162
+ 20: <span class="ruby-keyword kw">end</span>
163
+ </pre>
164
+ </div>
165
+ </div>
166
+ </div>
167
+
168
+ <h3 class="section-bar">Private Instance methods</h3>
169
+
170
+ <div id="method-M000050" class="method-detail">
171
+ <a name="M000050"></a>
172
+
173
+ <div class="method-heading">
174
+ <a href="#M000050" class="method-signature">
175
+ <span class="method-name">add_authorize_header</span><span class="method-args">(header)</span>
176
+ </a>
177
+ </div>
178
+
179
+ <div class="method-description">
180
+ <p><a class="source-toggle" href="#"
181
+ onclick="toggleCode('M000050-source');return false;">[Source]</a></p>
182
+ <div class="method-source-code" id="M000050-source">
183
+ <pre>
184
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 45</span>
185
+ 45: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_authorize_header</span>(<span class="ruby-identifier">header</span>)
186
+ 46: <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>
187
+ 47: <span class="ruby-keyword kw">end</span>
188
+ </pre>
189
+ </div>
190
+ </div>
191
+ </div>
192
+
193
+ <div id="method-M000049" class="method-detail">
194
+ <a name="M000049"></a>
195
+
196
+ <div class="method-heading">
197
+ <a href="#M000049" class="method-signature">
198
+ <span class="method-name">auth</span><span class="method-args">()</span>
199
+ </a>
200
+ </div>
201
+
202
+ <div class="method-description">
203
+ <p><a class="source-toggle" href="#"
204
+ onclick="toggleCode('M000049-source');return false;">[Source]</a></p>
205
+ <div class="method-source-code" id="M000049-source">
206
+ <pre>
207
+ <span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 23</span>
208
+ 23: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">auth</span>
209
+ 24: <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>)
210
+ 25: <span class="ruby-identifier">https</span>.<span class="ruby-identifier">use_ssl</span> = <span class="ruby-keyword kw">true</span>
211
+ 26: <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>
212
+ 27: <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>}
213
+ 28: <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>
214
+ 29: <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>
215
+ 30: <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=#{CGI.escape(@pass)}&amp;source=company-app-1&amp;service=cl&quot;</span>, <span class="ruby-identifier">head</span>)
216
+ 31: <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>
217
+ 32: <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>
218
+ 33: <span class="ruby-ivar">@auth</span> = <span class="ruby-identifier">$1</span>
219
+ 34: <span class="ruby-keyword kw">else</span>
220
+ 35: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
221
+ 36: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">fatal</span>(<span class="ruby-identifier">res</span>)
222
+ 37: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">fatal</span>(<span class="ruby-identifier">res</span>.<span class="ruby-identifier">body</span>)
223
+ 38: <span class="ruby-keyword kw">end</span>
224
+ 39: <span class="ruby-identifier">raise</span> <span class="ruby-constant">AuthenticationFailed</span>
225
+ 40: <span class="ruby-keyword kw">end</span>
226
+ 41: <span class="ruby-keyword kw">end</span>
227
+ 42: <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>
228
+ 43: <span class="ruby-keyword kw">end</span>
229
+ </pre>
230
+ </div>
231
+ </div>
232
+ </div>
233
+
234
+
235
+ </div>
236
+
237
+
238
+ </div>
239
+
240
+
241
+ <div id="validator-badges">
242
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
243
+ </div>
244
+
245
+ </body>
306
246
  </html>