Class: NewEden::API::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/new_eden/api/base.rb

Direct Known Subclasses

Account, Map

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#clientObject

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