# Path: flask_github/client/requests.py
# class RepoDownloadResponse(msgs.Message):
#   response = msgs.MessageField('RepoDownload', 1)
# 
# Path: flask_github/client/requests.py
# class RepoDownloadListResponse(msgs.Message):
#   response = msgs.MessageField('RepoDownload', 1, repeated=True)


import json
from ..requests import RepoDownloadResponse
from ..requests import RepoDownloadListResponse

from __future__ import unicode_literals

class ReposDownloads:
  def __init__(self, client):
    self.client = client

  def list(self, repo, user=None):
    return self.client.get(
      'repos/%s/%s/downloads' % (
        self.client.username(user), repo), msg_type=RepoDownloadListResponse)

  def get(self, repo, id, user=None):
    return self.client.get(
      'repos/%s/%s/downloads/%s' % (

# Path: flask_github/client/requests.py
# class RepoDownloadResponse(msgs.Message):
#   response = msgs.MessageField('RepoDownload', 1)
# 
# Path: flask_github/client/requests.py
# class RepoDownloadListResponse(msgs.Message):
#   response = msgs.MessageField('RepoDownload', 1, repeated=True)


# Path: flask_github/client/repos/reposdownloads.py
import json
from ..requests import RepoDownloadResponse
from ..requests import RepoDownloadListResponse

from __future__ import unicode_literals

class ReposDownloads:
  def __init__(self, client):
    self.client = client

  def list(self, repo, user=None):
    return self.client.get(
      'repos/%s/%s/downloads' % (
        self.client.username(user), repo), msg_type=RepoDownloadListResponse)

  def get(self, repo, id, user=None):
    return self.client.get(
      'repos/%s/%s/downloads/%s' % (

        self.client.username(user), repo, id), msg_type=RepoDownloadResponse)
