.. automethod:: API.create_friendship
+.. automethod:: API.destroy_friendship
+
Direct Message Methods
----------------------
:rtype: None
-Friendship Methods
-------------------
-
-.. method:: API.destroy_friendship(id/screen_name/user_id)
-
- Destroy a friendship with the specified user (aka unfollow).
-
- :param id: |uid|
- :param screen_name: |screen_name|
- :param user_id: |user_id|
- :rtype: :class:`User` object
-
-
Account Methods
---------------
), **kwargs
)
+ @payload('user')
+ def destroy_friendship(self, **kwargs):
+ """destroy_friendship(*, screen_name, user_id)
+
+ Destroy a friendship with the specified user (aka unfollow).
+
+ :param screen_name: |screen_name|
+ :param user_id: |user_id|
+
+ :rtype: :class:`User` object
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/post-friendships-destroy
+ """
+ return self.request(
+ 'POST', 'friendships/destroy', endpoint_parameters=(
+ 'screen_name', 'user_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
), id=id, **kwargs
)
- @payload('user')
- def destroy_friendship(self, **kwargs):
- """ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/post-friendships-destroy
- """
- return self.request(
- 'POST', 'friendships/destroy', endpoint_parameters=(
- 'screen_name', 'user_id'
- ), **kwargs
- )
-
@payload('json')
def get_settings(self, **kwargs):
""" :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/manage-account-settings/api-reference/get-account-settings