1.0.3 • Published 7 years ago

mode-embed-url v1.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

mode-embed-url Build Status

Create Mode Analytics white label embed URLs

Install

$ npm install --save mode-embed-url

Usage

var mode = require('mode-embed-url')

mode({
  organization: 'ben',
  report: 'packages',
  key: 'letmein',
  secret: 'shh',
  maxAge: 3600,
  timestamp: 1,
  params: {
    foo: 'bar'
  }
})
//=> https://modeanalytics.com/...

API

mode(options) -> string

options
organization

Required
Type: string

The organization name.

report

Required
Type: string

The report name.

key

Required
Type: string

The access key.

secret

Required
Type: string

The access secret.

maxAge

Required
Type: number

The maximum allowed query age before a report will be re-run (in seconds).

params

Required
Type: object

One or more parameters.

timestamp

Type: number
Default: Date.now()

The current timestamp (in seconds).

License

MIT © Ben Drucker