fio-api-handler
    TypeScript icon, indicating that this package has built-in type declarations

    2.33.47 • Public • Published

    Fio API handler

    npm version renovate-app Known Vulnerabilities codecov travis

    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());
        });
    })();

    Install

    npm i fio-api-handler

    DownloadsWeekly Downloads

    162

    Version

    2.33.47

    License

    Apache-2.0

    Unpacked Size

    125 kB

    Total Files

    34

    Last publish

    Collaborators

    • fabulator