Implement the exchange-rate endpoint: find the exchange rate for: from -> to (both currency codes) and cache it.
- Call the following API: https://api.exchangeratesapi.io/latest?base=<to>&symbols=<from>
- Pull out the exchange rate
- Cache the value
- Invalidate the cache every day at 1600 CET
- If the service is unavailable or errors occur during retrieval, use the last known value.
- If there is no last known value, use 1.0
Example Request/Response to Public API:
Example Response to Client:
- The latest daily exchange rate is obtained and cached as described above
- Unit tests have been updated
- API tests have been updated