mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
NamedUser.has_in_following
This commit is contained in:
@@ -449,6 +449,21 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
None
|
||||
)
|
||||
|
||||
def has_in_following(self, following):
|
||||
"""
|
||||
:calls: `GET /user/:user/following/:target_user <http://developer.github.com/v3/users/followers/#check-if-one-user-follows-another>`_
|
||||
:param following: :class:`github.NamedUser.NamedUser`
|
||||
:rtype: bool
|
||||
"""
|
||||
assert isinstance(following, github.NamedUser.NamedUser), following
|
||||
status, headers, data = self._requester.requestJson(
|
||||
"GET",
|
||||
self.url + "/following/" + following._identity,
|
||||
None,
|
||||
None
|
||||
)
|
||||
return status == 204
|
||||
|
||||
@property
|
||||
def _identity(self):
|
||||
return self.login
|
||||
|
||||
Reference in New Issue
Block a user