diff options
author | 2012-02-03 02:59:53 +0100 | |
---|---|---|
committer | 2012-02-03 02:59:53 +0100 | |
commit | ae1c3c06c47866c8f392d05c63f597d71cebd691 (patch) | |
tree | 6543c55e2210bd91f59124785200d1fbfb6be872 /github3/models/gists.py | |
parent | Update setup.py (diff) | |
download | python-github3-ae1c3c06c47866c8f392d05c63f597d71cebd691.tar.xz python-github3-ae1c3c06c47866c8f392d05c63f597d71cebd691.zip |
Reset project
Diffstat (limited to 'github3/models/gists.py')
-rw-r--r-- | github3/models/gists.py | 98 |
1 files changed, 0 insertions, 98 deletions
diff --git a/github3/models/gists.py b/github3/models/gists.py deleted file mode 100644 index 8979dbb..0000000 --- a/github3/models/gists.py +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/env python -# -*- encoding: utf-8 -*- - -from .base import BaseResource -from .user import User - - -class GistComment(BaseResource): - """ Gist comment """ - - @classmethod - def idl(self): - return { - 'strs': ['url', 'body', 'body_text', 'body_html'], - 'ints': ['id'], - 'maps': {'user': User}, - 'dates': ['created_at'], - } - - def __repr__(self): - return '<GistComment %s>' % self.user.login - - -class File(BaseResource): - """ File model """ - - @classmethod - def idl(self): - return { - 'strs': ['filename', 'raw_url', 'content', 'language', 'type'], - 'ints': ['size'], - } - - def __repr__(self): - return '<File gist> %s' % self.filename - - -class GistFork(BaseResource): - """ GistFork model """ - - @classmethod - def idl(self): - return { - 'strs': ['url'], - 'dates': ['created_at'], - 'maps': {'user': User} - } - - def __repr__(self): - return '<Gist fork> %s>' % self.user.login - - -class ChangeStatus(BaseResource): - """ ChangeStatus model """ - - @classmethod - def idl(self): - return { - 'ints': ['deletions', 'additions', 'total'], - } - - def __repr__(self): - return '<Gist history> change_status>' - - -class GistHistory(BaseResource): - """ """ - - @classmethod - def idl(self): - return { - 'strs': ['url', 'version'], - 'maps': {'user': User, 'change_status': ChangeStatus}, - 'dates': ['committed_at'], - } - - def __repr__(self): - return '<GistHistory %s/%s>' % (self.user, self.committed_at) - - -class Gist(BaseResource): - """ """ - - @classmethod - def idl(self): - return { - 'strs': ['url', 'description', 'html_url', 'git_pull_url', - 'git_push_url'], - 'ints': ['id', 'comments'], - 'bools': ['public'], - 'dates': ['created_at'], - 'maps': {'user': User}, - 'collection_maps': {'files': File, 'forks': GistFork, - 'history': GistHistory}, - } - - def __repr__(self): - return '<Gist %s/%s>' % (self.user, self.description) |