fio-api-handler
v2.33.47
Published
Unofficial handler for Fio Bank API
Downloads
100
Readme
Fio API handler
Unofficial API handler for Fio Bank API. Right now only read endpoint are implemented. Post request have to be done by custom requests.
Library is using fetch, don't forget to include polyfil.
There are two API classes basic and enhaced.
Basic API class
Basic class works with API as it is. It does not process responses in any way and you can request whatever format you want.
require('cross-fetch/polyfill');
const { DateTime } = require('luxon');
const { FioApi } = require('./../dist');
const api = new FioApi(YOUR_API_KEY, 'xml');
(async () => {
const { data } = await api.getTransactions(DateTime.fromISO('2018-01-01'), DateTime.fromISO('2018-01-31'));
console.log(data);
})();
Enhaced API class
Enhaced API class parse responses from fio and get information like original currency, original amount or card pay date.
require('cross-fetch/polyfill');
const { DateTime } = require('luxon');
const { FioApi } = require('./../dist');
const api = new EnhacedFioApi(YOUR_API_KEY);
(async () => {
const { info, transactions } = await api.getTransactionOverview(2018, 1);
transactions.map((transaction) => {
console.log(transaction.getTransactionId());
});
})();