class NewEden::Client
Constants
- BASE_URL
Attributes
keyId[RW]
vCode[RW]
Public Class Methods
new(options = {}) { |self| ... }
click to toggle source
# File lib/new_eden/client.rb, line 15 def initialize(options = {}) options.each do |key, value| instance_variable_set("@#{key}", value) end yield(self) if block_given? end
Public Instance Methods
account()
click to toggle source
# File lib/new_eden/client.rb, line 34 def account return NewEden::API::Account.new(self) end
get(uri, options = {})
click to toggle source
# File lib/new_eden/client.rb, line 22 def get(uri, options = {}) url = Addressable::URI.parse(BASE_URL + uri) options.merge!(auth_params) url.query_values = options resp = Net::HTTP.get(URI(url.to_s)) return Hash.from_xml(resp) end
map()
click to toggle source
# File lib/new_eden/client.rb, line 30 def map return NewEden::API::Map.new(self) end
Private Instance Methods
auth_params()
click to toggle source
# File lib/new_eden/client.rb, line 40 def auth_params return {keyId: @keyId, vCode: @vCode} end