Search query docs updated
Updated Search API (textile)
parent
a2704274c3
commit
c29520fdb3
1 changed files with 11 additions and 10 deletions
|
|
@ -3,6 +3,7 @@ h2. searchTwitter()
|
||||||
Returns data about your specified search query. This can be filtered through other optional parameters below.
|
Returns data about your specified search query. This can be filtered through other optional parameters below.
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
|
* <b>q:</b> Required. Your search terms.
|
||||||
* <b>callback:</b> Optional. Only available for JSON format. If supplied, the response will use the JSONP format with a callback of the given name.
|
* <b>callback:</b> Optional. Only available for JSON format. If supplied, the response will use the JSONP format with a callback of the given name.
|
||||||
* <b>lang:</b> Optional: Restricts tweets to the given language, given by an ISO 639-1 code.
|
* <b>lang:</b> Optional: Restricts tweets to the given language, given by an ISO 639-1 code.
|
||||||
* <b>rpp:</b> Optional. The number of tweets to return per page, up to a max of 100.
|
* <b>rpp:</b> 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.
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<code>
|
<code>
|
||||||
import twython
|
from twython import Twython
|
||||||
|
|
||||||
""" Instantiate Tango with no Authentication """
|
""" Instantiate Twython with no Authentication """
|
||||||
twitter = twython.core.setup()
|
twitter = Twython()
|
||||||
search_results = twitter.searchTwitter("WebsDotCom", rpp="50")
|
search_results = twitter.searchTwitter(q="WebsDotCom", rpp="50")
|
||||||
|
|
||||||
for tweet in search_results["results"]:
|
for tweet in search_results["results"]:
|
||||||
print tweet["text"]
|
print tweet["text"]
|
||||||
|
|
@ -38,10 +39,10 @@ Parameters:
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<code>
|
<code>
|
||||||
import twython
|
from twython import Twython
|
||||||
|
|
||||||
""" Instantiate Twython with no Authentication """
|
""" Instantiate Twython with no Authentication """
|
||||||
twitter = twython.core.setup()
|
twitter = Twython()
|
||||||
trends = twitter.getCurrentTrends()
|
trends = twitter.getCurrentTrends()
|
||||||
|
|
||||||
print trends
|
print trends
|
||||||
|
|
@ -59,10 +60,10 @@ Parameters:
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<code>
|
<code>
|
||||||
import twython
|
from twython import Twython
|
||||||
|
|
||||||
""" Instantiate Twython with no Authentication """
|
""" Instantiate Twython with no Authentication """
|
||||||
twitter = twython.core.setup()
|
twitter = Twython()
|
||||||
trends = twitter.getDailyTrends()
|
trends = twitter.getDailyTrends()
|
||||||
|
|
||||||
print trends
|
print trends
|
||||||
|
|
@ -80,10 +81,10 @@ Parameters:
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<code>
|
<code>
|
||||||
import twython
|
from twython import Twython
|
||||||
|
|
||||||
""" Instantiate Twython with no Authentication """
|
""" Instantiate Twython with no Authentication """
|
||||||
twitter = twython.core.setup()
|
twitter = Twython()
|
||||||
trends = twitter.getWeeklyTrends()
|
trends = twitter.getWeeklyTrends()
|
||||||
|
|
||||||
print trends
|
print trends
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue