class ContactData::Contact

Constants

BASE

Public Class Methods

from(source, slug, options = {}) click to toggle source
# File lib/contact-data/contact.rb, line 14
def from(source, slug, options = {})
  options[:base] ||= BASE
  options[:params] ||= { source: source, slug: slug }
  Fetcher.get(:from, options)
end
from_domain(domain, options = {}) click to toggle source
# File lib/contact-data/contact.rb, line 20
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] ||= explicit_contact_type if explicit_contact_type

  Fetcher.get(:from_domain, options)
end