A simple api to get week exchange rate.
Clone the repo:
git clone git@github.com:DavidVeloso/innvent-exchange-rate-api.git
cd innvent-exchange-rate-api
Install dependencies:
# set API_LAYER_KEY and API_LAYER_HOST on env var
npm install
Start server:
npm start
Execute tests:
# compile with babel and run tests
npm test (or gulp mocha)
To get current week exchange rate just pass the currency on query.
Example:
/innventapi/exchangerate?to=BRL&from=USD
Return:
res: {
to: 'BRL',
from: 'USD',
amount: 1,
data:
[ { date: '18/11/2016', value: 3.392204 },
{ date: '19/11/2016', value: 3.382504 },
{ date: '20/11/2016', value: 3.392204 },
{ date: '21/11/2016', value: 3.388398 },
{ date: '22/11/2016', value: 3.350496 },
{ date: '23/11/2016', value: 3.4321 },
{ date: '24/11/2016', value: 3.3909 } ]
}
Currency Avaliable (USD, EUR ,ARS, BRL);
Universal logging library winston is used for logging. It has support for multiple transports.
David Veloso – davidedsoon@gmail.com This project was based on Kunal boilerplate