1.1.5 • Published 6 years ago
getbankapi-bnm-utils v1.1.5
Getting started.
Install via npm to use with node:
npm i getbankapi-bnm
Or via cdn to use in browsers:
<!--index.html-->
<script src="https://cdn.jsdelivr.net/npm/getbankapi-bnm@latest/build/index.js"></script>
Get exchange rates
const bnmApi = require('getbankapi-bnm')
// Get exchange rates for today
const todayExchangeRates = await bnmApi.getExchangeRates()
// Get exchange rates for a custom date
const yesterdayDate = new Date().getDate() - 1 // OR with moment.js "moment().subtract(1, 'days').toDate()"
const yesterdayExchangeRates = await bnmApi.getExchangeRates(yesterdayDate)
console.log(todayExchangeRates, yesterdayExchangeRates)
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Author
getbankapi-bnm © GHERCIU, Released under the MIT License. Authored and maintained by GHERCIU with help from contributors (list).