lib/contact-data/contact.rb in contact-data-0.4.4 vs lib/contact-data/contact.rb in contact-data-0.4.5

- old
+ new

@@ -15,13 +15,16 @@ options[:params] ||= { source: source, slug: slug } Fetcher.get(:from, options) end def from_domain(domain, options = {}) + explicit_contact_type = options.delete(:contact_type) + options[:base] ||= BASE options[:api_base] ||= 'api/v3' options[:params] ||= { domain: domain } - options[:params][:contact_type] ||= options.delete(:contact_type) + options[:params][:contact_type] ||= explicit_contact_type if explicit_contact_type + Fetcher.get(:from_domain, options) end end end end