aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/requests/issues/comments.py
diff options
context:
space:
mode:
authorConor Branagan <conor.branagan@gmail.com>2012-04-11 17:11:08 -0400
committerAlejandro Gómez <alejandroogomez@gmail.com>2012-05-27 19:54:28 +0200
commit61c438619634c80a9fb5579beb0a6609eaf00f2d (patch)
tree1f4897572042ff397ee02e24b58215316fefdd5c /pygithub3/requests/issues/comments.py
parentMerge pull request #11 from dsc/patch-1 (diff)
downloadpython-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/requests/issues/comments.py')
-rw-r--r--pygithub3/requests/issues/comments.py42
1 files changed, 42 insertions, 0 deletions
diff --git a/pygithub3/requests/issues/comments.py b/pygithub3/requests/issues/comments.py
new file mode 100644
index 0000000..0601db3
--- /dev/null
+++ b/pygithub3/requests/issues/comments.py
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+# -*- encoding: utf-8 -*-
+
+from pygithub3.requests.base import Request, ValidationError
+from pygithub3.resources.issues import Comment
+
+class List(Request):
+
+ uri = 'repos/{user}/{repo}/issues/{number}/comments'
+ resource = Comment
+
+
+class Get(Request):
+
+ uri = 'repos/{user}/{repo}/issues/comments/{id}'
+ resource = Comment
+
+
+class Create(Request):
+
+ uri = 'repos/{user}/{repo}/issues/{number}/comments'
+ resource = Comment
+ body_schema = {
+ 'schema': ('body', ),
+ 'required': ('body', )
+ }
+
+
+class Edit(Request):
+
+ uri = 'repos/{user}/{repo}/issues/comments/{id}'
+ resource = Comment
+ body_schema = {
+ 'schema': ('body', ),
+ 'required': ('body', )
+ }
+
+
+class Delete(Request):
+
+ uri = 'repos/{user}/{repo}/issues/comments/{id}'
+ resource = Comment \ No newline at end of file