# Path: flask_github/client/requests.py
# class RepoResponse(msgs.Message):
#   response = msgs.MessageField('Repo', 1)
# 
# Path: flask_github/client/requests.py
# class RepoListResponse(msgs.Message):
#   response = msgs.MessageField('Repo', 1, repeated=True)


from ..requests import RepoResponse
from ..requests import RepoListResponse

from __future__ import unicode_literals

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

  def list(self, repo, sort=None, user=None):
    query = None
    if sort:
      query = {'sort': sort}
    return self.client.get('repos/%s/%s/forks' % (
      self.client.user(user), repo), query=query, msg_type=RepoListResponse)

  def create(self, repo, org=None, user=None):
    query = None
    if org:
      query = {'org': org}
    return self.client.post('repos/%s/%s/forks' % (

# Path: flask_github/client/requests.py
# class RepoResponse(msgs.Message):
#   response = msgs.MessageField('Repo', 1)
# 
# Path: flask_github/client/requests.py
# class RepoListResponse(msgs.Message):
#   response = msgs.MessageField('Repo', 1, repeated=True)


# Path: flask_github/client/repos/reposforks.py
from ..requests import RepoResponse
from ..requests import RepoListResponse

from __future__ import unicode_literals

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

  def list(self, repo, sort=None, user=None):
    query = None
    if sort:
      query = {'sort': sort}
    return self.client.get('repos/%s/%s/forks' % (
      self.client.user(user), repo), query=query, msg_type=RepoListResponse)

  def create(self, repo, org=None, user=None):
    query = None
    if org:
      query = {'org': org}
    return self.client.post('repos/%s/%s/forks' % (

      self.client.user(user), repo), query=query, msg_type=RepoResponse)
