From ce95f908d9153e7370185c4660b49f718d253f58 Mon Sep 17 00:00:00 2001 From: David Medina Date: Tue, 21 Feb 2012 01:24:06 +0100 Subject: Repos.downloads service done --- pygithub3/resources/repos.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'pygithub3/resources/repos.py') diff --git a/pygithub3/resources/repos.py b/pygithub3/resources/repos.py index de55b72..865f039 100644 --- a/pygithub3/resources/repos.py +++ b/pygithub3/resources/repos.py @@ -1,6 +1,8 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- +from collections import OrderedDict + from .base import Resource from .users import User from .orgs import Org @@ -100,3 +102,13 @@ class Branch(Resource): def __str__(self): return '' % getattr(self, 'name', '') + + +class Download(Resource): + + def ball_to_upload(self): + return OrderedDict({ + 'key': self.path, 'acl': self.acl, 'success_action_status': '201', + 'Filename': self.name, 'AWSAccessKeyId': self.accesskeyid, + 'Policy': self.policy, 'Signature': self.signature, + 'Content-Type': self.mime_type}) -- cgit v1.2.3-59-g8ed1b