diff options
author | 2012-02-21 01:24:06 +0100 | |
---|---|---|
committer | 2012-02-21 01:24:06 +0100 | |
commit | ce95f908d9153e7370185c4660b49f718d253f58 (patch) | |
tree | d79bb9a645332883d5d45cd1ee14fb31ed2655de /pygithub3/requests/repos/downloads.py | |
parent | Add mimetype support to repos.commits service (diff) | |
download | python-github3-ce95f908d9153e7370185c4660b49f718d253f58.tar.xz python-github3-ce95f908d9153e7370185c4660b49f718d253f58.zip |
Repos.downloads service done
Diffstat (limited to 'pygithub3/requests/repos/downloads.py')
-rw-r--r-- | pygithub3/requests/repos/downloads.py | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/pygithub3/requests/repos/downloads.py b/pygithub3/requests/repos/downloads.py new file mode 100644 index 0000000..8a9dd91 --- /dev/null +++ b/pygithub3/requests/repos/downloads.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python +# -*- encoding: utf-8 -*- + +from . import Request + +from pygithub3.resources.repos import Download + + +class List(Request): + + uri = '/repos/{user}/{repo}/downloads' + resource = Download + + +class Get(Request): + + uri = '/repos/{user}/{repo}/downloads/{id}' + resource = Download + + +class Create(Request): + + uri = '/repos/{user}/{repo}/downloads' + resource = Download + body_schema = { + 'schema': ('name', 'size', 'description', 'content_type'), + 'required': ('name', 'size') + } + + +class Delete(Request): + + uri = '/repos/{user}/{repo}/downloads/{id}' + resource = Download |