Simple Tinkoff Transaction Downloader is a script, that allows you wery simple gets all of yours transaction from Tinkoff Bank
sh
$ npm i simple-tinkoff-transaction --save
`
$3
`sh
$ git clone https://gitlab.com/mreedread/tinkoff-transaction-downloader.git
$ cd tinkoff-transaction-downloader
$ npm install
`
Work with package
NOTE: All parametres in methods must be string type!
Firstly, you must connect this package:
`JavaScript
const Tinkoff = require('Tinkoff');
const tks = new Tinkoff(inn, accountNumber, refreshToken);
`
Next step, you must get your Access Token:
`JavaScript
const accessToken = await tks.auth();
`
After you've got Access Token you must create startDate and tillDate (package dont help with it, use method you prefer):
NOTE: All variables must be string type and formatted as yyyy-MM-dd!
`JavaScript
const startDate = '2019-01-01';
const tillDate = '2019-02-01';
`
And then, you can download your transaction:
`JavaScript
const transactions = await (getTransaction(startDate, tillDate, accessToken);
``