Skip to content

Commit

Permalink
Add API.no_retweets_friendships
Browse files Browse the repository at this point in the history
  • Loading branch information
Harmon758 committed Apr 7, 2021
1 parent 7bfbf4c commit 496a399
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ Follow, search, and get users

.. automethod:: API.lookup_friendships

.. automethod:: API.no_retweets_friendships


User methods
------------
Expand Down
19 changes: 19 additions & 0 deletions tweepy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1529,6 +1529,25 @@ def lookup_friendships(self, *, screen_name=None, user_id=None, **kwargs):
user_id=list_to_csv(user_id), **kwargs
)

@payload('json')
def no_retweets_friendships(self, **kwargs):
"""no_retweets_friendships(*, stringify_ids)
Returns a collection of user_ids that the currently authenticated user
does not want to receive retweets from.
:param stringify_ids: |stringify_ids|
:rtype: list of :class:`int`
:reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-friendships-no_retweets-ids
"""
return self.request(
'GET', 'friendships/no_retweets/ids', endpoint_parameters=(
'stringify_ids',
), **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
Expand Down

0 comments on commit 496a399

Please sign in to comment.