kloudspot-analytics-node-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.0.10 • Public • Published

README

What is this repository for?

This repository is for an SDK to Kloudspot Analytics

Created Jan 31st 2020 - Version 1.0.0

How do I get set up?

  • Checkout the repository
  • Navigate to the kloudspot-analytics-node-sdk directory
  • Run npm install to install dependencies
  • Your SDK is now ready to be used
  • Navigate to test directory
  • Run node client.js

The SDK should connect to Kloudspot Analytics Platform and retrieve client analytics data.

What are the pre-requisites to use this SDK?

  • You need to have a valid account on Kloudspot Analytics Platform
  • You need to get ID and SecretKey from your Account. Please click on the "Gear" icon on the top menubar and select "API Keys"
  • If there is not one present, click on "New API Key" to generate one.

How do I use this SDK?

Using the SDK is pretty straight forward. Here is a sample code to import the SDK and connect to Kloudspot Analytics Platform


//1) Import Kloudspot Analytics library (from wherever it is located)
var KloudspotInsights = require('kloudspot-analytics-node-sdk');

//2) Create a Kloudspot Analytics client by providing the host URL, ID and SecretKey (can get one from your Account Settings page, see pre-requisites section above)
var ksClient = new KloudspotInsights({
	'host': '<your kloudspot instance baseurl>',
	'id': '<your kloudspot clientID>',
	'secretKey': '<your kloudspot clientSecret>'
});

//3) Get the list of sites
ksClient.siteHierarchy.sites().then(function(response) {
 	//Response should contain all the sites in the system
 	if(response && Array.isArray(response)) {
 		console.log('Number of sites in the system: '+response.length);
 	} else {
 		console.log(response);
 	}
 });

Who do I talk to?

For any further questions on using the SDK, please contact -

Readme

Keywords

Package Sidebar

Install

npm i kloudspot-analytics-node-sdk

Weekly Downloads

50

Version

1.0.10

License

Apache-2.0

Unpacked Size

4.26 MB

Total Files

101

Last publish

Collaborators

  • udaykloudspot