Permalink
Browse files

updated docs

  • Loading branch information...
1 parent 0ce46d2 commit c374121ddaa06858c00b70959cbe66a0aac95b25 @masylum committed Oct 18, 2010
Showing with 5 additions and 7 deletions.
  1. +5 −7 Readme.md
View
@@ -1,15 +1,15 @@
# twitter-js
-Easy peasy twitter client
+Easy peasy twitter client.
npm install twitter-js
## Usage
twitter-js has two methods.
-*getAccesToken*: Uses oAuth module to retrieve the access_token
-*apiCall*: Does a call to twitter API.
+* getAccesToken(_req_, _res_, _callback_): Uses oAuth module to retrieve the access_token
+* apiCall(_http_method_, _path_, _params_, _callback_): Does a call to twitter API.
## Example using express.js
@@ -18,10 +18,8 @@ twitter-js has two methods.
twitterClient = require('twitter-js').twitterClient('consumerKey', 'consumerSecret');
twitterClient.getAccessToken(req, res, function (error, token) {
- twitterClient.apiCall(
- 'POST',
- '/statuses/update.json',
- { token: {oauth_token_secret: token.oauth_token, oauth_token: token.oauth_token_secret}, status: req.param('message') },
+ twitterClient.apiCall('POST', '/statuses/update.json',
+ {token: token, status: req.param('message')},
function (error, result) {
res.render('tweet.jade', {locals: {result: result}});
}

0 comments on commit c374121

Please sign in to comment.