Updated tango.getUserTimeline() to take **kwargs, need to implement full API support for it
This commit is contained in:
parent
5a7a0ebcc9
commit
777ac8e6e4
1 changed files with 5 additions and 2 deletions
7
tango.py
7
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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue