diff options
Diffstat (limited to 'github3/models')
-rw-r--r-- | github3/models/__init__.py | 2 | ||||
-rw-r--r-- | github3/models/gists.py | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/github3/models/__init__.py b/github3/models/__init__.py index ff0c28a..0471393 100644 --- a/github3/models/__init__.py +++ b/github3/models/__init__.py @@ -1,4 +1,4 @@ from .user import AuthUser, User, Key from .repos import Repo from .orgs import Org -from .gists import Gist +from .gists import Gist, GistComment diff --git a/github3/models/gists.py b/github3/models/gists.py index 13f3a62..8979dbb 100644 --- a/github3/models/gists.py +++ b/github3/models/gists.py @@ -4,6 +4,23 @@ 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 """ |