@koban-crm/api-library

API SDK for Koban CRM


Keywords
koban, koban crm, crm, node, js, javascript, typescript, ts, api, sdk
License
CNRI-Python-GPL-Compatible
Install
npm install @koban-crm/api-library@1.3.4

Documentation

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