currencyconversion 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 23f88ea545e7e270059fc20236b07b749f9d9a1c
4
- data.tar.gz: 1b764bda6dcbbf85bc673536dac419df2145eecf
3
+ metadata.gz: 63b4ddf0b8c3345d7f41657d9d9074edddc2dab2
4
+ data.tar.gz: 155a0eadceb7a62670df765f0dd74d96fd1820b8
5
5
  SHA512:
6
- metadata.gz: 13bed63f674dde2fbd4a1c55f2dd096dc03f88d31768be7e6f65a1ecf11f5dcf27010538dba3087d9d0201f7a2c93023d4de225fbc292deeffc3765680c71e1f
7
- data.tar.gz: 591cebb8a6bc80647c35d847726b110f23baa8d4d04db99a0686a552e14ec185c4d32f469ebcd10fe9c92383832a1e1feac1c83093f4af5df397074b374c5c9e
6
+ metadata.gz: d645f1a621fd8c2e56bbacf566d03f22ba0828889b294dc8f8edc66cf0d34722a11314c18fda10a12afa2c4bba4b1b35d8fcafd2dc1f475dac8e033f3fd7f1c2
7
+ data.tar.gz: d0db9ec28f496270e79543b9405c4b9594e4d1e6771f4e586a97f9340a4b3fab476bd0912e5d72f27c44d672b4b7b66082aa4baffb2e507a879c43dd134344db
data/README.md CHANGED
@@ -131,6 +131,54 @@ response = @client.list(options)
131
131
 
132
132
  ```
133
133
 
134
+ ## Timeframe
135
+ request historical exchange rates for a time-period of your choice. (maximum range: 365 days).
136
+ _Note: This library enforces to use the ```currencies``` argument since it's highly recommended practice._
137
+
138
+ ###### Simple Request
139
+
140
+ ```
141
+ # We declare the arguments
142
+ start_date = '2010-03-01'
143
+ end_date = '2010-04-01'
144
+ currencies = 'USD,GBP,EUR'
145
+
146
+ # We declare the options
147
+ options = CurrencyLayer::TimeframeOptions.new()
148
+
149
+ # We make the call to fetch the list of currencies
150
+ response = @client.timeframe(start_date, end_date, currencies options)
151
+
152
+ ```
153
+
154
+ ###### Response
155
+
156
+ ```
157
+ {
158
+ "success": true,
159
+ "terms": "https://currencylayer.com/terms",
160
+ "privacy": "https://currencylayer.com/privacy",
161
+ "timeframe": true,
162
+ "start_date": "2010-03-01",
163
+ "end_date": "2010-04-01",
164
+ "source": "USD",
165
+ "quotes": {
166
+ "2010-03-01": {
167
+ "USDUSD": 1,
168
+ "USDGBP": 0.668525,
169
+ "USDEUR": 0.738541
170
+ },
171
+ "2010-03-02": {
172
+ "USDUSD": 1,
173
+ "USDGBP": 0.668827,
174
+ "USDEUR": 0.736145
175
+ },
176
+ [...]
177
+ }
178
+ }
179
+
180
+ ```
181
+
134
182
  ---
135
183
 
136
184
  ## Example Application
@@ -1,3 +1,3 @@
1
1
  module CurrencyLayer
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: currencyconversion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Andreas Moelgaard