-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed Issue #1443 #1444
fixed Issue #1443 #1444
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1034,6 +1034,21 @@ def lists_memberships(self): | |
require_auth=True | ||
) | ||
|
||
@property | ||
def lists_ownerships(self): | ||
""" :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-ownerships | ||
:allowed_param: 'screen_name', 'user_id', | ||
'cursor', 'count' | ||
""" | ||
return bind_api( | ||
api=self, | ||
path='/lists/ownerships.json', | ||
payload_type='list', payload_list=True, | ||
allowed_param=['screen_name', 'user_id', | ||
'cursor', 'count'], | ||
require_auth=True | ||
) | ||
|
||
@property | ||
def lists_subscriptions(self): | ||
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-subscriptions | ||
|
@@ -1158,14 +1173,14 @@ def _remove_list_members(self): | |
def list_members(self): | ||
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-members | ||
:allowed_param: 'owner_screen_name', 'slug', 'list_id', 'owner_id', | ||
'cursor' | ||
'cursor', 'count' | ||
""" | ||
return bind_api( | ||
api=self, | ||
path='/lists/members.json', | ||
payload_type='user', payload_list=True, | ||
allowed_param=['owner_screen_name', 'slug', 'list_id', 'owner_id', | ||
'cursor'] | ||
'cursor', 'count'] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should also be part of another separate pull request, which should also add documentation for the new allowed parameter. |
||
) | ||
|
||
@property | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -196,17 +196,22 @@ def unfollow(self): | |
self.following = False | ||
|
||
def lists_memberships(self, *args, **kwargs): | ||
return self._api.lists_memberships(user=self.screen_name, | ||
return self._api.lists_memberships(user_id=self.id, | ||
*args, | ||
**kwargs) | ||
|
||
def lists_ownerships(self, *args, **kwargs): | ||
return self._api.lists_ownerships(user_id=self.id, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be part of the separate pull request that adds |
||
*args, | ||
**kwargs) | ||
|
||
def lists_subscriptions(self, *args, **kwargs): | ||
return self._api.lists_subscriptions(user=self.screen_name, | ||
return self._api.lists_subscriptions(user_id=self.id, | ||
*args, | ||
**kwargs) | ||
|
||
def lists(self, *args, **kwargs): | ||
return self._api.lists_all(user=self.screen_name, | ||
return self._api.lists_all(user_id=self.id, | ||
*args, | ||
**kwargs) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be part of a separate pull request, which should also add documentation for the method.