Skip to content

Commit 1b310d3

Browse files
committed
GistComment model
1 parent 88e54d4 commit 1b310d3

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

github3/models/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from .user import AuthUser, User, Key
22
from .repos import Repo
33
from .orgs import Org
4-
from .gists import Gist
4+
from .gists import Gist, GistComment

github3/models/gists.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@
44
from .base import BaseResource
55
from .user import User
66

7+
8+
class GistComment(BaseResource):
9+
""" Gist comment """
10+
11+
@classmethod
12+
def idl(self):
13+
return {
14+
'strs': ['url', 'body', 'body_text', 'body_html'],
15+
'ints': ['id'],
16+
'maps': {'user': User},
17+
'dates': ['created_at'],
18+
}
19+
20+
def __repr__(self):
21+
return '<GistComment %s>' % self.user.login
22+
23+
724
class File(BaseResource):
825
""" File model """
926

0 commit comments

Comments
 (0)