Class: Contacts::Plaxo

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

Constant Summary collapse

URL =
"http://www.plaxo.com/"
LOGIN_URL =
"https://www.plaxo.com/signin"
ADDRESS_BOOK_URL =
"http://www.plaxo.com/po3/?module=ab&operation=viewFull&mode=normal"
CONTACT_LIST_URL =
"http://www.plaxo.com/axis/soap/contact?_action=getContacts&_format=xml"
PROTOCOL_ERROR =
"Plaxo has changed its protocols, please upgrade this library first. If that does not work, dive into the code and submit a patch at http://github.com/cardmagic/contacts"

Instance Method Summary collapse

Methods inherited from Base

#connect, #connected?, #initialize, #login, #password, #skip_gzip?

Constructor Details

This class inherits a constructor from Contacts::Base

Instance Method Details

#contactsObject

real_connect



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/contacts/plaxo.rb', line 15

def contacts
  getdata = "&authInfo.authByEmail.email=%s" % CGI.escape()
  getdata += "&authInfo.authByEmail.password=%s" % CGI.escape(password)
  data, resp, cookies, forward = get(CONTACT_LIST_URL + getdata)
  
  if resp.code_type != Net::HTTPOK
    raise ConnectionError, PROTOCOL_ERROR
  end
  
  parse data
end

#real_connectObject



11
12
13
# File 'lib/contacts/plaxo.rb', line 11

def real_connect
  
end