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
f60394d1
Commit
f60394d1
authored
Oct 14, 2009
by
Josh Roesslein
Browse files
Add Status.retweet, Status.favorite, and Status.retweets methods.
parent
06fa943f
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGES
View file @
f60394d1
...
...
@@ -18,11 +18,18 @@ during upgrade will be listed here.
Parser updated to handle cursor responses. See above.
+ Fix Status.source_url parsing
+ Fix search result 'source' parsing to properly unescape html and extract source
+ Cursor
Added the Cursor object to help with pagination within the API.
Please see the pagination tutorial for more details (tutorial/t6).
This is the recommended way for using the 'page' and 'cursor' parameters.
+ Models
+ Status: added retweet, favorite and retweets methods
(NOTE: retweet API not live yet on twitter)
+ Update OAuth bundled library.
- Logging removed. Having our own mini-logging system just feels like overkill.
Turns out it was not really needed that much. Simply just exposing the last
HTTPResponse object should be good enough for most debugging.
...
...
tweepy/models.py
View file @
f60394d1
...
...
@@ -46,7 +46,16 @@ class Status(Model):
Status
.
_validate
(
self
)
def
destroy
(
self
):
return
self
.
_api
.
destroy_status
(
id
=
self
.
id
)
return
self
.
_api
.
destroy_status
(
self
.
id
)
def
retweet
(
self
):
return
self
.
_api
.
retweet
(
self
.
id
)
def
retweets
(
self
):
return
self
.
_api
.
retweets
(
self
.
id
)
def
favorite
(
self
):
return
self
.
_api
.
create_favorite
(
self
.
id
)
class
User
(
Model
):
...
...
@@ -75,10 +84,10 @@ class User(Model):
return
self
.
_api
.
mentions
(
**
kargs
)
def
friends
(
self
,
**
kargs
):
return
self
.
_api
.
friends
(
id
=
self
.
id
,
**
kargs
)
return
self
.
_api
.
friends
(
self
.
id
,
**
kargs
)
def
followers
(
self
,
**
kargs
):
return
self
.
_api
.
followers
(
id
=
self
.
id
,
**
kargs
)
return
self
.
_api
.
followers
(
self
.
id
,
**
kargs
)
def
follow
(
self
):
self
.
_api
.
create_friendship
(
user_id
=
self
.
id
)
...
...
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