.. automethod:: API.create_saved_search
+.. automethod:: API.destroy_saved_search
+
Direct Message Methods
----------------------
:rtype: :class:`User` object
-Saved Searches Methods
-----------------------
-
-.. method:: API.destroy_saved_search(id)
-
- Destroys a saved search for the authenticated user. The search specified by
- id must be owned by the authenticating user.
-
- :param id: The id of the saved search to be deleted.
- :rtype: :class:`SavedSearch` object
-
-
Search Methods
--------------
), query=query, **kwargs
)
+ @payload('saved_search')
+ def destroy_saved_search(self, id, **kwargs):
+ """destroy_saved_search(id)
+
+ Destroys a saved search for the authenticated user. The search
+ specified by ID must be owned by the authenticating user.
+
+ :param id: The ID of the saved search to be deleted.
+
+ :rtype: :class:`SavedSearch` object
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/manage-account-settings/api-reference/post-saved_searches-destroy-id
+ """
+ return self.request('POST', f'saved_searches/destroy/{id}', **kwargs)
+
def media_upload(self, filename, *, file=None, chunked=False,
media_category=None, additional_owners=None, **kwargs):
""" :reference: https://developer.twitter.com/en/docs/twitter-api/v1/media/upload-media/overview
), **kwargs
)
- @payload('saved_search')
- def destroy_saved_search(self, id, **kwargs):
- """ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/manage-account-settings/api-reference/post-saved_searches-destroy-id
- """
- return self.request('POST', f'saved_searches/destroy/{id}', **kwargs)
-
@payload('json')
def trends_available(self, **kwargs):
""" :reference: https://developer.twitter.com/en/docs/twitter-api/v1/trends/locations-with-trending-topics/api-reference/get-trends-available