1.0.4 • Published 2 years ago

monobankua v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Getting started

instal package from npm npm install monobankua

Quick example

const { Monobank } = require('monobankua');

const client = new Monobank(process.env.token);

(async () => {
  // Currency list
  const currency_list = await client.currency();
  
  // Client info
  const info = await client.client_info();
  
  // Webhook
  await client.set_webhook('https://example.com/');
  
  // Statement
  const statement = await client.statement((await client.client_info()).accounts[0].id);
})();

Available methods

client.currency(force?: boolean | undefined) - Bank currency info

  • force - Force update (without cache)

client.client_info(force?: boolean) - Client's user info

  • force - Force update (without cache)

client.set_webhook(url: string)

  • url - Webhook url

client.statement(account: string, from?: string | number , to?: string | number, force?: boolean)

  • account - Client account id
  • from - Unix time in seconds (default is current time - 30days)
  • to - Unix time in seconds
  • force - Force update (without cache)
1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.0

2 years ago