Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

add search base url #7

Merged
merged 1 commit into from over 2 years ago

2 participants

Ivan Pau Ramon Revilla
Ivan

in case we are searching
you may find a much better solution, this is just a quick fix

Ivan pinguxx add search rest_base
in case we are searching
c839e4c
Pau Ramon Revilla masylum merged commit e9cabdc into from
Pau Ramon Revilla
Owner

Looks good enough to me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jan 14, 2012
Ivan pinguxx add search rest_base
in case we are searching
c839e4c
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. +5 1 lib/twitter_client.js
6 lib/twitter_client.js
@@ -57,8 +57,12 @@ module.exports = function (key, secret) {
57 57 }
58 58
59 59 if (method.toUpperCase() === 'GET') {
  60 + var base = _rest_base;
  61 + if (path.search("/search") > -1){
  62 + base = "http://search.twitter.com";
  63 + }
60 64 return CLIENT.oauth.get(
61   - _rest_base + path + '?' + querystring.stringify(params)
  65 + base + path + '?' + querystring.stringify(params)
62 66 , token.oauth_token
63 67 , token.oauth_token_secret
64 68 , requestCallback(callback)

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.