Renaming a function to make room for other trending search stuff

This commit is contained in:
Ryan McGrath 2009-05-06 02:20:50 -04:00
parent f2553f81dc
commit 5a7a0ebcc9

View file

@ -9,7 +9,7 @@ class tango:
# Authenticate here? # Authenticate here?
self.twitter_user = twitter_user self.twitter_user = twitter_user
def getUserTimeline(self, optional_count): def getUserTimeline(self, count, page, since_id):
userTimelineURL = "http://twitter.com/statuses/user_timeline/" + self.twitter_user + ".json" + ("" if optional_count is None else "?count=" + optional_count) userTimelineURL = "http://twitter.com/statuses/user_timeline/" + self.twitter_user + ".json" + ("" if optional_count is None else "?count=" + optional_count)
userTimeline = simplejson.load(urllib2.urlopen(userTimelineURL)) userTimeline = simplejson.load(urllib2.urlopen(userTimelineURL))
formattedTimeline = [] formattedTimeline = []
@ -25,7 +25,7 @@ class tango:
formattedTimeline.append(tweet['text']) formattedTimeline.append(tweet['text'])
return formattedTimeline return formattedTimeline
def getTrendingTopics(self): def getCurrentTrends(self):
# Returns an array of dictionary items containing the current trends # Returns an array of dictionary items containing the current trends
trendingTopicsURL = "http://search.twitter.com/trends.json" trendingTopicsURL = "http://search.twitter.com/trends.json"
trendingTopics = simplejson.load(urllib.urlopen(trendingTopicsURL)) trendingTopics = simplejson.load(urllib.urlopen(trendingTopicsURL))