From 5bf88f263a1e64111865ca5fc820259c99115fb6 Mon Sep 17 00:00:00 2001 From: Jan Schaumann Date: Fri, 6 Jul 2012 15:35:02 -0400 Subject: [PATCH] Add support for retweeted_by_user: https://dev.twitter.com/docs/api/1/get/statuses/retweeted_by_user --- CONTRIBUTORS | 1 + setup.py | 2 +- tests.py | 4 ++++ tweepy/__init__.py | 2 +- tweepy/api.py | 8 ++++++++ 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 1232cbc..6812fe3 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -25,3 +25,4 @@ Wayne Moore Will McCutchen gilles Can Duruk +Jan Schaumann (@jschauma) diff --git a/setup.py b/setup.py index edd4e3e..83bc79c 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup, find_packages setup(name="tweepy", - version="1.9", + version="1.9.1", description="Twitter library for python", license="MIT", author="Joshua Roesslein", diff --git a/tests.py b/tests.py index 4929cd3..e3c45bf 100644 --- a/tests.py +++ b/tests.py @@ -41,6 +41,10 @@ class TweepyAPITests(unittest.TestCase): def testretweetedbyme(self): self.api.retweeted_by_me() + def testretweetedbyuser(self): + self.api.retweeted_by_user() + self.api.retweeted_bye_user('twitter') + def testretweetedtome(self): self.api.retweeted_to_me() diff --git a/tweepy/__init__.py b/tweepy/__init__.py index e79bc2c..990c08c 100644 --- a/tweepy/__init__.py +++ b/tweepy/__init__.py @@ -5,7 +5,7 @@ """ Tweepy Twitter API library """ -__version__ = '1.9' +__version__ = '1.9.1' __author__ = 'Joshua Roesslein' __license__ = 'MIT' diff --git a/tweepy/api.py b/tweepy/api.py index 7692ce4..6fa3fff 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -70,6 +70,14 @@ class API(object): require_auth = True ) + """/statuses/retweeted_by_user.format""" + retweeted_by_user = bind_api( + path = '/statuses/retweeted_by_user.json', + payload_type = 'status', payload_list = True, + allowed_param = ['screen_name', 'id', 'count', 'since_id', + 'max_id', 'page', 'include_entities'] + ) + """/statuses/:id/retweeted_by.format""" retweeted_by = bind_api( path = '/statuses/{id}/retweeted_by.json', -- 2.25.1