Replace API.destroy_saved_search id allowed_param with parameter
authorHarmon <Harmon758@gmail.com>
Fri, 29 Jan 2021 02:30:14 +0000 (20:30 -0600)
committerHarmon <Harmon758@gmail.com>
Fri, 29 Jan 2021 02:30:14 +0000 (20:30 -0600)
Replace API.destroy_saved_search id allowed_param with saved_search_id parameter

tweepy/api.py

index 3ad43d2ecf6194742c42bb38fdbdc1f9bf7fa0ec..e958d811c8b4a2c817475d7e4570cc041ccce6b2 100644 (file)
@@ -881,16 +881,15 @@ class API:
             require_auth=True, **kwargs
         )
 
-    def destroy_saved_search(self, *args, **kwargs):
+    def destroy_saved_search(self, saved_search_id, *args, **kwargs):
         """ :reference: https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/post-saved_searches-destroy-id
-            :allowed_param: 'id'
+            :allowed_param:
         """
         return bind_api(
             *args, api=self,
-            path='/saved_searches/destroy/{id}.json',
+            path=f'/saved_searches/destroy/{saved_search_id}.json',
             method='POST',
             payload_type='saved_search',
-            allowed_param=['id'],
             require_auth=True, **kwargs
         )