lib/omniauth/strategies/constantcontact2.rb in omniauth-constantcontact2-1.0.1 vs lib/omniauth/strategies/constantcontact2.rb in omniauth-constantcontact2-1.0.2
- old
+ new
@@ -1,7 +1,8 @@
require 'omniauth-oauth2'
require 'multi_json'
+require 'multi_xml'
module OmniAuth
module Strategies
class ConstantContact2 < OmniAuth::Strategies::OAuth2
@@ -38,16 +39,15 @@
info do
{
:email => raw_info['feed']['entry']['content']['Email']['EmailAddress']
}
end
-
extra do
{ 'raw_info' => raw_info }
end
def raw_info
- @raw_info ||= access_token.get("https://api.constantcontact.com/ws/customers/" + request.params['username'] + "/settings/emailaddresses").parsed
+ @raw_info ||= MultiXml.parse(access_token.get("https://api.constantcontact.com/ws/customers/" + request.params['username'] + "/settings/emailaddresses").body)
end
end
end
end