Class: NewEden::API::Base
- Inherits:
-
Object
- Object
- NewEden::API::Base
- Defined in:
- lib/new_eden/api/base.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
- #api_call(uri, _opt = {}, ext = '.xml.aspx') ⇒ Object
-
#initialize(client) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(client) ⇒ Base
Returns a new instance of Base.
7 8 9 |
# File 'lib/new_eden/api/base.rb', line 7 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
6 7 8 |
# File 'lib/new_eden/api/base.rb', line 6 def client @client end |
Instance Method Details
#api_call(uri, _opt = {}, ext = '.xml.aspx') ⇒ Object
11 12 13 14 |
# File 'lib/new_eden/api/base.rb', line 11 def api_call(uri, _opt = {}, ext = '.xml.aspx') resp = @client.get(uri + ext) return Hashie::Mash.new(resp.to_h).eveapi end |