diff options
author | 2012-04-11 17:11:08 -0400 | |
---|---|---|
committer | 2012-05-27 19:54:28 +0200 | |
commit | 61c438619634c80a9fb5579beb0a6609eaf00f2d (patch) | |
tree | 1f4897572042ff397ee02e24b58215316fefdd5c /pygithub3/resources/issues.py | |
parent | Merge pull request #11 from dsc/patch-1 (diff) | |
download | python-github3-61c438619634c80a9fb5579beb0a6609eaf00f2d.tar.xz python-github3-61c438619634c80a9fb5579beb0a6609eaf00f2d.zip |
Add issues service for issues, comments and events. has tests and updated docs
Diffstat (limited to 'pygithub3/resources/issues.py')
-rw-r--r-- | pygithub3/resources/issues.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/pygithub3/resources/issues.py b/pygithub3/resources/issues.py new file mode 100644 index 0000000..ce5b304 --- /dev/null +++ b/pygithub3/resources/issues.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python +# -*- encoding: utf-8 -*- + +from .base import Resource +from .users import User + +class Issue(Resource): + + _dates = ('created_at', 'updated_at') + _maps = {'assignee': User} + + def __str__(self): + return '<Issue (%s)>' % getattr(self, 'number', '') + + +class Comment(Resource): + + _dates = ('created_at', 'update_at') + _maps = {'user': User} + + def __str__(self): + return '<Comment (%s)>' % (getattr(self, 'user', '')) + + +class Event(Resource): + + _dates = ('created_at', ) + _maps = {'actor': User} + + def __str__(self): + return '<Event (%s)>' % (getattr(self, 'commit_id', ''))
\ No newline at end of file |