contacts 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. data/lib/contacts/base.rb +2 -1
  2. metadata +5 -48
  3. data/doc/classes/Contacts.html +0 -195
  4. data/doc/classes/Contacts.src/M000001.html +0 -22
  5. data/doc/classes/Contacts.src/M000002.html +0 -24
  6. data/doc/classes/Contacts/AuthenticationError.html +0 -113
  7. data/doc/classes/Contacts/Base.html +0 -214
  8. data/doc/classes/Contacts/Base.src/M000006.html +0 -21
  9. data/doc/classes/Contacts/Base.src/M000007.html +0 -19
  10. data/doc/classes/Contacts/Base.src/M000008.html +0 -18
  11. data/doc/classes/Contacts/Base.src/M000009.html +0 -31
  12. data/doc/classes/Contacts/Base.src/M000010.html +0 -29
  13. data/doc/classes/Contacts/Base.src/M000011.html +0 -18
  14. data/doc/classes/Contacts/ConnectionError.html +0 -113
  15. data/doc/classes/Contacts/ContactsError.html +0 -111
  16. data/doc/classes/Contacts/Gmail.html +0 -172
  17. data/doc/classes/Contacts/Gmail.src/M000005.html +0 -60
  18. data/doc/classes/Contacts/Hotmail.html +0 -182
  19. data/doc/classes/Contacts/Hotmail.src/M000012.html +0 -74
  20. data/doc/classes/Contacts/TypeNotFound.html +0 -113
  21. data/doc/classes/Contacts/Yahoo.html +0 -187
  22. data/doc/classes/Contacts/Yahoo.src/M000003.html +0 -41
  23. data/doc/classes/Contacts/Yahoo.src/M000004.html +0 -45
  24. data/doc/created.rid +0 -1
  25. data/doc/files/README.html +0 -168
  26. data/doc/files/lib/contacts/base_rb.html +0 -114
  27. data/doc/files/lib/contacts/gmail_rb.html +0 -108
  28. data/doc/files/lib/contacts/hotmail_rb.html +0 -101
  29. data/doc/files/lib/contacts/yahoo_rb.html +0 -108
  30. data/doc/files/lib/contacts_rb.html +0 -112
  31. data/doc/fr_class_index.html +0 -35
  32. data/doc/fr_file_index.html +0 -32
  33. data/doc/fr_method_index.html +0 -38
  34. data/doc/index.html +0 -24
  35. data/doc/rdoc-style.css +0 -208
  36. data/lib/contacts/foo.diff +0 -156
@@ -1,74 +0,0 @@
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 11</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">real_connect</span>
15
- <span class="ruby-ivar">@use_new_contact_url</span> = <span class="ruby-keyword kw">false</span>
16
-
17
- <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>)
18
-
19
- <span class="ruby-identifier">old_url</span> = <span class="ruby-constant">URL</span>
20
- <span class="ruby-keyword kw">until</span> <span class="ruby-identifier">forward</span>.<span class="ruby-identifier">nil?</span>
21
- <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>]
22
- <span class="ruby-keyword kw">end</span>
23
-
24
- <span class="ruby-identifier">postdata</span> = <span class="ruby-node">&quot;PPSX=#{CGI.escape(data.split(&quot;&gt;&lt;&quot;).grep(/PPSX/).first[/=\S+$/][2..-3])}&amp;&quot;</span>
25
- <span class="ruby-identifier">postdata</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;PwdPad=#{PWDPAD[0...(PWDPAD.length-@password.length)]}&amp;&quot;</span>
26
- <span class="ruby-identifier">postdata</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;login=#{CGI.escape(login)}&amp;passwd=#{CGI.escape(password)}&amp;LoginOptions=2&amp;&quot;</span>
27
- <span class="ruby-identifier">postdata</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;PPFT=#{CGI.escape(data.split(&quot;&gt;&lt;&quot;).grep(/PPFT/).first[/=\S+$/][2..-3])}&quot;</span>
28
-
29
- <span class="ruby-identifier">form_url</span> = <span class="ruby-identifier">data</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;&gt;&lt;&quot;</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>]
30
- <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>)
31
-
32
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">&quot;The e-mail address or password is incorrect&quot;</span>)
33
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">AuthenticationError</span>, <span class="ruby-value str">&quot;Username and password do not match&quot;</span>
34
- <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">data</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">&quot;&quot;</span>
35
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">AuthenticationError</span>, <span class="ruby-value str">&quot;Required field must not be blank&quot;</span>
36
- <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">cookies</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;&quot;</span>
37
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ConnectionError</span>, <span class="ruby-constant">PROTOCOL_ERROR</span>
38
- <span class="ruby-keyword kw">end</span>
39
-
40
- <span class="ruby-identifier">old_url</span> = <span class="ruby-identifier">form_url</span>
41
- <span class="ruby-keyword kw">until</span> <span class="ruby-identifier">forward</span>.<span class="ruby-identifier">nil?</span>
42
- <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>]
43
- <span class="ruby-keyword kw">end</span>
44
-
45
- <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>
46
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ConnectionError</span>, <span class="ruby-constant">PROTOCOL_ERROR</span>
47
- <span class="ruby-keyword kw">end</span>
48
-
49
- <span class="ruby-identifier">forward</span> = <span class="ruby-value str">&quot;http://www.hotmail.msn.com/cgi-bin/sbox&quot;</span>
50
-
51
- <span class="ruby-keyword kw">until</span> <span class="ruby-identifier">forward</span>.<span class="ruby-identifier">nil?</span>
52
- <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>]
53
- <span class="ruby-keyword kw">end</span>
54
-
55
- <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>
56
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ConnectionError</span>, <span class="ruby-constant">PROTOCOL_ERROR</span>
57
- <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">old_url</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">'login.live.com'</span>)
58
- <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-value str">&quot;http://mail.live.com/mail&quot;</span>, <span class="ruby-identifier">cookies</span>)
59
- <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>)
60
- <span class="ruby-identifier">old_url</span> = <span class="ruby-identifier">forward</span>
61
- <span class="ruby-ivar">@use_new_contact_url</span> = <span class="ruby-keyword kw">true</span>
62
- <span class="ruby-keyword kw">end</span>
63
-
64
- <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>
65
- <span class="ruby-ivar">@cookies</span> = <span class="ruby-identifier">cookies</span>
66
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">AuthenticationError</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">m</span>
67
- <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@attempt</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
68
- <span class="ruby-keyword kw">retry</span>
69
- <span class="ruby-keyword kw">else</span>
70
- <span class="ruby-identifier">raise</span> <span class="ruby-identifier">m</span>
71
- <span class="ruby-keyword kw">end</span>
72
- <span class="ruby-keyword kw">end</span></pre>
73
- </body>
74
- </html>
@@ -1,113 +0,0 @@
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>
@@ -1,187 +0,0 @@
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="#M000004">contacts</a>&nbsp;&nbsp;
92
- <a href="#M000003">real_connect</a>&nbsp;&nbsp;
93
- </div>
94
- </div>
95
-
96
- </div>
97
-
98
-
99
- <!-- if includes -->
100
-
101
- <div id="section">
102
-
103
-
104
- <div id="constants-list">
105
- <h3 class="section-bar">Constants</h3>
106
-
107
- <div class="name-list">
108
- <table summary="Constants">
109
- <tr class="top-aligned-row context-row">
110
- <td class="context-item-name">URL</td>
111
- <td>=</td>
112
- <td class="context-item-value">&quot;http://mail.yahoo.com/&quot;</td>
113
- </tr>
114
- <tr class="top-aligned-row context-row">
115
- <td class="context-item-name">LOGIN_URL</td>
116
- <td>=</td>
117
- <td class="context-item-value">&quot;https://login.yahoo.com/config/login&quot;</td>
118
- </tr>
119
- <tr class="top-aligned-row context-row">
120
- <td class="context-item-name">ADDRESS_BOOK_URL</td>
121
- <td>=</td>
122
- <td class="context-item-value">&quot;http://address.mail.yahoo.com/?1&amp;VPC=import_export&quot;</td>
123
- </tr>
124
- <tr class="top-aligned-row context-row">
125
- <td class="context-item-name">CONTACT_LIST_URL</td>
126
- <td>=</td>
127
- <td class="context-item-value">&quot;http://address.yahoo.com/index.php?VPC=import_export&amp;A=B&amp;submit[action_export_yahoo]=Export%20Now&quot;</td>
128
- </tr>
129
- <tr class="top-aligned-row context-row">
130
- <td class="context-item-name">PROTOCOL_ERROR</td>
131
- <td>=</td>
132
- <td class="context-item-value">&quot;Yahoo has changed its protocols, please upgrade this library first. If that does not work, contact lucas@rufy.com with this error&quot;</td>
133
- </tr>
134
- </table>
135
- </div>
136
- </div>
137
-
138
-
139
-
140
-
141
-
142
-
143
- <!-- if method_list -->
144
- <div id="methods">
145
- <h3 class="section-bar">Public Instance methods</h3>
146
-
147
- <div id="method-M000004" class="method-detail">
148
- <a name="M000004"></a>
149
-
150
- <div class="method-heading">
151
- <a href="Yahoo.src/M000004.html" target="Code" class="method-signature"
152
- onclick="popupCode('Yahoo.src/M000004.html');return false;">
153
- <span class="method-name">contacts</span><span class="method-args">()</span>
154
- </a>
155
- </div>
156
-
157
- <div class="method-description">
158
- </div>
159
- </div>
160
-
161
- <div id="method-M000003" class="method-detail">
162
- <a name="M000003"></a>
163
-
164
- <div class="method-heading">
165
- <a href="Yahoo.src/M000003.html" target="Code" class="method-signature"
166
- onclick="popupCode('Yahoo.src/M000003.html');return false;">
167
- <span class="method-name">real_connect</span><span class="method-args">()</span>
168
- </a>
169
- </div>
170
-
171
- <div class="method-description">
172
- </div>
173
- </div>
174
-
175
-
176
- </div>
177
-
178
-
179
- </div>
180
-
181
-
182
- <div id="validator-badges">
183
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
184
- </div>
185
-
186
- </body>
187
- </html>
@@ -1,41 +0,0 @@
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::Yahoo)</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/yahoo.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">&quot;.tries=2&amp;.src=ym&amp;.md5=&amp;.hash=&amp;.js=&amp;.last=&amp;promo=&amp;.intl=us&amp;.bypass=&quot;</span>
16
- <span class="ruby-identifier">postdata</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">&quot;&amp;.partner=&amp;.u=4eo6isd23l8r3&amp;.v=0&amp;.challenge=gsMsEcoZP7km3N3NeI4mX&quot;</span>
17
- <span class="ruby-identifier">postdata</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">&quot;kGB7zMV&amp;.yplus=&amp;.emailCode=&amp;pkg=&amp;stepid=&amp;.ev=&amp;hasMsgr=1&amp;.chkP=Y&amp;.&quot;</span>
18
- <span class="ruby-identifier">postdata</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;done=#{CGI.escape(URL)}&amp;login=#{CGI.escape(login)}&amp;passwd=#{CGI.escape(password)}&quot;</span>
19
-
20
- <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-constant">LOGIN_URL</span>, <span class="ruby-identifier">postdata</span>)
21
-
22
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">&quot;Invalid ID or password&quot;</span>)
23
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">AuthenticationError</span>, <span class="ruby-value str">&quot;Username and password do not match&quot;</span>
24
- <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">&quot;Sign in&quot;</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">&quot;to Yahoo!&quot;</span>)
25
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">AuthenticationError</span>, <span class="ruby-value str">&quot;Required field must not be blank&quot;</span>
26
- <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">data</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">&quot;&quot;</span>
27
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ConnectionError</span>, <span class="ruby-constant">PROTOCOL_ERROR</span>
28
- <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">cookies</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;&quot;</span>
29
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ConnectionError</span>, <span class="ruby-constant">PROTOCOL_ERROR</span>
30
- <span class="ruby-keyword kw">end</span>
31
-
32
- <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">LOGIN_URL</span>)
33
-
34
- <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>
35
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ConnectionError</span>, <span class="ruby-constant">PROTOCOL_ERROR</span>
36
- <span class="ruby-keyword kw">end</span>
37
-
38
- <span class="ruby-ivar">@cookies</span> = <span class="ruby-identifier">cookies</span>
39
- <span class="ruby-keyword kw">end</span></pre>
40
- </body>
41
- </html>
@@ -1,45 +0,0 @@
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>contacts (Contacts::Yahoo)</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/yahoo.rb, line 38</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">contacts</span>
15
- <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@contacts</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@contacts</span>
16
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">connected?</span>
17
- <span class="ruby-comment cmt"># first, get the addressbook site with the new crumb parameter</span>
18
- <span class="ruby-identifier">url</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">address_book_url</span>)
19
- <span class="ruby-identifier">http</span> = <span class="ruby-identifier">open_http</span>(<span class="ruby-identifier">url</span>)
20
- <span class="ruby-identifier">resp</span>, <span class="ruby-identifier">data</span> = <span class="ruby-identifier">http</span>.<span class="ruby-identifier">get</span>(<span class="ruby-node">&quot;#{url.path}?#{url.query}&quot;</span>,
21
- <span class="ruby-value str">&quot;Cookie&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@cookies</span>
22
- )
23
-
24
- <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>
25
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ConnectionError</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-identifier">:PROTOCOL_ERROR</span>)
26
- <span class="ruby-keyword kw">end</span>
27
-
28
- <span class="ruby-identifier">crumb</span> = <span class="ruby-identifier">data</span>.<span class="ruby-identifier">to_s</span>[<span class="ruby-regexp re">/id=&quot;crumb2&quot; value=&quot;(.*?)&quot;/</span>][<span class="ruby-value">19</span><span class="ruby-operator">...</span><span class="ruby-value">-1</span>]
29
-
30
- <span class="ruby-comment cmt"># now proceed with the new &quot;.crumb&quot; parameter to get the csv data</span>
31
- <span class="ruby-identifier">url</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-node">&quot;#{contact_list_url}&amp;.crumb=#{crumb}&quot;</span>)
32
- <span class="ruby-identifier">http</span> = <span class="ruby-identifier">open_http</span>(<span class="ruby-identifier">url</span>)
33
- <span class="ruby-identifier">resp</span>, <span class="ruby-identifier">data</span> = <span class="ruby-identifier">http</span>.<span class="ruby-identifier">get</span>(<span class="ruby-node">&quot;#{url.path}?#{url.query}&quot;</span>,
34
- <span class="ruby-value str">&quot;Cookie&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@cookies</span>
35
- )
36
-
37
- <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>
38
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ConnectionError</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-identifier">:PROTOCOL_ERROR</span>)
39
- <span class="ruby-keyword kw">end</span>
40
-
41
- <span class="ruby-identifier">parse</span> <span class="ruby-identifier">data</span>
42
- <span class="ruby-keyword kw">end</span>
43
- <span class="ruby-keyword kw">end</span></pre>
44
- </body>
45
- </html>