Moved patch files to subdirectory
This commit is contained in:
parent
59d9177f3a
commit
37e033ca34
6 changed files with 1 additions and 1 deletions
34
patches/python-twitter-retweet-3.patch
Normal file
34
patches/python-twitter-retweet-3.patch
Normal file
|
@ -0,0 +1,34 @@
|
|||
diff -r 51ac454d5d89 twitter.py
|
||||
--- a/twitter.py Thu Dec 31 15:06:42 2009 -0500
|
||||
+++ b/twitter.py Sat Apr 10 10:42:52 2010 -0400
|
||||
@@ -690,6 +690,30 @@
|
||||
results.append(self.PostUpdate(lines[-1], **kwargs))
|
||||
return results
|
||||
|
||||
+ def PostRetweet(self, id):
|
||||
+ '''Retweet a tweet with the Retweet API
|
||||
+
|
||||
+ The twitter.Api instance must be authenticated.
|
||||
+
|
||||
+ Args:
|
||||
+ id: The numerical ID of the tweet you are retweeting
|
||||
+
|
||||
+ Returns:
|
||||
+ A twitter.Status instance representing the retweet posted
|
||||
+ '''
|
||||
+ if not self._username:
|
||||
+ raise TwitterError("The twitter.Api instance must be authenticated.")
|
||||
+ try:
|
||||
+ if int(id) <= 0:
|
||||
+ raise TwitterError("'id' must be a positive number")
|
||||
+ except ValueError:
|
||||
+ raise TwitterError("'id' must be an integer")
|
||||
+ url = 'http://api.twitter.com/1/statuses/retweet/%s.json' % id
|
||||
+ json = self._FetchUrl(url, post_data={})
|
||||
+ data = simplejson.loads(json)
|
||||
+ self._CheckForTwitterError(data)
|
||||
+ return NewStatusFromJsonDict(data)
|
||||
+
|
||||
def GetReplies(self, since=None, since_id=None, page=None):
|
||||
'''Get a sequence of status messages representing the 20 most recent
|
||||
replies (status updates prefixed with @username) to the authenticating
|
Reference in a new issue