Kelvin SDK Client for Node applications
npm install @kelvininc/node-client-sdkThe kelvin SDK needs to support the following versions:
- NodeJS: 8.0+
Install the Kelvin Node SDK library inside your project
``bash`
npm install @kelvininc/node-client-sdk --save
Import Kelvin inside your project
`js
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.
`js`
KelvinSDK.initialize({
baseUrl: '
authConfig: {
clientId: '
realm: '
url: '
}
});
Follow some examples of services usage.
js
import { AuthService } from '@kelvininc/node-client-sdk';AuthService.login({
username: '',
password: ''
}).subscribe(({ accessToken, refreshToken }) => doSomething());
`$3
`js
import { ACPService } from '@kelvininc/node-client-sdk';ACPService.listACP({
pageSize: 20
}).subscribe(acpList => doSomething(acpList));
``You can find the full Client API reference here.