Class: Jigsaw::Client
- Inherits:
-
Object
- Object
- Jigsaw::Client
- Defined in:
- lib/jigsaw/client.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
Instance Method Summary collapse
- #company(id, options = {}) ⇒ Object
- #company_search(options = {}, fetch_all = false) ⇒ Object
- #contact_search(options = {}, fetch_all = false) ⇒ Object
-
#initialize(api_key) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(api_key) ⇒ Client
Returns a new instance of Client.
6 7 8 |
# File 'lib/jigsaw/client.rb', line 6 def initialize(api_key) @api_key = api_key end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
4 5 6 |
# File 'lib/jigsaw/client.rb', line 4 def api_key @api_key end |
Instance Method Details
#company(id, options = {}) ⇒ Object
18 19 20 |
# File 'lib/jigsaw/client.rb', line 18 def company(id, = {}) Company.find(@api_key, id, ) end |
#company_search(options = {}, fetch_all = false) ⇒ Object
10 11 12 |
# File 'lib/jigsaw/client.rb', line 10 def company_search( = {}, fetch_all = false) CompanySearch.list(@api_key, , fetch_all) end |
#contact_search(options = {}, fetch_all = false) ⇒ Object
14 15 16 |
# File 'lib/jigsaw/client.rb', line 14 def contact_search( = {}, fetch_all = false) ContactSearch.list(@api_key, , fetch_all) end |