Added getHomeTimeline() support - this isn't a supported feature of the Twitter API just yet, but it's not bad to throw support for it in Twython now. (Twython3k will get an update soon that has this)
This commit is contained in:
parent
c62c41a45e
commit
0d37e5be40
1 changed files with 10 additions and 0 deletions
10
twython.py
10
twython.py
|
|
@ -134,6 +134,16 @@ class setup:
|
|||
except HTTPError, e:
|
||||
raise TangoError("getPublicTimeline() failed with a %s error code." % `e.code`)
|
||||
|
||||
def getHomeTimeline(self, **kwargs):
|
||||
if self.authenticated is True:
|
||||
try:
|
||||
friendsTimelineURL = self.constructApiURL("http://twitter.com/statuses/home_timeline.json", kwargs)
|
||||
return simplejson.load(self.opener.open(friendsTimelineURL))
|
||||
except HTTPError, e:
|
||||
raise TangoError("getHomeTimeline() failed with a %s error code. (This is an upcoming feature in the Twitter API, and may not be implemented yet)" % `e.code`)
|
||||
else:
|
||||
raise TangoError("getHomeTimeline() requires you to be authenticated.")
|
||||
|
||||
def getFriendsTimeline(self, **kwargs):
|
||||
if self.authenticated is True:
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue