aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/requests/issues/comments.py
diff options
context:
space:
mode:
authorDavid Medina <davidmedina9@gmail.com>2012-06-03 13:02:54 +0200
committerDavid Medina <davidmedina9@gmail.com>2012-06-03 13:02:54 +0200
commit897671db979e64754de2c53cbbe83fcbae37bb02 (patch)
tree11ac9ede303971d2bcaf270d833fd4112c923509 /pygithub3/requests/issues/comments.py
parentMerge 'services/orgs' (diff)
parentChange "Edit" to "Update" in docstring (diff)
downloadpython-github3-897671db979e64754de2c53cbbe83fcbae37bb02.tar.xz
python-github3-897671db979e64754de2c53cbbe83fcbae37bb02.zip
Merge branch 'services/issues' of https://github.com/alejandrogomez/python-github3 into services/issues
Conflicts: docs/services.rst pygithub3/github.py pygithub3/requests/repos/__init__.py
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..638c9cf
--- /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