From c29520fdb3ac409aa4ca9d3123bbc34580f80285 Mon Sep 17 00:00:00 2001 From: ryanmcgrath Date: Mon, 25 Oct 2010 19:39:53 -0700 Subject: [PATCH] Search query docs updated Updated Search API (textile) --- Search-API.textile | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Search-API.textile b/Search-API.textile index 6832928..8fe9dd2 100644 --- a/Search-API.textile +++ b/Search-API.textile @@ -3,6 +3,7 @@ h2. searchTwitter() Returns data about your specified search query. This can be filtered through other optional parameters below. Parameters: + * q: Required. Your search terms. * callback: Optional. Only available for JSON format. If supplied, the response will use the JSONP format with a callback of the given name. * lang: Optional: Restricts tweets to the given language, given by an ISO 639-1 code. * rpp: Optional. The number of tweets to return per page, up to a max of 100. @@ -17,11 +18,11 @@ If you take a moment to read through Twitter's "Search API Docs":http://apiwiki.
 
-import twython
+from twython import Twython
 
-""" Instantiate Tango with no Authentication """
-twitter = twython.core.setup()
-search_results = twitter.searchTwitter("WebsDotCom", rpp="50")
+""" Instantiate Twython with no Authentication """
+twitter = Twython()
+search_results = twitter.searchTwitter(q="WebsDotCom", rpp="50")
 
 for tweet in search_results["results"]:
 	print tweet["text"]
@@ -38,10 +39,10 @@ Parameters:
 
 
 
-import twython
+from twython import Twython
 
 """ Instantiate Twython with no Authentication """
-twitter = twython.core.setup()
+twitter = Twython()
 trends = twitter.getCurrentTrends()
 
 print trends
@@ -59,10 +60,10 @@ Parameters:
 
 
 
-import twython
+from twython import Twython
 
 """ Instantiate Twython with no Authentication """
-twitter = twython.core.setup()
+twitter = Twython()
 trends = twitter.getDailyTrends()
 
 print trends
@@ -80,10 +81,10 @@ Parameters:
 
 
 
-import twython
+from twython import Twython
 
 """ Instantiate Twython with no Authentication """
-twitter = twython.core.setup()
+twitter = Twython()
 trends = twitter.getWeeklyTrends()
 
 print trends