Class: Rakumarket::Client

Inherits:
Spitter
  • Object
show all
Includes:
HTTParty
Defined in:
lib/rakumarket/client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from SpitterMethods

extended, #inspect_options, #parameter, #parameters, #parse, #rules

Constructor Details

#initialize(params = {}) ⇒ Client

Returns a new instance of Client.



13
14
15
16
# File 'lib/rakumarket/client.rb', line 13

def initialize(params={})
  @developer_id = params[:developer_id] || Rakumarket.developer_id
  super params.merge(default_options)
end

Instance Attribute Details

#developer_idObject

Returns the value of attribute developer_id.



4
5
6
# File 'lib/rakumarket/client.rb', line 4

def developer_id
  @developer_id
end

Class Method Details

.request(params) ⇒ Object



11
# File 'lib/rakumarket/client.rb', line 11

def self.request(params) new(params).request end

Instance Method Details

#requestObject



18
19
20
# File 'lib/rakumarket/client.rb', line 18

def request
  @response = self.class.get("/json", :query => parse)
end