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 +4 -4
- data/README.md +48 -0
- data/lib/currency_conversion/version.rb +1 -1
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 63b4ddf0b8c3345d7f41657d9d9074edddc2dab2
         | 
| 4 | 
            +
              data.tar.gz: 155a0eadceb7a62670df765f0dd74d96fd1820b8
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 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
         |