forked from copitux/python-github3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
27 lines (18 loc) · 680 Bytes
/
__init__.py
File metadata and controls
27 lines (18 loc) · 680 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
from pygithub3.services.base import Service
class Org(Service):
""" Consume `Orgs API <http://developer.github.com/v3/orgs>`_ """
def __init__(self, **config):
super(Org, self).__init__(**config)
def list(self, user=None):
""" Get user's orgs
:returns: A :doc:`result`
If you call it and you are authenticated, get the
authenticated user's public/private orgs.
If you are not authenticated, you only get the user's
public orgs.
::
"""
request = self.request_builder('orgs.list', user=user)
return self._get_result(request)