@kelvininc/node-client-sdk
TypeScript icon, indicating that this package has built-in type declarations

7.21.0 • Public • Published

Node Getting Started

Requirements

The kelvin SDK needs to support the following versions:

  • NodeJS: 8.0+

Installation

Install the Kelvin Node SDK library inside your project

npm install @kelvininc/node-client-sdk --save

Getting Started

Import Kelvin inside your project

const Kv = require('@kelvininc/node-client-sdk');

// or, if you are using es module
import { KelvinSDK } from '@kelvininc/node-client-sdk';

After that, it's important to initialize the SDK with the correct information to make available our API methods.

KelvinSDK.initialize({
	baseUrl: '<base-url-of-you-company>',
	authConfig: {
		clientId: '<client-id>',
		realm: '<realm>',
		url: '<authentication-url>'
	}
});

Usage

Follow some examples of services usage.

Login Process

import { AuthService } from '@kelvininc/node-client-sdk';

AuthService.login({
	username: '<username or email>',
	password: '<password>'
}).subscribe(({ accessToken, refreshToken }) => doSomething());

Get a list of ACPs

import { ACPService } from '@kelvininc/node-client-sdk';

ACPService.listACP({
	pageSize: 20
}).subscribe(acpList => doSomething(acpList));

Kelvin SDK Client API Documentation

You can find the full Client API reference here.

Package Sidebar

Install

npm i @kelvininc/node-client-sdk

Weekly Downloads

433

Version

7.21.0

License

SEE LICENSE IN LICENSE

Unpacked Size

81.6 kB

Total Files

65

Last publish

Collaborators

  • ricardogoncalves89
  • kv.daniel.carvalho
  • paulo.vieira
  • joshbode_kelvin
  • miguel.pinto
  • engineering_kelvin