Socket
Socket
Sign inDemoInstall

node-erip-hgrosh

Package Overview
Dependencies
68
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-erip-hgrosh

Library to use HutkiGrosh API to ERIP in nodejs.


Version published
Maintainers
1
Install size
4.58 MB
Created

Readme

Source

Library to use HutkiGrosh API to ERIP in nodejs.

Install

$ npm install --save node-erip-hgrosh

Usage

var HGrosh = require('node-erip-hgrosh');

var credential = {
  user:"username@org.com",
  pwd:"pSSw_ord7",
  production: true
};

var hgrosh = new HGrosh(credential);

Setting production to false will direct your requests to trial.hgrosh.by instead of www.hutkigrosh.by.

If your system requires that requests be made through an HTTP or HTTPS proxy, you can either set an environment variables https_proxy and http_proxy, or pass in the optional third option:

var hgrosh = new HGrosh(credential, {proxy: http_proxy});

Available API

HGrosh APIFunction
Security/logInHGrosh.logIn(credential)
Security/logOutHGrosh.logOut()
Invoicing/BillHGrosh.addBill(bill)
Invoicing/Bill(billId)HGrosh.infoBill(billId)
Invoicing/BillsHGrosh.loadBills(start, end, sortby)

Chaining requests

You could use promises or callback functions to chain your requests to HutkiGrosh. Unfortunately there are problems with concurrent requests on their side.

var hgrosh = new HGrosh(credential);
hgrosh.addBill(bill)
  .then(function(result) 
    { 
      hgrosh.loadBills(0,30,1).
        then(function(result) 
          { 
            var json = JSON.parse(result.body);
            console.log(json);
          }); 
    });
var hgrosh = new HGrosh(credential);
hgrosh.addBill(bill, 
  function(err, result) 
  { 
    hgrosh.loadBills(0,30,1,
      function(err, result) 
      { 
        var json = JSON.parse(result);
        console.log(json);
      }); 
  });

HGrosh._send

HGrosh.logIn

HGrosh.logOut

HGrosh.addBill

HGrosh.loadBills

See also

$ npm install --global node-erip-hgrosh
$ node-erip-hgrosh --help
# creates a browser.js
$ npm run browser

License

MIT © Egor Kuryanovich

Keywords

FAQs

Last updated on 22 Aug 2016

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc