Class: Lushao::Api

Inherits:
Object
  • Object
show all
Defined in:
lib/lushao/api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ Api

Returns a new instance of Api.



10
11
12
# File 'lib/lushao/api.rb', line 10

def initialize(key)
	@key = key
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



8
9
10
# File 'lib/lushao/api.rb', line 8

def key
  @key
end

Instance Method Details

#find_company_with_domain(domain) ⇒ Object



26
27
28
# File 'lib/lushao/api.rb', line 26

def find_company_with_domain(domain)
  Lushao::Person.new(domain,1, self.key).get_results
end

#find_company_with_name(name) ⇒ Object



22
23
24
# File 'lib/lushao/api.rb', line 22

def find_company_with_name(name)
  Lushao::Person.new(name,0, self.key).get_results
end

#find_person_with_company(company, first_name, last_name, property = nil) ⇒ Object



14
15
16
# File 'lib/lushao/api.rb', line 14

def find_person_with_company(company, first_name, last_name,property=nil)
  Lushao::Person.new(company, first_name, last_name,0, self.key,property).get_results
end

#find_person_with_domain(domain, first_name, last_name, property = nil) ⇒ Object



18
19
20
# File 'lib/lushao/api.rb', line 18

def find_person_with_domain(domain, first_name, last_name,property=nil)
  Lushao::Person.new(domain, first_name, last_name,1, self.key,property).get_results
end