Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 475 Bytes

README.md

File metadata and controls

34 lines (27 loc) · 475 Bytes

Rainman-js

Javascript bindings to Rainman's reporting mechanism.

Installing

$ npm install rainman-js

Usage

var rainman = require('rainman');

// optionalData is just that, optional
// if no date is passed, it defaults to now()
// precision defaults to 'day'
var optionalData = {
  date: new Date(),
  group_id: 123,
  precision: 'hour'
};

rainman.report(
  rainmanEndpoint,
  client_id,
  key,
  value,
  number,
  callback,
  optionalData
);