.. automethod:: API.destroy_favorite
+.. automethod:: API.destroy_status
+
Status methods
--------------
:rtype: :class:`Status` object
-.. method:: API.destroy_status(id)
-
- Destroy the status specified by the id parameter. The authenticated user
- must be the author of the status to destroy.
-
- :param id: |sid|
- :rtype: :class:`Status` object
-
-
.. method:: API.retweet(id)
Retweets a tweet. Requires the id of the tweet you are retweeting.
), id=id, **kwargs
)
+ @payload('status')
+ def destroy_status(self, id, **kwargs):
+ """destroy_status(id, *, trim_user)
+
+ Destroy the status specified by the ``id`` parameter. The authenticated
+ user must be the author of the status to destroy.
+
+ :param id: |sid|
+ :param trim_user: |trim_user|
+
+ :rtype: :class:`Status` object
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/post-statuses-destroy-id
+ """
+ return self.request(
+ 'POST', f'statuses/destroy/{id}', endpoint_parameters=(
+ 'trim_user',
+ ), **kwargs
+ )
+
@payload('status')
def update_status(self, status, **kwargs):
""" :reference: https://developer.twitter.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/post-statuses-update
), command='STATUS', media_id=media_id, upload_api=True, **kwargs
)
- @payload('status')
- def destroy_status(self, id, **kwargs):
- """ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/post-statuses-destroy-id
- """
- return self.request(
- 'POST', f'statuses/destroy/{id}', endpoint_parameters=(
- 'trim_user',
- ), **kwargs
- )
-
@payload('status')
def retweet(self, id, **kwargs):
""" :reference: https://developer.twitter.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/post-statuses-retweet-id