Class: Rakumarket::Client
- Inherits:
-
Object
- Object
- Rakumarket::Client
- Includes:
- HTTParty
- Defined in:
- lib/rakumarket/client.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#developer_id ⇒ Object
Returns the value of attribute developer_id.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
- #request(query = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
8 9 10 |
# File 'lib/rakumarket/client.rb', line 8 def initialize(={}) @developer_id = [:developer_id] || Rakumarket.developer_id end |
Instance Attribute Details
#developer_id ⇒ Object
Returns the value of attribute developer_id.
3 4 5 |
# File 'lib/rakumarket/client.rb', line 3 def developer_id @developer_id end |
Instance Method Details
#request(query = {}) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/rakumarket/client.rb', line 12 def request(query={}) @options = .merge(query).slice(*valid_request_keys) transform_request! @response = self.class.get("/json",:query => @options) respond end |