HutkiGrosh API to ERIP in nodejs.
Library to useInstall
$ npm install --save node-erip-hgrosh
Usage
var HGrosh = ; var credential = user:"username@org.com" pwd:"pSSw_ord7" production: true; var 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 API | Function |
---|---|
Security/logIn | HGrosh.logIn(credential) |
Security/logOut | HGrosh.logOut() |
Invoicing/Bill | HGrosh.addBill(bill) |
Invoicing/Bill(billId) | HGrosh.infoBill(billId) |
Invoicing/Bills | HGrosh.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 = credential;hgrosh ;
var hgrosh = credential;hgrosh;
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