Rename status_id API.destroy_status parameter to id
authorHarmon <Harmon758@gmail.com>
Wed, 10 Feb 2021 04:01:42 +0000 (22:01 -0600)
committerHarmon <Harmon758@gmail.com>
Wed, 10 Feb 2021 04:02:26 +0000 (22:02 -0600)
tests/test_api.py
tweepy/api.py

index a0e8eda7217e4610d279a1e53c65db9f96945b8f..06a6bae520bf0e8dbfbe224989b59e2f4f3547dc 100644 (file)
@@ -95,7 +95,7 @@ class TweepyAPITests(TweepyTestCase):
         self.assertEqual(update.text, tweet_text)
 
         # test destroy
-        deleted = self.api.destroy_status(status_id=update.id)
+        deleted = self.api.destroy_status(id=update.id)
         self.assertEqual(deleted.id, update.id)
 
     @tape.use_cassette('testupdateanddestroystatus.json')
@@ -105,7 +105,7 @@ class TweepyAPITests(TweepyTestCase):
         self.assertEqual(update.text, tweet_text)
 
         # test destroy
-        deleted = self.api.destroy_status(status_id=update.id)
+        deleted = self.api.destroy_status(id=update.id)
         self.assertEqual(deleted.id, update.id)
 
     @tape.use_cassette('testupdatestatuswithmedia.yaml', serializer='yaml')
index dd12fa3281aa93b3c82d06f2be9be0a6f458ad14..60a87ee9f78f0518c57c5f55f873fb768dee1b66 100644 (file)
@@ -392,11 +392,11 @@ class API:
         )
 
     @payload('status')
-    def destroy_status(self, status_id, *args, **kwargs):
+    def destroy_status(self, id, *args, **kwargs):
         """ :reference: https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/post-statuses-destroy-id
         """
         return self.request(
-            'POST', f'statuses/destroy/{status_id}', *args, **kwargs
+            'POST', f'statuses/destroy/{id}', *args, **kwargs
         )
 
     @payload('status')