Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zahra Rajabi
tweepy
Commits
0804678a
Commit
0804678a
authored
Aug 25, 2009
by
Josh Roesslein
Browse files
Tutorial fixes. Also fixed issue with binder fetching cached results.
parent
abba38c0
Changes
4
Hide whitespace changes
Inline
Side-by-side
ROADMAP
View file @
0804678a
...
...
@@ -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
tutorial/t2.py
View file @
0804678a
...
...
@@ -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
.
use
r
.
screen_name
print
'from: %s'
%
status
.
autho
r
.
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
.
use
r
.
screen_name
print
'from: %s'
%
status
.
autho
r
.
screen_name
""" The End
...
...
tutorial/t5.py
View file @
0804678a
...
...
@@ -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 """
tweepy/binder.py
View file @
0804678a
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment