|
|
|
@ -58,6 +58,16 @@ event_api.prototype.stream = function(start, end, filter, callback){ |
|
|
|
}; |
|
|
|
|
|
|
|
event_api.prototype.polling_stream = function(interval, filter, callback){ |
|
|
|
/* |
|
|
|
* event_api.polling_stream(interval, [[filter], callback] ) |
|
|
|
* |
|
|
|
* function used to continuously call `stream` for new events |
|
|
|
* |
|
|
|
* `interval` seconds between each call |
|
|
|
* `filter` is an object to limit the results by |
|
|
|
* `callback` is an optional function called with the results of the api call |
|
|
|
* callback(error, result, status_code) |
|
|
|
*/ |
|
|
|
if(arguments.length < 3 && v8type.is(arguments[1], v8type.FUNCTION)){ |
|
|
|
callback = arguments[1]; |
|
|
|
filter = {}; |
|
|
|
|