Class: ContactData::Deprecated

Inherits:
Object
  • Object
show all
Defined in:
lib/contact-data/deprecated.rb

Class Method Summary collapse

Class Method Details

.find_contacts_in(text) ⇒ Object



12
13
14
# File 'lib/contact-data/deprecated.rb', line 12

def find_contacts_in(text)
  Fetcher.post('text/find_contacts', payload: { text: text }, timeout: 600)
end


16
17
18
# File 'lib/contact-data/deprecated.rb', line 16

def (url)
  Fetcher.get("link/#{CGI.escape(url)}", noformat: true)
end

.search(name, contact_type = nil) ⇒ Object



6
7
8
9
10
# File 'lib/contact-data/deprecated.rb', line 6

def search(name, contact_type = nil)
  options = {}
  options[:params] = { contact_type: contact_type } if contact_type
  Fetcher.get("name/#{name.encode_component}", options)
end