Class: Rakuten::Client
- Inherits:
-
Object
- Object
- Rakuten::Client
- Defined in:
- lib/rakuten/client.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
Instance Method Summary collapse
- #get(group, method, params = {}) ⇒ Object
-
#initialize(api_key) ⇒ Client
constructor
A new instance of Client.
- #post(group, method, params = {}) ⇒ Object
Constructor Details
#initialize(api_key) ⇒ Client
5 6 7 |
# File 'lib/rakuten/client.rb', line 5 def initialize api_key @api_key = api_key end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
3 4 5 |
# File 'lib/rakuten/client.rb', line 3 def api_key @api_key end |
Instance Method Details
#get(group, method, params = {}) ⇒ Object
9 10 11 |
# File 'lib/rakuten/client.rb', line 9 def get group, method, params = {} Response.new(request_for(group, method, params).get).result end |
#post(group, method, params = {}) ⇒ Object
13 14 15 |
# File 'lib/rakuten/client.rb', line 13 def post group, method, params = {} Response.new(request_for(group, method, params).post).result end |