Permalink
Browse files

ordering of fav params was losing entities

  • Loading branch information...
1 parent 6b2a9c5 commit 8ca177cc4338d9fb684403da2b0a18ac1bb19422 @remy committed Feb 19, 2012
Showing with 26 additions and 8 deletions.
  1. +1 −1 package.json
  2. +20 −2 test/node.js
  3. +3 −3 twitterlib.js
  4. +2 −2 twitterlib.min.js
View
@@ -1,7 +1,7 @@
{
"name": "twitterlib",
"main": "twitterlib.js",
- "version": "1.0.7",
+ "version": "1.0.8",
"description": "Library for doing all things Twitter API related, with added sauce for filtering, paging and paging",
"homepage": "https://github.com/remy/twitterlib/",
"keywords": [
View
@@ -1,5 +1,23 @@
var twitterlib = require('twitterlib');
-twitterlib.status('rem', function (tweets) {
- console.log(tweets[0].text);
+twitterlib.favs('rem', function (tweets) {
+ // console.log(tweets[0]);
+});
+
+
+twitterlib.list('rem', function (tweets) {
+ // console.log(tweets[0]);
+});
+
+twitterlib.timeline('rem', function (tweets) {
+ // console.log(tweets[0]);
+});
+
+
+twitterlib.search('rem', function (tweets) {
+ // console.log(tweets[0]);
+});
+
+twitterlib.retweets('rem', function (tweets) {
+ // console.log(tweets[0]);
});
View
@@ -1,5 +1,5 @@
// twitterlib.js (c) 2011 Remy Sharp
-// @version 1.0.7 / Wed Jan 25 12:58:19 2012 +0000
+// @version 1.0.8 / Sun Feb 19 22:37:22 2012 +0000
// MIT license: http://rem.mit-license.org
(function (global) {
var twitterlib = {};
@@ -71,7 +71,7 @@
search: protocol + '//search.twitter.com/search.json?q=%search%&page=%page|1%&rpp=%limit|100%&since_id=%since|remove%&result_type=recent&include_entities=true', // TODO allow user to change result_type
timeline: protocol + '//api.twitter.com/1/statuses/user_timeline.json?screen_name=%user%&count=%limit|200%&page=%page|1%&since_id=%since|remove%include_rts=%rts|false%&include_entities=true',
list: protocol + '//api.twitter.com/1/%user%/lists/%list%/statuses.json?page=%page|1%&per_page=%limit|200%&since_id=%since|remove%&include_entities=true&include_rts=%rts|false%',
- favs: protocol + '//api.twitter.com/1/favorites/%user%.json?page=%page|1%&include_entities=true&skip_status=true&since_id=%since|remove%',
+ favs: protocol + '//api.twitter.com/1/favorites/%user%.json?include_entities=true&skip_status=true&page=%page|1%&since_id=%since|remove%',
retweets: protocol + '//api.twitter.com/1/statuses/retweeted_by_user.json?screen_name=%user%&include_entities=true&count=%limit|200%&since_id=%since|remove%&page=%page|1%'
},
urls = URLS, // allows for resetting debugging
@@ -502,7 +502,7 @@
return '';
}
var val = key == 'limit' ? options[key] + 10 : options[key];
- return q + (options[key] === undefined ? def.substr(1) : val);
+ return q + (options[key] === undefined && def !== undefined ? def.substr(1) : val);
});
}
Oops, something went wrong.

0 comments on commit 8ca177c

Please sign in to comment.