aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/services/git_data/blobs.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygithub3/services/git_data/blobs.py')
-rw-r--r--pygithub3/services/git_data/blobs.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/pygithub3/services/git_data/blobs.py b/pygithub3/services/git_data/blobs.py
index 4f1a6e7..f6a2ff3 100644
--- a/pygithub3/services/git_data/blobs.py
+++ b/pygithub3/services/git_data/blobs.py
@@ -1,10 +1,10 @@
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
-from pygithub3.services.base import Service
+from pygithub3.services.base import Service, MimeTypeMixin
-class Blobs(Service):
+class Blobs(Service, MimeTypeMixin):
"""Consume `Blobs API <http://developer.github.com/v3/git/blobs/>`_"""
def get(self, sha, user=None, repo=None):
@@ -14,10 +14,12 @@ class Blobs(Service):
:param str user: Username
:param str repo: Repository
+ .. note::
+ Remember :ref:`config precedence`
"""
request = self.make_request('git_data.blobs.get', sha=sha,
- user=user, repo=repo)
- return self._get(request)
+ user=user, repo=repo)
+ return self._get(request, **self._get_mimetype_as_header())
def create(self, data, user=None, repo=None):
"""Create a blob
@@ -26,7 +28,9 @@ class Blobs(Service):
:param str user: Username
:param str repo: Repository
+ .. note::
+ Remember :ref:`config precedence`
"""
request = self.make_request('git_data.blobs.create', body=data,
- user=user, repo=repo)
+ user=user, repo=repo)
return self._post(request)