-
-
Notifications
You must be signed in to change notification settings - Fork 621
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
Update friendships.py #438
base: master
Are you sure you want to change the base?
Conversation
class FriendshipsEndpointsMixin(object): | ||
"""For endpoints in ``/friendships/``.""" | ||
|
||
def duje_cc(self): |
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.
b
@@ -17,12 +14,10 @@ def duje_cc(self): | |||
[ClientCompatPatch.list_user(user, drop_incompat_keys=self.drop_incompat_keys) | |||
for user in res['users']] | |||
return res | |||
|
|||
def duje_cc(self, user_id, rank_token, **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.
b
""" | ||
Get user followings | ||
|
||
:param user_id: |
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.
b
@@ -31,23 +26,19 @@ def duje_cc(self, user_id, rank_token, **kwargs): | |||
:return: | |||
""" | |||
raise_if_invalid_rank_token(rank_token) | |||
|
|||
endpoint = 'friendships/{user_id!s}/following/'.format(**{'user_id': user_id}) |
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.
b
query_params = { | ||
'rank_token': rank_token, | ||
} |
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.
b
query_params.update(kwargs) | ||
res = self._call_api(endpoint, query=query_params) | ||
if self.auto_patch: | ||
[ClientCompatPatch.list_user(u, drop_incompat_keys=self.drop_incompat_keys) | ||
for u in res.get('users', [])] | ||
return res | ||
|
||
def duje_cc(self, user_id, rank_token, **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.
b
""" | ||
Get user followers | ||
|
||
:param duje_cc: |
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.
b
What does this PR do?
(Briefly describe what this PR is about.)
Why was this PR needed?
(Briefly describe reasons.)
What are the relevant issue numbers?
(List issue numbers here.)
Does this PR meet the acceptance criteria?
.travis.yml
)master