github3.py
github3.py copied to clipboard
add GET /orgs/:org/outside_collaborators
Hi,
Could you please add GET /orgs/:org/outside_collaborators ? https://developer.github.com/v3/orgs/outside_collaborators/
It's something like this in orgs.py:
def outside_collaborators(self, filter=None, number=-1, etag=None):
"""Iterate over collaborators of this organization.
:param str filter: (optional), filter members returned by this method.
Can be one of: ``"2fa_disabled"``, ``"all",``. Default: ``"all"``.
Filtering by ``"2fa_disabled"`` is only available for organization
owners with private repositories.
:param int number: (optional), number of members to return. Default:
-1 will return all available.
:param str etag: (optional), ETag from a previous request to the same
endpoint
:returns: generator of :class:`User <github3.users.User>`
"""
headers = {}
params = {}
if filter in self.members_filters:
params['filter'] = filter
url = self._build_url('outside_collaborators', base_url=self._api)
return self._iter(int(number), url, users.ShortUser, params=params,
etag=etag, headers=headers)
I'm going to take a stab at this issue.
Hi,
Could you please add GET /orgs/:org/outside_collaborators ? https://developer.github.com/v3/orgs/outside_collaborators/
It's something like this in orgs.py:
def outside_collaborators(self, filter=None, number=-1, etag=None): """Iterate over collaborators of this organization. :param str filter: (optional), filter members returned by this method. Can be one of: ``"2fa_disabled"``, ``"all",``. Default: ``"all"``. Filtering by ``"2fa_disabled"`` is only available for organization owners with private repositories. :param int number: (optional), number of members to return. Default: -1 will return all available. :param str etag: (optional), ETag from a previous request to the same endpoint :returns: generator of :class:`User <github3.users.User>` """ headers = {} params = {} if filter in self.members_filters: params['filter'] = filter url = self._build_url('outside_collaborators', base_url=self._api) return self._iter(int(number), url, users.ShortUser, params=params, etag=etag, headers=headers)
I'm almost done with this. Just working through some of the betamax tests. Will push up draft with what I have soon and then can iterate. Sorry for the delays.
@jmeridth take your time. Let me know if you need any help