Permalink
Browse files

Say how to test each twitter_functions function as part of the functi…

…on docstring.
  • Loading branch information...
jesstess committed Mar 29, 2012
1 parent 585d6f4 commit 0cc90a69e936ebd6d92747ee4e1de38019f03dfc
Showing with 16 additions and 0 deletions.
  1. +16 −0 twitter_functions.py
View
@@ -6,6 +6,11 @@
def search(searchTerm):
"""
Print recent tweets containing `searchTerm`.
+
+ To test this function, at the command line run:
+ python twitter_api.py --search=<search term>
+ For example,
+ python twitter_api.py --search=python
"""
api = twitter.Api()
tweets = api.GetSearch(searchTerm)
@@ -15,6 +20,9 @@ def search(searchTerm):
def trendingTopics():
"""
Print the currently trending topics.
+
+ To test this function, at the command line run:
+ python twitter_api.py -t
"""
api = twitter.Api()
@@ -25,11 +33,19 @@ def trendingTopics():
def userTweets(username):
"""
Print recent tweets by `username`.
+
+ To test this function, at the command line run:
+ python twitter_api.py -u <username>
+ For example,
+ python twitter_api.py -u bostonpython
"""
pass
def trendingTweets():
"""
Print tweets for all the trending topics.
+
+ To test this function, at the command line run:
+ python twitter_api.py -w
"""
pass

0 comments on commit 0cc90a6

Please sign in to comment.