diff options
author | 2011-11-09 13:04:48 +0200 | |
---|---|---|
committer | 2011-11-09 13:04:48 +0200 | |
commit | f1a03e9fc8ce87ca1beeae5a92082bb32d342df3 (patch) | |
tree | 6bca689287379b249aff19fbae075182dc22f95a /github3/models/orgs.py | |
parent | Added create_gist() example to readme (diff) | |
parent | Fixing bugs. Crazy night :S (diff) | |
download | python-github3-f1a03e9fc8ce87ca1beeae5a92082bb32d342df3.tar.xz python-github3-f1a03e9fc8ce87ca1beeae5a92082bb32d342df3.zip |
Merged create_gist() into current HEAD of copitux/develop
Diffstat (limited to 'github3/models/orgs.py')
-rw-r--r-- | github3/models/orgs.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/github3/models/orgs.py b/github3/models/orgs.py new file mode 100644 index 0000000..5e66c35 --- /dev/null +++ b/github3/models/orgs.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python +# -*- encoding: utf-8 -*- +# +# author: David Medina + +from .base import BaseResource +from .user import Plan + +class Org(BaseResource): + """Github Organization object model.""" + + @classmethod + def idl(self): + return { + 'strs': ['login', 'url', 'avatar_url', 'name', 'company', 'blog', + 'location', 'email', 'html_url', 'type', 'billing_email'], + 'ints': ['id', 'public_repos', 'public_gists', 'followers', + 'following', 'total_private_repos', 'owned_private_repos', + 'private_gists', 'disk_usage', 'collaborators'], + 'dates': ['created_at'], + 'maps': {'plan': Plan} + } + + def __repr__(self): + return '<Org %s>' % self.login |