aboutsummaryrefslogtreecommitdiffstats
path: root/github3/handlers/base.py
diff options
context:
space:
mode:
authorDavid Medina <davidmedina9@gmail.com>2011-11-08 11:29:24 +0100
committerDavid Medina <davidmedina9@gmail.com>2011-11-08 23:00:41 +0100
commit88f3b88a17408c312b74c82f5e869d8cf76591c2 (patch)
tree2ff91fa8d05904655adcd746dbfcc7dd0447d656 /github3/handlers/base.py
parentAbstract and decouple converters (diff)
downloadpython-github3-88f3b88a17408c312b74c82f5e869d8cf76591c2.tar.xz
python-github3-88f3b88a17408c312b74c82f5e869d8cf76591c2.zip
Added post_resource to handler
Diffstat (limited to 'github3/handlers/base.py')
-rw-r--r--github3/handlers/base.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/github3/handlers/base.py b/github3/handlers/base.py
index 858ca51..9e5a110 100644
--- a/github3/handlers/base.py
+++ b/github3/handlers/base.py
@@ -55,3 +55,10 @@ class Handler(object):
converter.inject(model)
return converter.loads(raw_resource)
+ def _post_resource(self, resource, data, model=None):
+ """ Handler request to create a resource """
+
+ raw_resource = self._gh.post(resource, data=data)
+ converter = self._get_converter()
+ converter.inject(model)
+ return converter.loads(raw_resource)