0.0.6 • Published 4 years ago

wfirma-api-wrapper v0.0.6

Weekly downloads
4
License
ISC
Repository
github
Last release
4 years ago

API wFirma wrapper

Wrapper for wFirma API.

Installation

Use the package manager npm to install.

npm install wfirma-api-wrapper

Full wFirma documentation here.

Methods

  • .find(action, page, limit)
  • .get(action, id)

Usage

const wfirma = require('wfirma-api-wrapper');

let username = 'example@mail.com',
    password = 'YOUR-PASSWORD',
    companyId = '1111111',
    inputFormat = 'xml',
    outputFormat = 'json'

const wfirmaApi = new wfirma(username, password, companyId, inputFormat, outputFormat);

wfirmaApi.fields = ['Invoice.Id', 'Invoice.type', 'Invoice.fullnumber', 'Invoice.date'];

wfirmaApi.find('invoices', '1', '10')
    .then(response => {
        console.log(response);
    })
    .catch(error => {
        console.log(error);
    });

wfirmaApi.get('invoices', '111111')
    .then(response => {
        console.log(response);
    })
    .catch(error => {
        console.log(error);
    });
0.0.5

4 years ago

0.0.4

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago