Chicago Python Workshop/Projects/Twitter: Difference between revisions

Content added Content deleted
imported>Codersquid
(Created page with "right|300px == Project == Use the Twitter API to write the basic parts of a Twitter client. See what your friends are tweeting, get trending topics, se...")
 
imported>Codersquid
(→‎1. Read through and understand search: made it more clear that the python call is run from the command line and not the python prompt. also tried to make it clear that you use the text editor to read through the flle)
Line 17: Line 17:
=== 1. Read through and understand <code>search</code> ===
=== 1. Read through and understand <code>search</code> ===


# Run <code>python twitter_api.py --search</code> with various search terms, e.g.
# Use the command line to run <code>python twitter_api.py --search</code> with various search terms, e.g.
#* <code>python twitter_api.py --search=Python</code>
#* <code>python twitter_api.py --search=Python</code>
#* <code>python twitter_api.py --search="Red Sox"</code>
#* <code>python twitter_api.py --search="Red Sox"</code>
# Read through the <code>search</code> function in <code>twitter_functions.py</code>.
# Use the text editor to read through the <code>search</code> function in <code>twitter_functions.py</code>.
# Trace through the logic in <code>twitter_api.py</code> that turns the <code>--search</code> command line option into a call to <code>search</code>.
# Trace through the logic in <code>twitter_api.py</code> that turns the <code>--search</code> command line option into a call to <code>search</code>.
# Find <code>GetSearch</code> in the Twitter library code at http://code.google.com/p/python-twitter/source/browse/twitter.py. What other options could we have passed to <code>GetSearch</code>?
# Find <code>GetSearch</code> in the Twitter library code at http://code.google.com/p/python-twitter/source/browse/twitter.py. What other options could we have passed to <code>GetSearch</code>?


<b>Check your understanding</b>: What does <code>api.GetSearch</code> return?
<b>Check your understanding</b>: What does <code>api.GetSearch</code> return?



=== 2. Read through and understand <code>trendingTopics</code> ===
=== 2. Read through and understand <code>trendingTopics</code> ===