aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/requests/git_data/blobs.py
diff options
context:
space:
mode:
authorNat Williams <nwilliams@leapfrogonline.com>2012-04-13 17:06:09 -0500
committerNat Williams <nwilliams@leapfrogonline.com>2012-04-16 13:36:39 -0500
commit4ce1a90038b23d931858ad22815dbe29f74d7d98 (patch)
tree880428e5a6e23c472cfa14183884c0ac79bbf718 /pygithub3/requests/git_data/blobs.py
parent:sparkles: Release 0.3 :sparkles: (diff)
downloadpython-github3-4ce1a90038b23d931858ad22815dbe29f74d7d98.tar.xz
python-github3-4ce1a90038b23d931858ad22815dbe29f74d7d98.zip
add Git Data API support
Diffstat (limited to 'pygithub3/requests/git_data/blobs.py')
-rw-r--r--pygithub3/requests/git_data/blobs.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/pygithub3/requests/git_data/blobs.py b/pygithub3/requests/git_data/blobs.py
new file mode 100644
index 0000000..4a49c6b
--- /dev/null
+++ b/pygithub3/requests/git_data/blobs.py
@@ -0,0 +1,20 @@
+# -*- encoding: utf-8 -*-
+
+from pygithub3.requests.base import Request
+from pygithub3.resources.git_data import Blob
+
+
+class Get(Request):
+
+ uri = 'repos/{user}/{repo}/git/blobs/{sha}'
+ resource = Blob
+
+
+class Create(Request):
+
+ uri = 'repos/{user}/{repo}/git/blobs'
+ resource = Blob
+ body_schema = {
+ 'schema': ('content', 'encoding'),
+ 'required': ('content', 'encoding'), #TODO: is enc really required?
+ }