Skip to content

Commit

Permalink
add search rest_base
Browse files Browse the repository at this point in the history
in case we are searching
  • Loading branch information
pinguxx committed Jan 14, 2012
1 parent 3171aea commit c839e4c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/twitter_client.js
Expand Up @@ -57,8 +57,12 @@ module.exports = function (key, secret) {
}

if (method.toUpperCase() === 'GET') {
var base = _rest_base;
if (path.search("/search") > -1){
base = "http://search.twitter.com";
}
return CLIENT.oauth.get(
_rest_base + path + '?' + querystring.stringify(params)
base + path + '?' + querystring.stringify(params)
, token.oauth_token
, token.oauth_token_secret
, requestCallback(callback)
Expand Down

0 comments on commit c839e4c

Please sign in to comment.