Class: Daru::APIClient
- Inherits:
-
Object
- Object
- Daru::APIClient
- Includes:
- HTTParty
- Defined in:
- lib/daru/apiclient.rb,
lib/daru/apiclient/version.rb
Constant Summary collapse
- VERSION =
"0.0.1"
Instance Method Summary collapse
- #get(*args) ⇒ Object
-
#initialize(uri) ⇒ APIClient
constructor
A new instance of APIClient.
- #post(*args) ⇒ Object
Constructor Details
#initialize(uri) ⇒ APIClient
Returns a new instance of APIClient.
9 10 11 |
# File 'lib/daru/apiclient.rb', line 9 def initialize(uri) self.class.base_uri uri end |
Instance Method Details
#get(*args) ⇒ Object
13 14 15 16 |
# File 'lib/daru/apiclient.rb', line 13 def get(*args) response = self.class.get(*args) Daru::DataFrame.new(response.to_a) end |
#post(*args) ⇒ Object
18 19 20 21 |
# File 'lib/daru/apiclient.rb', line 18 def post(*args) response = self.class.post(*args) Daru::DataFrame.new(response.to_a) end |