.. automethod:: API.destroy_status
+.. automethod:: API.retweet
+
Status methods
--------------
:rtype: :class:`Status` object
-.. method:: API.retweet(id)
-
- Retweets a tweet. Requires the id of the tweet you are retweeting.
-
- :param id: |sid|
- :rtype: :class:`Status` object
-
-
.. method:: API.unretweet(id)
Untweets a retweeted status. Requires the id of the retweet to unretweet.
), **kwargs
)
+ @payload('status')
+ def retweet(self, id, **kwargs):
+ """retweet(id, *, trim_user)
+
+ Retweets a Tweet. Requires the ID of the Tweet you are retweeting.
+
+ :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-retweet-id
+ """
+ return self.request(
+ 'POST', f'statuses/retweet/{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 retweet(self, id, **kwargs):
- """ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/post-statuses-retweet-id
- """
- return self.request(
- 'POST', f'statuses/retweet/{id}', endpoint_parameters=(
- 'trim_user',
- ), **kwargs
- )
-
@payload('status')
def unretweet(self, id, **kwargs):
""" :reference: https://developer.twitter.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/post-statuses-unretweet-id