Clarity Hub SDK for Node.js
The official Clarity Hub SDK for Node.JS. For Node.JS versions >= 6.12.0.
Installing
yarn add node-clarity-hub
# or
npm install --save node-clarity-hub
This package uses request
and request-promise
as well:
yarn add request request-promise
# or
npm install --save request request-promise
Usage
const ClarityHub = ; // Doing the Oauth handshakeconst response = oauth; // Making a requestconst client = accessToken // Optional: asUser: '6654ae4b-60be-489e-a315-b74a4494b21d'; clientchatMessages;
Currently Supported Endpoints
client
├── chatMessages
| ├── create({ chatUuid, text })
| └── compose({ chatUuid, text })
├── integrationSettings
| └── update({ integrationUuid, settings })
├── oauth
| └── activate({ code, clientId, clientSecret })
├── suggestions
| ├── create({ messageUuid, chatUuid, suggestions })
| └── delete({ suggestionUuid })
├── usersMe
└── read()
License
This SDK is distributed under the MIT License.