Class: Contacts::Sohu

Inherits:
Base
  • Object
show all
Defined in:
lib/contacts/sohu.rb

Constant Summary collapse

URL =
"http://mail.sohu.com"
DOMAIN =
"sohu.com"
LOGIN_URL =
"https://passport.sohu.com/sso/login.jsp"
"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

#contactsObject



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, cookies, 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_connectObject



10
11
12
# File 'lib/contacts/sohu.rb', line 10

def real_connect
  
end