From 777ac8e6e48ea89ccba7975eb57f7b193255b976 Mon Sep 17 00:00:00 2001 From: Ryan McGrath Date: Thu, 7 May 2009 01:39:42 -0400 Subject: [PATCH] Updated tango.getUserTimeline() to take **kwargs, need to implement full API support for it --- tango.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tango.py b/tango.py index 301dd02..1c90a06 100644 --- a/tango.py +++ b/tango.py @@ -9,8 +9,11 @@ class tango: # Authenticate here? self.twitter_user = twitter_user - 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) + def getUserTimeline(self, **kwargs): + # Needs full API support, when I'm not so damn tired. + userTimelineURL = "http://twitter.com/statuses/user_timeline/" + self.twitter_user + ".json" + if kwargs["count"] is not None: + userTimelineURL += "?count=" + kwargs["count"] userTimeline = simplejson.load(urllib2.urlopen(userTimelineURL)) formattedTimeline = [] for tweet in userTimeline: