Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@koban-crm/api-library

1.4.2 • Public • Published

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

Install

npm i @koban-crm/api-library

DownloadsWeekly Downloads

0

Version

1.4.2

License

GPL-3.0-or-later

Unpacked Size

1.26 MB

Total Files

151

Last publish

Collaborators

  • avatar