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 = ; var reporter = directory: '/reports' ;var reports = reporter;var questions = reporter; console; // OR with a callback: reporter
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 = '2014-02-01'var endDate = '2014-03-01' reporter
Contributing
Pull requests are welcome! Fork the repo on GitHub
License
MIT.