gcalapi 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +19 -15
- data/VERSION +1 -1
- data/example/mixi2gcal.rb +88 -0
- data/html/classes/GoogleCalendar.html +149 -280
- data/html/classes/GoogleCalendar/AuthSubFailed.html +165 -0
- data/html/classes/GoogleCalendar/AuthSubUtil.html +397 -0
- data/html/classes/GoogleCalendar/AuthenticationFailed.html +110 -110
- data/html/classes/GoogleCalendar/Calendar.html +381 -203
- data/html/classes/GoogleCalendar/Event.html +800 -510
- data/html/classes/GoogleCalendar/EventDeleteFailed.html +110 -110
- data/html/classes/GoogleCalendar/EventGetFailed.html +111 -0
- 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 +305 -594
- data/html/classes/GoogleCalendar/ServiceAuthSub.html +181 -0
- data/html/classes/GoogleCalendar/ServiceBase.html +694 -0
- data/html/created.rid +1 -1
- data/html/files/README.html +116 -116
- data/html/files/lib/googlecalendar/auth_sub_util_rb.html +111 -0
- 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 +108 -0
- data/html/files/lib/googlecalendar/service_base_rb.html +114 -0
- data/html/files/lib/googlecalendar/service_rb.html +107 -113
- data/html/fr_class_index.html +39 -34
- data/html/fr_file_index.html +32 -29
- data/html/fr_method_index.html +75 -52
- data/html/index.html +23 -23
- data/html/rdoc-style.css +207 -207
- data/lib/googlecalendar/auth_sub_util.rb +143 -0
- data/lib/googlecalendar/calendar.rb +48 -36
- data/lib/googlecalendar/event.rb +16 -11
- data/lib/googlecalendar/service.rb +30 -180
- data/lib/googlecalendar/service_auth_sub.rb +18 -0
- data/lib/googlecalendar/service_base.rb +197 -0
- data/test/00_service_test.rb +2 -1
- data/test/01_calendar_test.rb +1 -1
- data/test/02_event_test.rb +28 -1
- data/test/03_authsub_test.rb +119 -0
- data/test/base_unit.rb +3 -0
- 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
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
<
|
97
|
-
|
98
|
-
<
|
99
|
-
<a href="#
|
100
|
-
<a href="#
|
101
|
-
<a href="#
|
102
|
-
<a href="#
|
103
|
-
<a href="#
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
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
|
-
|
133
|
-
|
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
|
-
<span class="ruby-
|
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
|
-
</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’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">"Authorization"</span> =<span class="ruby-operator">></span> <span class="ruby-node">"GoogleLogin auth=#{@auth}"</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">"X-HTTP-Method-Override"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"DELETE"</span>,
|
447
|
-
<span class="ruby-value str">"Authorization"</span> =<span class="ruby-operator">></span> <span class="ruby-node">"GoogleLogin auth=#{@auth}"</span>},
|
448
|
-
<span class="ruby-value str">"DELETE "</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">"Authorization"</span> =<span class="ruby-operator">></span> <span class="ruby-node">"GoogleLogin auth=#{@auth}"</span>,
|
478
|
-
<span class="ruby-value str">"Content-Type"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/atom+xml"</span>,
|
479
|
-
<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>)
|
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 => query string
|
502
|
-
|
503
|
-
</li>
|
504
|
-
<li>:max-results => max contents count. (default: 25)
|
505
|
-
|
506
|
-
</li>
|
507
|
-
<li>:start-index => 1-based index of the first result to be retrieved
|
508
|
-
|
509
|
-
</li>
|
510
|
-
<li>:orderby => the order of retrieved data.
|
511
|
-
|
512
|
-
</li>
|
513
|
-
<li>:published-min => Bounds on the entry publication date(oldest)
|
514
|
-
|
515
|
-
</li>
|
516
|
-
<li>:published-max => Bounds on the entry publication date(newest)
|
517
|
-
|
518
|
-
</li>
|
519
|
-
<li>:updated-min => Bounds on the entry update date(oldest)
|
520
|
-
|
521
|
-
</li>
|
522
|
-
<li>:updated-max => Bounds on the entry update date(newest)
|
523
|
-
|
524
|
-
</li>
|
525
|
-
<li>:author => 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">"#{key}=#{URI.escape(val.kind_of?(Time) ? val.getutc.iso8601 : val.to_s)}"</span>
|
543
|
-
<span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"&"</span>)
|
544
|
-
<span class="ruby-identifier">do_get</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-value str">"Authorization"</span> =<span class="ruby-operator">></span> <span class="ruby-node">"GoogleLogin auth=#{@auth}"</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">"X-HTTP-Method-Override"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"PUT"</span>,
|
574
|
-
<span class="ruby-value str">"Authorization"</span> =<span class="ruby-operator">></span> <span class="ruby-node">"GoogleLogin auth=#{@auth}"</span>,
|
575
|
-
<span class="ruby-value str">"Content-Type"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/atom+xml"</span>,
|
576
|
-
<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>)
|
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>
|
100
|
+
<a href="#M000049">auth</a>
|
101
|
+
<a href="#M000046">calendar_list</a>
|
102
|
+
<a href="#M000047">calendars</a>
|
103
|
+
<a href="#M000048">new</a>
|
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">"/accounts/ClientLogin"</td>
|
124
|
+
<td width="3em"> </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">"http://www.google.com/calendar/feeds/"</td>
|
134
|
+
<td width="3em"> </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‘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">"-- calendar list st --"</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">"-- calendar list en(#{res.message}) --"</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">"Authorization"</span>] = <span class="ruby-node">"GoogleLogin auth=#{@auth}"</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">></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">"-- auth st --"</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">"Email=#{@email}&Passwd=#{@pass}&source=company-app-1&service=cl"</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">"-- auth en --"</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>
|