Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Updated README and settings example.

  • Loading branch information...
1 parent 2079d2e commit 06a447384e075a8189df560f58f427643c9b8d25 @dogeared committed
Showing with 42 additions and 4 deletions.
  1. +39 −4
  2. +3 −0  config/environments/test/settings.js.example
@@ -1,4 +1,4 @@
-# Some Node.js Trello API examples
+# Node.js Trello API Action Event Handler
[View Trello’s API documentation online][apidocs]. For information on Trello’s API development, visit [their Trello board][trellotrello], of course.
@@ -18,7 +18,17 @@ npm install trello_tools
## Background
-This project uses the [peanut] function testing tool for node.js
+Nearly anything you do on a Trello board is captured as an action. Actions can be queried via the Trello API.
+The TrelloEvents library is an EventEmitter. Once you tell it to monitor a board, it will:
+* grab the latest batch of actions
+* update an internal ```since``` variable so that the next request results in a fresh batch actions
+* emit an event for each type of action passing in the associated data for the action
+All you have to do is bind listeners to the events you care about.
+This project uses the [peanut] functional testing tool for node.js
The tests that are included are meant to get you familiar with the Trello API using the [node-trello] project.
@@ -27,7 +37,27 @@ The tests that are included are meant to get you familiar with the Trello API us
Take a look at the code in: ```features/step_definitions``` to see what is going on in each scenario from ```features/trello.feature```
-## Setup
+## Typical usage
+var TrelloEventsClass = require('trello_events')
+var trelloEvents = TrelloEventsClass(myKey, myToken)
+trelloEvents.on('createList', function(data) {
+ // act on the data from the createList event
+trelloEvents.on('updateBoard', function(data) {
+ // act on the data from the updateBoard event
+A complete list of all the actions exposed via the Trello API can be found [here][apidocs]
+## Setup for running the tests
You'll need to create a ```config/environments/test/settings.js``` based on the example file found there.
@@ -41,8 +71,13 @@ Make sure that peanut is installed:
npm install -g peanut
-## Running
+## Running the tests
+## ToDo/Issues
+* The timing of the event loop to check on actions should be configurable
+* While TrelloEvents supports monitoring more than one board, emitted events are not board specific
3  config/environments/test/settings.js.example
@@ -1,5 +1,8 @@
module.exports = {
+ // IMPORTANT: This board will have all kinds of WRITE actions
+ // done to it, including archiving all the lists and cards.
+ // Make damn sure it's a test board!

0 comments on commit 06a4473

Please sign in to comment.
Something went wrong with that request. Please try again.