@contactwise/ims-client-sdk
v1.0.12
Published
IMS Client SDK
Downloads
15
Keywords
Readme
Table of contents
Version: 1.0.12
- Installing
- Example
- Resources
- License
ims-client-sdk
allows you to interact with backend service to create and manage ideas
Installing
NPM:
$ npm install @contactwise/ims-client-sdk`
Usage
The following is the simple example for creating client and fetching ideas from the server
import {IMSClient, TokenCredential} from "../src";
let credential: TokenCredential = {
token: "<access Token>",
expiresIn: 30000 // expiration time in UNIX epoch time
}
// set
let baseUrl: string = "https://api.contactwise.io/ideas/v1";
let client = new IMSClient(credential, baseUrl);
// Fetch ideas from the server
client.Ideas.listAsync()
.then(data => console.log(data))
.catch(error => console.error(error))