lib/fullcontact/client/person.rb in fullcontact-0.2.0 vs lib/fullcontact/client/person.rb in fullcontact-0.3.0
- old
+ new
@@ -1,11 +1,15 @@
module FullContact
class Client
module Person
- # Returns extended information for a given email
+ # Returns extended information for a given person (email, phone, twitter or facebook)
#
- def person(email)
- response = get('person', :email => email)
+ def person(options={})
+ if options.is_a?(String)
+ warn "[DEPRECATION] supplying an email address directly is deprecated. Please use {email: #{options}} instead."
+ options = {:email => options}
+ end
+ response = get('person', options)
format.to_s.downcase == 'xml' ? response['person'] : response
end
end
end
end