From a423c22a02c85ea16ae42c1b5a0a0a365eccd61c Mon Sep 17 00:00:00 2001 From: Antti Kaihola Date: Mon, 7 Nov 2011 14:38:32 +0200 Subject: _post_resource --- github3/api.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'github3/api.py') diff --git a/github3/api.py b/github3/api.py index 81ae3e7..78f87b3 100644 --- a/github3/api.py +++ b/github3/api.py @@ -105,6 +105,11 @@ class GithubCore(object): return msg + def _post_resource(self, resource, obj, data, **kwargs): + r = self._http_resource('POST', resource, data=data, params=kwargs) + item = self._resource_deserialize(r.content) + + return obj.new_from_dict(item, gh=self) @staticmethod def _total_pages_from_header(link_header): -- cgit v1.2.3-59-g8ed1b