Add API.report_spam method.
authorJosh Roesslein <jroesslein@gmail.com>
Wed, 14 Oct 2009 21:42:13 +0000 (16:42 -0500)
committerJosh Roesslein <jroesslein@gmail.com>
Wed, 14 Oct 2009 21:42:13 +0000 (16:42 -0500)
CHANGES
tweepy/api.py

diff --git a/CHANGES b/CHANGES
index 744086989b285770d654f13ea1c9ff4999b2aa56..22415d18cf12ee9e6188f073a0a178f5492117f5 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -18,6 +18,7 @@ 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
+    + Added report_spam method
 
 + Cursor
     Added the Cursor object to help with pagination within the API.
index c5c917dcf226e3c7f8f86347104b9452b80944bc..ef42553b23580c6949354c7e9d6f5c44a6c66fd8 100644 (file)
@@ -848,6 +848,24 @@ class API(object):
         require_auth = True
     )
 
+    """ report_spam
+
+        The user specified in the id is blocked by the authenticated user
+        and reported as a spammer.
+
+        Parameters: id or user_id or screen_name
+        Returns: User
+
+        http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-report_spam
+    """
+    report_spam = bind_api(
+        path = '/report_spam.json',
+        method = 'POST',
+        parser = parse_user,
+        allowed_param = ['id', 'user_id', 'screen_name'],
+        require_auth = True
+    )
+
     """ saved_searches
 
         Returns the authenticated user's saved search queries.