gcalapi 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +13 -0
- data/Rakefile +82 -0
- data/VERSION +1 -0
- data/example/mail2gcal.rb +101 -0
- data/example/ol2gcal.rb +55 -0
- data/html/classes/GoogleCalendar.html +281 -0
- data/html/classes/GoogleCalendar/AuthenticationFailed.html +111 -0
- data/html/classes/GoogleCalendar/Calendar.html +204 -0
- data/html/classes/GoogleCalendar/Event.html +511 -0
- data/html/classes/GoogleCalendar/EventDeleteFailed.html +111 -0
- data/html/classes/GoogleCalendar/EventInsertFailed.html +111 -0
- data/html/classes/GoogleCalendar/EventUpdateFailed.html +111 -0
- data/html/classes/GoogleCalendar/InvalidCalendarURL.html +111 -0
- data/html/classes/GoogleCalendar/Service.html +472 -0
- data/html/created.rid +1 -0
- data/html/files/README.html +117 -0
- data/html/files/lib/googlecalendar/calendar_rb.html +110 -0
- data/html/files/lib/googlecalendar/event_rb.html +110 -0
- data/html/files/lib/googlecalendar/service_rb.html +114 -0
- data/html/fr_class_index.html +35 -0
- data/html/fr_file_index.html +30 -0
- data/html/fr_method_index.html +49 -0
- data/html/index.html +24 -0
- data/html/rdoc-style.css +208 -0
- data/lib/googlecalendar/calendar.rb +117 -0
- data/lib/googlecalendar/event.rb +283 -0
- data/lib/googlecalendar/service.rb +193 -0
- data/test/00_service_test.rb +169 -0
- data/test/01_calendar_test.rb +52 -0
- data/test/02_event_test.rb +60 -0
- data/test/all.sh +2 -0
- data/test/base_unit.rb +54 -0
- data/test/each.sh +2 -0
- metadata +85 -0
@@ -0,0 +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::EventDeleteFailed</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::EventDeleteFailed</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
|
+
</html>
|
@@ -0,0 +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::EventInsertFailed</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::EventInsertFailed</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
|
+
</html>
|
@@ -0,0 +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>
|
111
|
+
</html>
|
@@ -0,0 +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>
|
111
|
+
</html>
|
@@ -0,0 +1,472 @@
|
|
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="#M000018">calendar_list</a>
|
96
|
+
<a href="#M000019">calendars</a>
|
97
|
+
<a href="#M000021">delete</a>
|
98
|
+
<a href="#M000022">insert</a>
|
99
|
+
<a href="#M000017">new</a>
|
100
|
+
<a href="#M000013">proxy_addr</a>
|
101
|
+
<a href="#M000014">proxy_addr=</a>
|
102
|
+
<a href="#M000015">proxy_port</a>
|
103
|
+
<a href="#M000016">proxy_port=</a>
|
104
|
+
<a href="#M000020">query</a>
|
105
|
+
<a href="#M000023">update</a>
|
106
|
+
</div>
|
107
|
+
</div>
|
108
|
+
|
109
|
+
</div>
|
110
|
+
|
111
|
+
|
112
|
+
<!-- if includes -->
|
113
|
+
|
114
|
+
<div id="section">
|
115
|
+
|
116
|
+
|
117
|
+
<div id="constants-list">
|
118
|
+
<h3 class="section-bar">Constants</h3>
|
119
|
+
|
120
|
+
<div class="name-list">
|
121
|
+
<table summary="Constants">
|
122
|
+
<tr class="top-aligned-row context-row">
|
123
|
+
<td class="context-item-name">AUTH_SERVER</td>
|
124
|
+
<td>=</td>
|
125
|
+
<td class="context-item-value">"www.google.com"</td>
|
126
|
+
<td width="3em"> </td>
|
127
|
+
<td class="context-item-desc">
|
128
|
+
Server name to Authenticate
|
129
|
+
|
130
|
+
</td>
|
131
|
+
</tr>
|
132
|
+
<tr class="top-aligned-row context-row">
|
133
|
+
<td class="context-item-name">AUTH_PATH</td>
|
134
|
+
<td>=</td>
|
135
|
+
<td class="context-item-value">"/accounts/ClientLogin"</td>
|
136
|
+
<td width="3em"> </td>
|
137
|
+
<td class="context-item-desc">
|
138
|
+
Server Path to authenticate
|
139
|
+
|
140
|
+
</td>
|
141
|
+
</tr>
|
142
|
+
<tr class="top-aligned-row context-row">
|
143
|
+
<td class="context-item-name">CALENDAR_LIST_PATH</td>
|
144
|
+
<td>=</td>
|
145
|
+
<td class="context-item-value">"http://www.google.com/calendar/feeds/"</td>
|
146
|
+
<td width="3em"> </td>
|
147
|
+
<td class="context-item-desc">
|
148
|
+
URL to get calendar list
|
149
|
+
|
150
|
+
</td>
|
151
|
+
</tr>
|
152
|
+
</table>
|
153
|
+
</div>
|
154
|
+
</div>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
<!-- if method_list -->
|
162
|
+
<div id="methods">
|
163
|
+
<h3 class="section-bar">Public Class methods</h3>
|
164
|
+
|
165
|
+
<div id="method-M000017" class="method-detail">
|
166
|
+
<a name="M000017"></a>
|
167
|
+
|
168
|
+
<div class="method-heading">
|
169
|
+
<a href="#M000017" class="method-signature">
|
170
|
+
<span class="method-name">new</span><span class="method-args">(email, pass)</span>
|
171
|
+
</a>
|
172
|
+
</div>
|
173
|
+
|
174
|
+
<div class="method-description">
|
175
|
+
<p><a class="source-toggle" href="#"
|
176
|
+
onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
|
177
|
+
<div class="method-source-code" id="M000017-source">
|
178
|
+
<pre>
|
179
|
+
<span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 48</span>
|
180
|
+
<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>)
|
181
|
+
<span class="ruby-ivar">@email</span> = <span class="ruby-identifier">email</span>
|
182
|
+
<span class="ruby-ivar">@pass</span> = <span class="ruby-identifier">pass</span>
|
183
|
+
<span class="ruby-ivar">@session</span> = <span class="ruby-keyword kw">nil</span>
|
184
|
+
<span class="ruby-ivar">@cookie</span> = <span class="ruby-keyword kw">nil</span>
|
185
|
+
<span class="ruby-ivar">@auth</span> = <span class="ruby-keyword kw">nil</span>
|
186
|
+
<span class="ruby-keyword kw">end</span>
|
187
|
+
</pre>
|
188
|
+
</div>
|
189
|
+
</div>
|
190
|
+
</div>
|
191
|
+
|
192
|
+
<div id="method-M000013" class="method-detail">
|
193
|
+
<a name="M000013"></a>
|
194
|
+
|
195
|
+
<div class="method-heading">
|
196
|
+
<a href="#M000013" class="method-signature">
|
197
|
+
<span class="method-name">proxy_addr</span><span class="method-args">()</span>
|
198
|
+
</a>
|
199
|
+
</div>
|
200
|
+
|
201
|
+
<div class="method-description">
|
202
|
+
<p><a class="source-toggle" href="#"
|
203
|
+
onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
|
204
|
+
<div class="method-source-code" id="M000013-source">
|
205
|
+
<pre>
|
206
|
+
<span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 30</span>
|
207
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">proxy_addr</span>
|
208
|
+
<span class="ruby-ivar">@@proxy_addr</span>
|
209
|
+
<span class="ruby-keyword kw">end</span>
|
210
|
+
</pre>
|
211
|
+
</div>
|
212
|
+
</div>
|
213
|
+
</div>
|
214
|
+
|
215
|
+
<div id="method-M000014" class="method-detail">
|
216
|
+
<a name="M000014"></a>
|
217
|
+
|
218
|
+
<div class="method-heading">
|
219
|
+
<a href="#M000014" class="method-signature">
|
220
|
+
<span class="method-name">proxy_addr=</span><span class="method-args">(addr)</span>
|
221
|
+
</a>
|
222
|
+
</div>
|
223
|
+
|
224
|
+
<div class="method-description">
|
225
|
+
<p><a class="source-toggle" href="#"
|
226
|
+
onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
|
227
|
+
<div class="method-source-code" id="M000014-source">
|
228
|
+
<pre>
|
229
|
+
<span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 34</span>
|
230
|
+
<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>)
|
231
|
+
<span class="ruby-ivar">@@proxy_addr</span>=<span class="ruby-identifier">addr</span>
|
232
|
+
<span class="ruby-keyword kw">end</span>
|
233
|
+
</pre>
|
234
|
+
</div>
|
235
|
+
</div>
|
236
|
+
</div>
|
237
|
+
|
238
|
+
<div id="method-M000015" class="method-detail">
|
239
|
+
<a name="M000015"></a>
|
240
|
+
|
241
|
+
<div class="method-heading">
|
242
|
+
<a href="#M000015" class="method-signature">
|
243
|
+
<span class="method-name">proxy_port</span><span class="method-args">()</span>
|
244
|
+
</a>
|
245
|
+
</div>
|
246
|
+
|
247
|
+
<div class="method-description">
|
248
|
+
<p><a class="source-toggle" href="#"
|
249
|
+
onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
|
250
|
+
<div class="method-source-code" id="M000015-source">
|
251
|
+
<pre>
|
252
|
+
<span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 40</span>
|
253
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">proxy_port</span>
|
254
|
+
<span class="ruby-ivar">@@proxy_port</span>
|
255
|
+
<span class="ruby-keyword kw">end</span>
|
256
|
+
</pre>
|
257
|
+
</div>
|
258
|
+
</div>
|
259
|
+
</div>
|
260
|
+
|
261
|
+
<div id="method-M000016" class="method-detail">
|
262
|
+
<a name="M000016"></a>
|
263
|
+
|
264
|
+
<div class="method-heading">
|
265
|
+
<a href="#M000016" class="method-signature">
|
266
|
+
<span class="method-name">proxy_port=</span><span class="method-args">(port)</span>
|
267
|
+
</a>
|
268
|
+
</div>
|
269
|
+
|
270
|
+
<div class="method-description">
|
271
|
+
<p><a class="source-toggle" href="#"
|
272
|
+
onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
|
273
|
+
<div class="method-source-code" id="M000016-source">
|
274
|
+
<pre>
|
275
|
+
<span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 44</span>
|
276
|
+
<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>)
|
277
|
+
<span class="ruby-ivar">@@proxy_port</span> = <span class="ruby-identifier">port</span>
|
278
|
+
<span class="ruby-keyword kw">end</span>
|
279
|
+
</pre>
|
280
|
+
</div>
|
281
|
+
</div>
|
282
|
+
</div>
|
283
|
+
|
284
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
285
|
+
|
286
|
+
<div id="method-M000018" class="method-detail">
|
287
|
+
<a name="M000018"></a>
|
288
|
+
|
289
|
+
<div class="method-heading">
|
290
|
+
<a href="#M000018" class="method-signature">
|
291
|
+
<span class="method-name">calendar_list</span><span class="method-args">()</span>
|
292
|
+
</a>
|
293
|
+
</div>
|
294
|
+
|
295
|
+
<div class="method-description">
|
296
|
+
<p>
|
297
|
+
get the list of user’s calendars and returns http response object
|
298
|
+
</p>
|
299
|
+
<p><a class="source-toggle" href="#"
|
300
|
+
onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
|
301
|
+
<div class="method-source-code" id="M000018-source">
|
302
|
+
<pre>
|
303
|
+
<span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 59</span>
|
304
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calendar_list</span>
|
305
|
+
<span class="ruby-identifier">auth</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@auth</span>
|
306
|
+
<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>)
|
307
|
+
<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>)
|
308
|
+
<span class="ruby-keyword kw">end</span>
|
309
|
+
</pre>
|
310
|
+
</div>
|
311
|
+
</div>
|
312
|
+
</div>
|
313
|
+
|
314
|
+
<div id="method-M000019" class="method-detail">
|
315
|
+
<a name="M000019"></a>
|
316
|
+
|
317
|
+
<div class="method-heading">
|
318
|
+
<span class="method-name">calendars</span><span class="method-args">()</span>
|
319
|
+
</div>
|
320
|
+
|
321
|
+
<div class="method-description">
|
322
|
+
<p>
|
323
|
+
Alias for <a href="Service.html#M000018">calendar_list</a>
|
324
|
+
</p>
|
325
|
+
</div>
|
326
|
+
</div>
|
327
|
+
|
328
|
+
<div id="method-M000021" class="method-detail">
|
329
|
+
<a name="M000021"></a>
|
330
|
+
|
331
|
+
<div class="method-heading">
|
332
|
+
<a href="#M000021" class="method-signature">
|
333
|
+
<span class="method-name">delete</span><span class="method-args">(feed)</span>
|
334
|
+
</a>
|
335
|
+
</div>
|
336
|
+
|
337
|
+
<div class="method-description">
|
338
|
+
<p>
|
339
|
+
delete an event.
|
340
|
+
</p>
|
341
|
+
<p><a class="source-toggle" href="#"
|
342
|
+
onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
|
343
|
+
<div class="method-source-code" id="M000021-source">
|
344
|
+
<pre>
|
345
|
+
<span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 92</span>
|
346
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">feed</span>)
|
347
|
+
<span class="ruby-identifier">auth</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@auth</span>
|
348
|
+
<span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">feed</span>)
|
349
|
+
<span class="ruby-identifier">do_post</span>(<span class="ruby-identifier">uri</span>,
|
350
|
+
{<span class="ruby-value str">"X-HTTP-Method-Override"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"DELETE"</span>,
|
351
|
+
<span class="ruby-value str">"Authorization"</span> =<span class="ruby-operator">></span> <span class="ruby-node">"GoogleLogin auth=#{@auth}"</span>},
|
352
|
+
<span class="ruby-value str">"DELETE "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">path</span>)
|
353
|
+
<span class="ruby-keyword kw">end</span>
|
354
|
+
</pre>
|
355
|
+
</div>
|
356
|
+
</div>
|
357
|
+
</div>
|
358
|
+
|
359
|
+
<div id="method-M000022" class="method-detail">
|
360
|
+
<a name="M000022"></a>
|
361
|
+
|
362
|
+
<div class="method-heading">
|
363
|
+
<a href="#M000022" class="method-signature">
|
364
|
+
<span class="method-name">insert</span><span class="method-args">(feed, event)</span>
|
365
|
+
</a>
|
366
|
+
</div>
|
367
|
+
|
368
|
+
<div class="method-description">
|
369
|
+
<p>
|
370
|
+
insert an event
|
371
|
+
</p>
|
372
|
+
<p><a class="source-toggle" href="#"
|
373
|
+
onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
|
374
|
+
<div class="method-source-code" id="M000022-source">
|
375
|
+
<pre>
|
376
|
+
<span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 104</span>
|
377
|
+
<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>)
|
378
|
+
<span class="ruby-identifier">auth</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@auth</span>
|
379
|
+
<span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">feed</span>)
|
380
|
+
<span class="ruby-identifier">do_post</span>(<span class="ruby-identifier">uri</span>,
|
381
|
+
{<span class="ruby-value str">"Authorization"</span> =<span class="ruby-operator">></span> <span class="ruby-node">"GoogleLogin auth=#{@auth}"</span>,
|
382
|
+
<span class="ruby-value str">"Content-Type"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/atom+xml"</span>,
|
383
|
+
<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>)
|
384
|
+
<span class="ruby-keyword kw">end</span>
|
385
|
+
</pre>
|
386
|
+
</div>
|
387
|
+
</div>
|
388
|
+
</div>
|
389
|
+
|
390
|
+
<div id="method-M000020" class="method-detail">
|
391
|
+
<a name="M000020"></a>
|
392
|
+
|
393
|
+
<div class="method-heading">
|
394
|
+
<a href="#M000020" class="method-signature">
|
395
|
+
<span class="method-name">query</span><span class="method-args">(cal_url, conditions)</span>
|
396
|
+
</a>
|
397
|
+
</div>
|
398
|
+
|
399
|
+
<div class="method-description">
|
400
|
+
<p>
|
401
|
+
send query for events of a calendar and returns http response object.
|
402
|
+
available condtions: :q => query string :max-results => max contents
|
403
|
+
count. (default: 25) :start-index => 1-based index of the first result
|
404
|
+
to be retrieved :orderby => the order of retrieved data. :published-min
|
405
|
+
=> Bounds on the entry publication date(oldest) :published-max =>
|
406
|
+
Bounds on the entry publication date(newest) :updated-min => Bounds on
|
407
|
+
the entry update date(oldest) :updated-max => Bounds on the entry update
|
408
|
+
date(newest) :author => Entry author
|
409
|
+
</p>
|
410
|
+
<p><a class="source-toggle" href="#"
|
411
|
+
onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
|
412
|
+
<div class="method-source-code" id="M000020-source">
|
413
|
+
<pre>
|
414
|
+
<span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 80</span>
|
415
|
+
<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>)
|
416
|
+
<span class="ruby-identifier">auth</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@auth</span>
|
417
|
+
<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>)
|
418
|
+
<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>
|
419
|
+
<span class="ruby-node">"#{key}=#{URI.escape(val.kind_of?(Time) ? val.getutc.iso8601 : val.to_s)}"</span>
|
420
|
+
<span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"&"</span>)
|
421
|
+
<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>)
|
422
|
+
<span class="ruby-keyword kw">end</span>
|
423
|
+
</pre>
|
424
|
+
</div>
|
425
|
+
</div>
|
426
|
+
</div>
|
427
|
+
|
428
|
+
<div id="method-M000023" class="method-detail">
|
429
|
+
<a name="M000023"></a>
|
430
|
+
|
431
|
+
<div class="method-heading">
|
432
|
+
<a href="#M000023" class="method-signature">
|
433
|
+
<span class="method-name">update</span><span class="method-args">(feed, event)</span>
|
434
|
+
</a>
|
435
|
+
</div>
|
436
|
+
|
437
|
+
<div class="method-description">
|
438
|
+
<p>
|
439
|
+
update an event.
|
440
|
+
</p>
|
441
|
+
<p><a class="source-toggle" href="#"
|
442
|
+
onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
|
443
|
+
<div class="method-source-code" id="M000023-source">
|
444
|
+
<pre>
|
445
|
+
<span class="ruby-comment cmt"># File lib/googlecalendar/service.rb, line 116</span>
|
446
|
+
<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>)
|
447
|
+
<span class="ruby-identifier">auth</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@auth</span>
|
448
|
+
<span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">feed</span>)
|
449
|
+
<span class="ruby-identifier">do_post</span>(<span class="ruby-identifier">uri</span>,
|
450
|
+
{<span class="ruby-value str">"X-HTTP-Method-Override"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"PUT"</span>,
|
451
|
+
<span class="ruby-value str">"Authorization"</span> =<span class="ruby-operator">></span> <span class="ruby-node">"GoogleLogin auth=#{@auth}"</span>,
|
452
|
+
<span class="ruby-value str">"Content-Type"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/atom+xml"</span>,
|
453
|
+
<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>)
|
454
|
+
<span class="ruby-keyword kw">end</span>
|
455
|
+
</pre>
|
456
|
+
</div>
|
457
|
+
</div>
|
458
|
+
</div>
|
459
|
+
|
460
|
+
|
461
|
+
</div>
|
462
|
+
|
463
|
+
|
464
|
+
</div>
|
465
|
+
|
466
|
+
|
467
|
+
<div id="validator-badges">
|
468
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
469
|
+
</div>
|
470
|
+
|
471
|
+
</body>
|
472
|
+
</html>
|