Class: ImportExport::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/import_export/client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



12
13
14
# File 'lib/import_export/client.rb', line 12

def initialize(options = {})
  @api_key = options[:api_key]
end

Instance Attribute Details

#api_keyObject (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(options= {})
  Client.new.search(options)
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