To read a user’s private information, get a token by directing them to https://trello.com/1/connect?key=<PUBLIC_KEY>&name=MyApp&response_type=token&scope=read,write replacing, of course, <PUBLIC_KEY> with the public key obtained in the first step.

If you need write access as well as read, &scope=read,write to the request for your user token.

This starts an event loop which retrieves Trello actions via the Trello API. Any actions that are retrieved will be emitted as events keyed on the type of action.

The second parameter is optional. If provided, either or both ```since``` and ```interval``` can be provided.

```since``` is a fully qualified date string in the form:

'2013-01-02T19:53:24.930Z'. Trello actions will be retrieved from the time after ```since```, if provided. If not provided, all Trello actions will be retrieved (see Issues below).

```interval``` is the number of milliseconds between the event loop runs. NOTE: If the event loop (which make Trello API calls) runs longer than the interval you specify, the event loop will simply run again immediately. The default value for interval is: 1000

### unmonitor

trelloEvents.unmonitor()

Turns off Trello action monitoring for that specified board.

### monitoring

trelloEvents.monitoring()

returns: true || false

## Setup for running the tests

You'll need to create a ```config/environments/test/settings.js``` based on the example file found there.

You'll need to provide a ```key```, ```token``` and ```board``` name.

***SUPER IMPORTANT NOTE***: When you run the tests, all existing lanes and cards on the named board will be archived. Do not, under any circumstances, reference a board that is currently in use. You should create a totally new board to reference for this code.

Make sure that peanut is installed:

npm install -g peanut

## Running the tests

make

## ToDo/Issues

* There is no support for paging and limits right now. If you are looking at a board with tons of actions, some might be missed.

* While TrelloEvents supports monitoring more than one board, emitted events are not board specifici.