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?
|
# Authenticate here?
|
||||||
self.twitter_user = twitter_user
|
self.twitter_user = twitter_user
|
||||||
|
|
||||||
def getUserTimeline(self, count, page, since_id):
|
def getUserTimeline(self, **kwargs):
|
||||||
userTimelineURL = "http://twitter.com/statuses/user_timeline/" + self.twitter_user + ".json" + ("" if optional_count is None else "?count=" + optional_count)
|
# 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))
|
userTimeline = simplejson.load(urllib2.urlopen(userTimelineURL))
|
||||||
formattedTimeline = []
|
formattedTimeline = []
|
||||||
for tweet in userTimeline:
|
for tweet in userTimeline:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue