Class: ImportExport::Client
- Inherits:
-
Object
- Object
- ImportExport::Client
- Defined in:
- lib/import_export/client.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
- #search(params = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
12 13 14 |
# File 'lib/import_export/client.rb', line 12 def initialize( = {}) @api_key = [:api_key] end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
10 11 12 |
# File 'lib/import_export/client.rb', line 10 def api_key @api_key end |
Class Method Details
.search(options = {}) ⇒ Object
5 6 7 |
# File 'lib/import_export/client.rb', line 5 def search(= {}) Client.new.search() end |
Instance Method Details
#search(params = {}) ⇒ Object
20 21 22 23 |
# File 'lib/import_export/client.rb', line 20 def search(params = {}) params = { :api_key => api_key }.merge(params) parse_response Query.new(params).call end |