aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/resources
diff options
context:
space:
mode:
authorDavid Medina <davidmedina9@gmail.com>2012-05-27 21:39:03 +0200
committerDavid Medina <davidmedina9@gmail.com>2012-05-27 21:39:31 +0200
commitac2b75a6527e8ce916b7675dac247d37276a3aa2 (patch)
tree4a3ead072bcdee6f17fdac88e836f30ad435fd7f /pygithub3/resources
parentMerge pull request #11 from dsc/patch-1 (diff)
parentAuthors updated (diff)
downloadpython-github3-ac2b75a6527e8ce916b7675dac247d37276a3aa2.tar.xz
python-github3-ac2b75a6527e8ce916b7675dac247d37276a3aa2.zip
Merge 'services/orgs'
Diffstat (limited to 'pygithub3/resources')
-rw-r--r--pygithub3/resources/orgs.py16
-rw-r--r--pygithub3/resources/repos.py7
2 files changed, 16 insertions, 7 deletions
diff --git a/pygithub3/resources/orgs.py b/pygithub3/resources/orgs.py
index 3996172..f0a9804 100644
--- a/pygithub3/resources/orgs.py
+++ b/pygithub3/resources/orgs.py
@@ -2,6 +2,7 @@
# -*- encoding: utf-8 -*-
from .base import Resource
+from .users import Plan
__all__ = ('Org', )
@@ -9,6 +10,19 @@ __all__ = ('Org', )
class Org(Resource):
_dates = ('created_at', )
+ _maps = {'plan': Plan}
def __str__(self):
- return '<Org (%s)>' % getattr(self, 'name', '')
+ return '<Org (%s)>' % getattr(self, 'login', '')
+
+
+class Team(Resource):
+
+ def __str__(self):
+ return '<Team (%s)>' % getattr(self, 'name', '')
+
+
+class Member(Resource):
+
+ def __str__(self):
+ return '<TeamMember (%s)>' % getattr(self, 'login', '')
diff --git a/pygithub3/resources/repos.py b/pygithub3/resources/repos.py
index efd5b13..85e24c7 100644
--- a/pygithub3/resources/repos.py
+++ b/pygithub3/resources/repos.py
@@ -18,12 +18,6 @@ class Repo(Resource):
return '<Repo (%s)>' % getattr(self, 'name', '')
-class Team(Resource):
-
- def __str__(self):
- return '<Team (%s)>' % getattr(self, 'name', '')
-
-
class Author(Resource):
_dates = ('date')
@@ -115,6 +109,7 @@ class Download(Resource):
'Policy': self.policy, 'Signature': self.signature,
'Content-Type': self.mime_type})
+
class Hook(Resource):
_dates = ('created_at', 'pushed_at')