class OpenexchangeratesData::Client
Public Class Methods
new(app_id = nil)
click to toggle source
# File lib/openexchangerates_data/client.rb, line 9 def initialize(app_id = nil) app_id ||= ENV['EXCH_API_ID'] self.class.default_options.merge!(query: { app_id: app_id }) end
Public Instance Methods
currencies()
click to toggle source
# File lib/openexchangerates_data/client.rb, line 18 def currencies self.class.get('/currencies.json') end
historical(date, options = {})
click to toggle source
# File lib/openexchangerates_data/client.rb, line 22 def historical(date, options = {}) self.class.get("/historical/#{date}.json", options) end
latest(options = {})
click to toggle source
# File lib/openexchangerates_data/client.rb, line 14 def latest(options = {}) self.class.get('/latest.json', options) end