Skip to content

Commit

Permalink
Add error event to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ttezel committed Jul 21, 2014
1 parent 10b581c commit 4c83e2e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,21 @@ stream.on('favorite', function (event) {
})
```

##event: 'error'

Emitted when an API request or response error occurs.
An `Error` object is emitted, with properties:

```js
{
message: '...', // error message
statusCode: '...', // statusCode from Twitter
code: '...', // error code from Twitter
twitterReply: '...', // raw response data from Twitter
allErrors: '...' // array of errors returned from Twitter
}
```

##stream.stop()

Call this function on the stream to stop streaming (closes the connection with Twitter).
Expand Down

0 comments on commit 4c83e2e

Please sign in to comment.