Skip to content

Commit

Permalink
Release v1.2.1 - Adds proxy example and documentation formatting updates
Browse files Browse the repository at this point in the history
  • Loading branch information
desmondmorris committed Jan 25, 2015
1 parent 8a7431b commit 7662d91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
15 changes: 5 additions & 10 deletions README.md
Expand Up @@ -68,27 +68,19 @@ Example, lets get a [list of favorites](https://dev.twitter.com/rest/reference/g

```javascript
client.get('favorites/list', function(error, tweets, response){

if(error) throw error;

console.log(tweets); // The favorites.

console.log(response); // Raw response object.

});
```

How about an example that passes parameters? Let's [tweet something](https://dev.twitter.com/rest/reference/post/statuses/update):

```javascript
client.post('statuses/update', {status: 'I Love Twitter'}, function(error, tweet, response){

if(error) throw error;

console.log(tweet); // Tweet body.

console.log(response); // Raw response object.

});
```

Expand All @@ -98,18 +90,21 @@ Using the `stream` convenience method, you to open and manipulate data via a str

```javascript
client.stream('statuses/filter', {track: 'javascript'}, function(stream) {

stream.on('data', function(tweet) {
console.log(tweet.text);
});

stream.on('error', function(error) {
throw error;
});

});
```

## Examples

* [Streams](https://github.com/desmondmorris/node-twitter/tree/master/examples#streaming)
* [Proxy](https://github.com/desmondmorris/node-twitter/tree/master/examples#proxy)

## Contributors

Originally authored by [@technoweenie](http://github.com/technoweenie)
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "twitter",
"version": "v1.2.0",
"version": "v1.2.1",
"description": "Twitter API client library for node.js",
"keywords": [
"twitter",
Expand Down

0 comments on commit 7662d91

Please sign in to comment.