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