Module: FullContact::Client::Person

Included in:
FullContact::Client
Defined in:
lib/fullcontact/client/person.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) person(options = {}, faraday_options = {})

Returns extended information for a given person (email, phone, twitter or facebook)



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/fullcontact/client/person.rb', line 6

def person(options={}, faraday_options={})
   if options.is_a?(String)
     warn "[DEPRECATION] supplying an email address directly is deprecated.  Please use {email: #{options}} instead."
     options = {:email => options}
   end

   if options.has_key?(:timeoutSeconds)
     options.delete(:timeoutSeconds)
     warn '[DEPRECATION] timeoutSeconds is no longer a supported parameter. It has been removed from your request.'
   end

  response = get('person', options, false, faraday_options)
  format.to_s.downcase == 'xml' ? response['person'] : response
end