Class: Lushao::Api
- Inherits:
-
Object
- Object
- Lushao::Api
- Defined in:
- lib/lushao/api.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
- #find_company_with_domain(domain) ⇒ Object
- #find_company_with_name(name) ⇒ Object
- #find_person_with_company(company, first_name, last_name, property = nil) ⇒ Object
- #find_person_with_domain(domain, first_name, last_name, property = nil) ⇒ Object
-
#initialize(key) ⇒ Api
constructor
A new instance of Api.
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
#key ⇒ Object (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 |