Launch Week Day 1: Socket for Jira Is Now Available.Learn More
Socket
Book a DemoSign in
Socket

fio-api-handler

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fio-api-handler

Unofficial handler for Fio Bank API

latest
Source
npmnpm
Version
2.33.47
Version published
Maintainers
1
Created
Source

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

Keywords

fio

FAQs

Package last updated on 14 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts