High level wrapper around kmjs-core to easily build custom interfaces.
const Keymetrics = require('keymetrics.js');
// No need to declare client_id (wrapped inside the lib)
var keymetrics = new Keymetrics();
var bucket = null;
keymetrics.bucket.retrieveAll()
.then((buckets) => {
bucket = keymetrics.subscribe({
public_id : buckets[0].public_id,
aggregation : 'method1'
});
// Bucket now contains all bucket API methods + auto aggregation
})