Class: Exrt::Rate
- Inherits:
-
Object
- Object
- Exrt::Rate
- Defined in:
- lib/exrt.rb
Class Method Summary collapse
- .history(base: "USD", symbols: [], start_at:, end_at:) ⇒ Object
- .latest(base: "USD", symbols: []) ⇒ Object
- .symbols_str(symbols) ⇒ Object
Class Method Details
.history(base: "USD", symbols: [], start_at:, end_at:) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/exrt.rb', line 11 def self.history(base: "USD", symbols: [], start_at:, end_at:) response = Http.get("/history", { base: base, symbols: symbols_str(symbols), start_at: start_at, end_at: end_at, }) response.body end |
.latest(base: "USD", symbols: []) ⇒ Object
6 7 8 9 |
# File 'lib/exrt.rb', line 6 def self.latest(base: "USD", symbols: []) response = Http.get("/latest", { base: base, symbols: symbols_str(symbols) }) response.body end |
.symbols_str(symbols) ⇒ Object
21 22 23 |
# File 'lib/exrt.rb', line 21 def self.symbols_str(symbols) symbols.join(",") end |