1.4.2 • Published 5 years ago

@koban-crm/api-library v1.4.2

Weekly downloads
15
License
GPL-3.0-or-later
Repository
github
Last release
5 years ago

Koban | Node API Library

API SDK for Koban CRM

NPM version Generic badge

Build Status Build Status

codecov

semantic-release

Installation

with yarn

yarn add @koban-crm/api-library

with npm

npm install @koban-crm/api-library

Initialize

with import

import { KobanSDK } from '@koban-crm/api-library';

const optionsSDK = {
  kobanInstance: 'http://instance.koban/',
  token: 'TokenXXX',
  user: 'UserKeyXXX',
};

const skdKoban = new KobanSDK(optionsSDK);

with require

const kobanApi = require('@koban-crm/api-library');
/**
 * Can also be used wwith named export like
 * const { KobanSDK } = require('@koban-crm/api-library');
 */

const optionsSDK = {
  kobanInstance: 'http://instance.koban/',
  token: 'TokenXXX',
  user: 'UserKeyXXX',
};

const skdKoban = new kobanApi.KobanSDK(optionsSDK);

Usage

with async/await

// Get Koban Invoice
let invoice = await skdKoban.invoiceService.getOne('InvoiceIdXXX');

with callback

// Get Koban Invoice
let invoice = skdKoban.invoiceService.getOne('InvoiceIdXXX')
.then(function(data) {
  return data;
}).catch(function(err) {
  console.log(err);
});

Full Documentation here

1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.4

5 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago