1.6.1 • Published 9 years ago

node-reporter v1.6.1

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

node-reporter

node-reporter is a node.js module to retrieve and manipulate report files from the Reporter Application.

Installation

$ npm install node-reporter

Examples

var Reporter = require('node-reporter');

var reporter = new Reporter({ directory: '/reports' });
var reports = reporter.list({ connection: 'cellular' });
var questions = reporter.questions();

console.log(reports);

// OR with a callback:

reporter.list({ connection: 'wifi' }, function(err, reports) {
  console.log(reports.length);
})

Methods

Reporter

The constructor optionally can take an object containing the directory of the reports. By default, it will use ~/Dropbox/Apps/Reporter-App/.

Reporter#questions

List the questions asked in a report with their default value.

Reporter#list(options)

List all the entries filtered by options. options is an object allowing you to filer reports by type, connection and/or date Can either return the reports or pass them to a callback.

The type field can take the following values:

  • 'button'
  • 'buttonAsleep'
  • 'notification'
  • 'sleep'
  • 'wake'

The connection field can take the following values:

  • 'cellular'
  • 'wifi'
  • 'none'

The date field is a Date object.

The between field is an object used like this:

var startDate = new Date('2014-02-01')
var endDate = new Date('2014-03-01')

reporter.list({ between: { start: startDate, end: endDate } })

Contributing

Pull requests are welcome! Fork the repo on GitHub

License

MIT.

1.6.1

9 years ago

1.6.0

9 years ago

1.5.0

10 years ago

1.4.1

10 years ago

1.4.0

10 years ago

1.3.1

10 years ago

1.3.0

10 years ago

1.2.1

10 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago