contacts 1.0.0 → 1.0.1
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/doc/classes/Contacts.html +195 -0
- data/doc/classes/Contacts.src/M000001.html +22 -0
- data/doc/classes/Contacts.src/M000002.html +24 -0
- data/doc/classes/Contacts/AuthenticationError.html +113 -0
- data/doc/classes/Contacts/Base.html +214 -0
- data/doc/classes/Contacts/Base.src/M000005.html +20 -0
- data/doc/classes/Contacts/Base.src/M000006.html +19 -0
- data/doc/classes/Contacts/Base.src/M000007.html +18 -0
- data/doc/classes/Contacts/Base.src/M000008.html +35 -0
- data/doc/classes/Contacts/Base.src/M000009.html +29 -0
- data/doc/classes/Contacts/Base.src/M000010.html +18 -0
- data/doc/classes/Contacts/ConnectionError.html +113 -0
- data/doc/classes/Contacts/ContactsError.html +111 -0
- data/doc/classes/Contacts/Gmail.html +172 -0
- data/doc/classes/Contacts/Gmail.src/M000004.html +60 -0
- data/doc/classes/Contacts/Hotmail.html +167 -0
- data/doc/classes/Contacts/Hotmail.src/M000011.html +63 -0
- data/doc/classes/Contacts/TypeNotFound.html +113 -0
- data/doc/classes/Contacts/Yahoo.html +167 -0
- data/doc/classes/Contacts/Yahoo.src/M000003.html +41 -0
- data/doc/created.rid +1 -0
- data/doc/files/README.html +168 -0
- data/doc/files/lib/contacts/base_rb.html +111 -0
- data/doc/files/lib/contacts/gmail_rb.html +108 -0
- data/doc/files/lib/contacts/hotmail_rb.html +101 -0
- data/doc/files/lib/contacts/yahoo_rb.html +108 -0
- data/doc/files/lib/contacts_rb.html +112 -0
- data/doc/fr_class_index.html +35 -0
- data/doc/fr_file_index.html +32 -0
- data/doc/fr_method_index.html +37 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/contacts/base.rb +1 -1
- data/lib/contacts/gmail.rb +1 -1
- data/lib/contacts/hotmail.rb +1 -1
- data/lib/contacts/yahoo.rb +8 -15
- metadata +44 -2
@@ -0,0 +1,60 @@
|
|
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>
|
7
|
+
<head>
|
8
|
+
<title>real_connect (Contacts::Gmail)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/contacts/gmail.rb, line 11</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">real_connect</span>
|
15
|
+
<span class="ruby-identifier">postdata</span> = <span class="ruby-value str">"ltmpl=yj_blanco"</span>
|
16
|
+
<span class="ruby-identifier">postdata</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"&continue=#{CGI.escape(URL)}"</span>
|
17
|
+
<span class="ruby-identifier">postdata</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"&ltmplcache=2"</span>
|
18
|
+
<span class="ruby-identifier">postdata</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"&service=mail"</span>
|
19
|
+
<span class="ruby-identifier">postdata</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"&rm=false"</span>
|
20
|
+
<span class="ruby-identifier">postdata</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"&ltmpl=yj_blanco"</span>
|
21
|
+
<span class="ruby-identifier">postdata</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"&hl=en"</span>
|
22
|
+
<span class="ruby-identifier">postdata</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"&Email=#{CGI.escape(login)}"</span>
|
23
|
+
<span class="ruby-identifier">postdata</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"&Passwd=#{CGI.escape(password)}"</span>
|
24
|
+
<span class="ruby-identifier">postdata</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"&rmShown=1"</span>
|
25
|
+
<span class="ruby-identifier">postdata</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"&null=Sign+in"</span>
|
26
|
+
|
27
|
+
<span class="ruby-identifier">time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">to_i</span>
|
28
|
+
<span class="ruby-identifier">time_past</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">-</span> <span class="ruby-value">8</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">rand</span>(<span class="ruby-value">12</span>)
|
29
|
+
<span class="ruby-identifier">cookie</span> = <span class="ruby-node">"GMAIL_LOGIN=T#{time_past}/#{time_past}/#{time}"</span>
|
30
|
+
|
31
|
+
<span class="ruby-identifier">data</span>, <span class="ruby-identifier">resp</span>, <span class="ruby-identifier">cookies</span>, <span class="ruby-identifier">forward</span>, <span class="ruby-identifier">old_url</span> = <span class="ruby-identifier">post</span>(<span class="ruby-constant">LOGIN_URL</span>, <span class="ruby-identifier">postdata</span>, <span class="ruby-identifier">cookie</span>, <span class="ruby-constant">LOGIN_REFERER_URL</span>) <span class="ruby-operator">+</span> [<span class="ruby-constant">LOGIN_URL</span>]
|
32
|
+
|
33
|
+
<span class="ruby-identifier">cookies</span> = <span class="ruby-identifier">remove_cookie</span>(<span class="ruby-value str">"GMAIL_LOGIN"</span>, <span class="ruby-identifier">cookies</span>)
|
34
|
+
|
35
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">"Username and password do not match"</span>)
|
36
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">AuthenticationError</span>, <span class="ruby-value str">"Username and password do not match"</span>
|
37
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">"Required field must not be blank"</span>)
|
38
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">AuthenticationError</span>, <span class="ruby-value str">"Login and password must not be blank"</span>
|
39
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">"errormsg_0_logincaptcha"</span>)
|
40
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">AuthenticationError</span>, <span class="ruby-value str">"Captcha error"</span>
|
41
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">"Invalid request"</span>)
|
42
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ConnectionError</span>, <span class="ruby-constant">PROTOCOL_ERROR</span>
|
43
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">cookies</span> <span class="ruby-operator">==</span> <span class="ruby-value str">""</span>
|
44
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ConnectionError</span>, <span class="ruby-constant">PROTOCOL_ERROR</span>
|
45
|
+
<span class="ruby-keyword kw">end</span>
|
46
|
+
|
47
|
+
<span class="ruby-keyword kw">until</span> <span class="ruby-identifier">forward</span>.<span class="ruby-identifier">nil?</span>
|
48
|
+
<span class="ruby-identifier">data</span>, <span class="ruby-identifier">resp</span>, <span class="ruby-identifier">cookies</span>, <span class="ruby-identifier">forward</span>, <span class="ruby-identifier">old_url</span> = <span class="ruby-identifier">get</span>(<span class="ruby-identifier">forward</span>, <span class="ruby-identifier">cookies</span>, <span class="ruby-identifier">old_url</span>) <span class="ruby-operator">+</span> [<span class="ruby-identifier">forward</span>]
|
49
|
+
<span class="ruby-keyword kw">end</span>
|
50
|
+
<span class="ruby-identifier">cookies</span> = <span class="ruby-identifier">remove_cookie</span>(<span class="ruby-value str">"LSID"</span>, <span class="ruby-identifier">cookies</span>)
|
51
|
+
<span class="ruby-identifier">cookies</span> = <span class="ruby-identifier">remove_cookie</span>(<span class="ruby-value str">"GV"</span>, <span class="ruby-identifier">cookies</span>)
|
52
|
+
|
53
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">code_type</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTPOK</span>
|
54
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ConnectionError</span>, <span class="ruby-constant">PROTOCOL_ERROR</span>
|
55
|
+
<span class="ruby-keyword kw">end</span>
|
56
|
+
|
57
|
+
<span class="ruby-ivar">@cookies</span> = <span class="ruby-identifier">cookies</span>
|
58
|
+
<span class="ruby-keyword kw">end</span></pre>
|
59
|
+
</body>
|
60
|
+
</html>
|
@@ -0,0 +1,167 @@
|
|
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: Contacts::Hotmail</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">Contacts::Hotmail</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/contacts/hotmail_rb.html">
|
59
|
+
lib/contacts/hotmail.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="Base.html">
|
69
|
+
Base
|
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
|
+
|
84
|
+
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<div id="method-list">
|
88
|
+
<h3 class="section-bar">Methods</h3>
|
89
|
+
|
90
|
+
<div class="name-list">
|
91
|
+
<a href="#M000011">real_connect</a>
|
92
|
+
</div>
|
93
|
+
</div>
|
94
|
+
|
95
|
+
</div>
|
96
|
+
|
97
|
+
|
98
|
+
<!-- if includes -->
|
99
|
+
|
100
|
+
<div id="section">
|
101
|
+
|
102
|
+
|
103
|
+
<div id="constants-list">
|
104
|
+
<h3 class="section-bar">Constants</h3>
|
105
|
+
|
106
|
+
<div class="name-list">
|
107
|
+
<table summary="Constants">
|
108
|
+
<tr class="top-aligned-row context-row">
|
109
|
+
<td class="context-item-name">URL</td>
|
110
|
+
<td>=</td>
|
111
|
+
<td class="context-item-value">"http://www.hotmail.com/"</td>
|
112
|
+
</tr>
|
113
|
+
<tr class="top-aligned-row context-row">
|
114
|
+
<td class="context-item-name">CONTACT_LIST_URL</td>
|
115
|
+
<td>=</td>
|
116
|
+
<td class="context-item-value">"http://%s/cgi-bin/addresses"</td>
|
117
|
+
</tr>
|
118
|
+
<tr class="top-aligned-row context-row">
|
119
|
+
<td class="context-item-name">PROTOCOL_ERROR</td>
|
120
|
+
<td>=</td>
|
121
|
+
<td class="context-item-value">"Hotmail has changed its protocols, please upgrade this library first. If that does not work, contact lucas@rufy.com with this error"</td>
|
122
|
+
</tr>
|
123
|
+
<tr class="top-aligned-row context-row">
|
124
|
+
<td class="context-item-name">PWDPAD</td>
|
125
|
+
<td>=</td>
|
126
|
+
<td class="context-item-value">"IfYouAreReadingThisYouHaveTooMuchFreeTime"</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 Instance methods</h3>
|
140
|
+
|
141
|
+
<div id="method-M000011" class="method-detail">
|
142
|
+
<a name="M000011"></a>
|
143
|
+
|
144
|
+
<div class="method-heading">
|
145
|
+
<a href="Hotmail.src/M000011.html" target="Code" class="method-signature"
|
146
|
+
onclick="popupCode('Hotmail.src/M000011.html');return false;">
|
147
|
+
<span class="method-name">real_connect</span><span class="method-args">()</span>
|
148
|
+
</a>
|
149
|
+
</div>
|
150
|
+
|
151
|
+
<div class="method-description">
|
152
|
+
</div>
|
153
|
+
</div>
|
154
|
+
|
155
|
+
|
156
|
+
</div>
|
157
|
+
|
158
|
+
|
159
|
+
</div>
|
160
|
+
|
161
|
+
|
162
|
+
<div id="validator-badges">
|
163
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
164
|
+
</div>
|
165
|
+
|
166
|
+
</body>
|
167
|
+
</html>
|
@@ -0,0 +1,63 @@
|
|
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>
|
7
|
+
<head>
|
8
|
+
<title>real_connect (Contacts::Hotmail)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/contacts/hotmail.rb, line 8</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">real_connect</span>
|
15
|
+
<span class="ruby-identifier">data</span>, <span class="ruby-identifier">resp</span>, <span class="ruby-identifier">cookies</span>, <span class="ruby-identifier">forward</span> = <span class="ruby-identifier">get</span>(<span class="ruby-constant">URL</span>)
|
16
|
+
<span class="ruby-identifier">data</span>, <span class="ruby-identifier">resp</span>, <span class="ruby-identifier">cookies</span>, <span class="ruby-identifier">forward</span> = <span class="ruby-identifier">get</span>(<span class="ruby-identifier">forward</span>, <span class="ruby-identifier">cookies</span>, <span class="ruby-constant">URL</span>)
|
17
|
+
|
18
|
+
<span class="ruby-identifier">postdata</span> = <span class="ruby-node">"PPSX=#{CGI.escape(data.split("><").grep(/PPSX/).first[/=\S+$/][2..-3])}&"</span>
|
19
|
+
<span class="ruby-identifier">postdata</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"PwdPad=#{PWDPAD[0...(PWDPAD.length-@password.length)]}&"</span>
|
20
|
+
<span class="ruby-identifier">postdata</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"login=#{CGI.escape(login)}&passwd=#{CGI.escape(password)}&LoginOptions=2&"</span>
|
21
|
+
<span class="ruby-identifier">postdata</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"PPFT=#{CGI.escape(data.split("><").grep(/PPFT/).first[/=\S+$/][2..-3])}"</span>
|
22
|
+
|
23
|
+
<span class="ruby-identifier">form_url</span> = <span class="ruby-identifier">data</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">"><"</span>).<span class="ruby-identifier">grep</span>(<span class="ruby-regexp re">/form/</span>).<span class="ruby-identifier">first</span>.<span class="ruby-identifier">split</span>[<span class="ruby-value">5</span>][<span class="ruby-value">8</span><span class="ruby-operator">..</span><span class="ruby-value">-2</span>]
|
24
|
+
<span class="ruby-identifier">data</span>, <span class="ruby-identifier">resp</span>, <span class="ruby-identifier">cookies</span>, <span class="ruby-identifier">forward</span> = <span class="ruby-identifier">post</span>(<span class="ruby-identifier">form_url</span>, <span class="ruby-identifier">postdata</span>, <span class="ruby-identifier">cookies</span>)
|
25
|
+
|
26
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">"The e-mail address or password is incorrect"</span>)
|
27
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">AuthenticationError</span>, <span class="ruby-value str">"Username and password do not match"</span>
|
28
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">data</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">""</span>
|
29
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">AuthenticationError</span>, <span class="ruby-value str">"Required field must not be blank"</span>
|
30
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">cookies</span> <span class="ruby-operator">==</span> <span class="ruby-value str">""</span>
|
31
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ConnectionError</span>, <span class="ruby-constant">PROTOCOL_ERROR</span>
|
32
|
+
<span class="ruby-keyword kw">end</span>
|
33
|
+
|
34
|
+
<span class="ruby-identifier">old_url</span> = <span class="ruby-identifier">form_url</span>
|
35
|
+
<span class="ruby-keyword kw">until</span> <span class="ruby-identifier">forward</span>.<span class="ruby-identifier">nil?</span>
|
36
|
+
<span class="ruby-identifier">data</span>, <span class="ruby-identifier">resp</span>, <span class="ruby-identifier">cookies</span>, <span class="ruby-identifier">forward</span>, <span class="ruby-identifier">old_url</span> = <span class="ruby-identifier">get</span>(<span class="ruby-identifier">forward</span>, <span class="ruby-identifier">cookies</span>, <span class="ruby-identifier">old_url</span>) <span class="ruby-operator">+</span> [<span class="ruby-identifier">forward</span>]
|
37
|
+
<span class="ruby-keyword kw">end</span>
|
38
|
+
|
39
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">code_type</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTPOK</span>
|
40
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ConnectionError</span>, <span class="ruby-constant">PROTOCOL_ERROR</span>
|
41
|
+
<span class="ruby-keyword kw">end</span>
|
42
|
+
|
43
|
+
<span class="ruby-identifier">forward</span> = <span class="ruby-value str">"http://www.hotmail.msn.com/cgi-bin/sbox"</span>
|
44
|
+
|
45
|
+
<span class="ruby-keyword kw">until</span> <span class="ruby-identifier">forward</span>.<span class="ruby-identifier">nil?</span>
|
46
|
+
<span class="ruby-identifier">data</span>, <span class="ruby-identifier">resp</span>, <span class="ruby-identifier">cookies</span>, <span class="ruby-identifier">forward</span>, <span class="ruby-identifier">old_url</span> = <span class="ruby-identifier">get</span>(<span class="ruby-identifier">forward</span>, <span class="ruby-identifier">cookies</span>, <span class="ruby-identifier">old_url</span>) <span class="ruby-operator">+</span> [<span class="ruby-identifier">forward</span>]
|
47
|
+
<span class="ruby-keyword kw">end</span>
|
48
|
+
|
49
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">code_type</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTPOK</span>
|
50
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ConnectionError</span>, <span class="ruby-constant">PROTOCOL_ERROR</span>
|
51
|
+
<span class="ruby-keyword kw">end</span>
|
52
|
+
|
53
|
+
<span class="ruby-ivar">@domain</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">old_url</span>).<span class="ruby-identifier">host</span>
|
54
|
+
<span class="ruby-ivar">@cookies</span> = <span class="ruby-identifier">cookies</span>
|
55
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">AuthenticationError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">m</span>
|
56
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@attempt</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
|
57
|
+
<span class="ruby-keyword kw">retry</span>
|
58
|
+
<span class="ruby-keyword kw">else</span>
|
59
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-identifier">m</span>
|
60
|
+
<span class="ruby-keyword kw">end</span>
|
61
|
+
<span class="ruby-keyword kw">end</span></pre>
|
62
|
+
</body>
|
63
|
+
</html>
|
@@ -0,0 +1,113 @@
|
|
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: Contacts::TypeNotFound</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">Contacts::TypeNotFound</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/contacts/base_rb.html">
|
59
|
+
lib/contacts/base.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
<a href="ContactsError.html">
|
69
|
+
ContactsError
|
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
|
+
|
84
|
+
|
85
|
+
</div>
|
86
|
+
|
87
|
+
|
88
|
+
</div>
|
89
|
+
|
90
|
+
|
91
|
+
<!-- if includes -->
|
92
|
+
|
93
|
+
<div id="section">
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
<!-- if method_list -->
|
103
|
+
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
|
108
|
+
<div id="validator-badges">
|
109
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
110
|
+
</div>
|
111
|
+
|
112
|
+
</body>
|
113
|
+
</html>
|
@@ -0,0 +1,167 @@
|
|
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: Contacts::Yahoo</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">Contacts::Yahoo</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/contacts/yahoo_rb.html">
|
59
|
+
lib/contacts/yahoo.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="Base.html">
|
69
|
+
Base
|
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
|
+
|
84
|
+
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<div id="method-list">
|
88
|
+
<h3 class="section-bar">Methods</h3>
|
89
|
+
|
90
|
+
<div class="name-list">
|
91
|
+
<a href="#M000003">real_connect</a>
|
92
|
+
</div>
|
93
|
+
</div>
|
94
|
+
|
95
|
+
</div>
|
96
|
+
|
97
|
+
|
98
|
+
<!-- if includes -->
|
99
|
+
|
100
|
+
<div id="section">
|
101
|
+
|
102
|
+
|
103
|
+
<div id="constants-list">
|
104
|
+
<h3 class="section-bar">Constants</h3>
|
105
|
+
|
106
|
+
<div class="name-list">
|
107
|
+
<table summary="Constants">
|
108
|
+
<tr class="top-aligned-row context-row">
|
109
|
+
<td class="context-item-name">URL</td>
|
110
|
+
<td>=</td>
|
111
|
+
<td class="context-item-value">"http://mail.yahoo.com/"</td>
|
112
|
+
</tr>
|
113
|
+
<tr class="top-aligned-row context-row">
|
114
|
+
<td class="context-item-name">LOGIN_URL</td>
|
115
|
+
<td>=</td>
|
116
|
+
<td class="context-item-value">"https://login.yahoo.com/config/login"</td>
|
117
|
+
</tr>
|
118
|
+
<tr class="top-aligned-row context-row">
|
119
|
+
<td class="context-item-name">CONTACT_LIST_URL</td>
|
120
|
+
<td>=</td>
|
121
|
+
<td class="context-item-value">"http://address.yahoo.com/index.php?VPC=import_export&A=B&submit[action_export_yahoo]=Export%20Now"</td>
|
122
|
+
</tr>
|
123
|
+
<tr class="top-aligned-row context-row">
|
124
|
+
<td class="context-item-name">PROTOCOL_ERROR</td>
|
125
|
+
<td>=</td>
|
126
|
+
<td class="context-item-value">"Yahoo has changed its protocols, please upgrade this library first. If that does not work, contact lucas@rufy.com with this error"</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 Instance methods</h3>
|
140
|
+
|
141
|
+
<div id="method-M000003" class="method-detail">
|
142
|
+
<a name="M000003"></a>
|
143
|
+
|
144
|
+
<div class="method-heading">
|
145
|
+
<a href="Yahoo.src/M000003.html" target="Code" class="method-signature"
|
146
|
+
onclick="popupCode('Yahoo.src/M000003.html');return false;">
|
147
|
+
<span class="method-name">real_connect</span><span class="method-args">()</span>
|
148
|
+
</a>
|
149
|
+
</div>
|
150
|
+
|
151
|
+
<div class="method-description">
|
152
|
+
</div>
|
153
|
+
</div>
|
154
|
+
|
155
|
+
|
156
|
+
</div>
|
157
|
+
|
158
|
+
|
159
|
+
</div>
|
160
|
+
|
161
|
+
|
162
|
+
<div id="validator-badges">
|
163
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
164
|
+
</div>
|
165
|
+
|
166
|
+
</body>
|
167
|
+
</html>
|