Commit 0804678a authored by Josh Roesslein's avatar Josh Roesslein
Browse files

Tutorial fixes. Also fixed issue with binder fetching cached results.

parent abba38c0
......@@ -3,7 +3,6 @@ The plan of attack for the next version of Tweepy.
1.0 -> 1.0.1
============
+ changing profile and background images [DONE]
+ prepare for social graph changes mentioned on mailinglist
+ finish search api
+ autodetect authenticated user's ID [DONE]
......@@ -14,3 +13,4 @@ Future...
+ command line client example
+ retweet api [DONE BUT NEEDS TESTING]
+ async requests
+ prepare for social graph changes mentioned on mailinglist
......@@ -22,7 +22,7 @@ public_timeline = no_auth_api.public_timeline()
print 'Public timeline...'
for status in public_timeline:
print status.text
print 'from: %s' % status.user.screen_name
print 'from: %s' % status.author.screen_name
"""
Tweepy provides a non-authenticated instance of the API for you already
......@@ -51,7 +51,7 @@ friends_timeline = auth_api.friends_timeline()
print 'Friends timeline...'
for status in friends_timeline:
print status.text
print 'from: %s' % status.user.screen_name
print 'from: %s' % status.author.screen_name
""" The End
......
......@@ -36,7 +36,7 @@ If you wish to use your own cache implementation just
extend the Cache interface class (tweepy/cache.py).
Then when you create your API instance pass it in.
"""
my_api = tweepy.API(cache=MyCache())
#my_api = tweepy.API(cache=MyCache())
""" The End """
......@@ -71,7 +71,12 @@ def bind_api(path, parser, allowed_param=None, method='GET', require_auth=False,
cache_result = api.cache.get(url, timeout)
if cache_result:
# if cache result found and not expired, return it
cache_result._api = api # restore api reference to this api instance
# must restore api reference
if isinstance(cache_result, list):
for result in cache_result:
result._api = api
else:
cache_result._api = api
return cache_result
# Open connection
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment