Class: Contacts::Sohu
Constant Summary collapse
- URL =
"http://mail.sohu.com"
- DOMAIN =
"sohu.com"
- LOGIN_URL =
"https://passport.sohu.com/sso/login.jsp"
- LOGIN_COOKIE =
"IPLOC=CN3301; SUV=1008301317090277"
- MAIL_URL =
"http://mail.sohu.com/bapp/117/main"
- PROTOCOL_ERROR =
"sohu has changed its protocols, please upgrade this library first. you can also contact [email protected]"
Instance Method Summary collapse
Methods inherited from Base
#connect, #connected?, #initialize, #login, #login_with_domain, #login_without_domain, #password
Constructor Details
This class inherits a constructor from Contacts::Base
Instance Method Details
#contacts ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/contacts/sohu.rb', line 14 def contacts return @contacts if @contacts if connected? data, resp, , forward = get(MAIL_URL,@cookies) if resp.code_type != Net::HTTPOK raise ConnectionError, self.class.const_get(:PROTOCOL_ERROR) end parse(data) end end |
#real_connect ⇒ Object
10 11 12 |
# File 'lib/contacts/sohu.rb', line 10 def real_connect end |