|
|
|
# coding: utf-8
|
|
|
|
|
|
|
|
"""
|
|
|
|
Gitea API.
|
|
|
|
|
|
|
|
This documentation describes the Gitea API. # noqa: E501
|
|
|
|
|
|
|
|
OpenAPI spec version: 1.1.1
|
|
|
|
|
|
|
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
from __future__ import absolute_import
|
|
|
|
|
|
|
|
import re # noqa: F401
|
|
|
|
|
|
|
|
# python 2 and python 3 compatibility library
|
|
|
|
import six
|
|
|
|
|
|
|
|
from swagger_client.api_client import ApiClient
|
|
|
|
|
|
|
|
|
|
|
|
class RepositoryApi(object):
|
|
|
|
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
|
|
|
|
|
|
Do not edit the class manually.
|
|
|
|
Ref: https://github.com/swagger-api/swagger-codegen
|
|
|
|
"""
|
|
|
|
|
|
|
|
def __init__(self, api_client=None):
|
|
|
|
if api_client is None:
|
|
|
|
api_client = ApiClient()
|
|
|
|
self.api_client = api_client
|
|
|
|
|
|
|
|
def create_current_user_repo(self, **kwargs): # noqa: E501
|
|
|
|
"""Create a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.create_current_user_repo(async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param CreateRepoOption body:
|
|
|
|
:return: Repository
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.create_current_user_repo_with_http_info(**kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.create_current_user_repo_with_http_info(**kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def create_current_user_repo_with_http_info(self, **kwargs): # noqa: E501
|
|
|
|
"""Create a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.create_current_user_repo_with_http_info(async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param CreateRepoOption body:
|
|
|
|
:return: Repository
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['body'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method create_current_user_repo" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
if 'body' in params:
|
|
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/user/repos', 'POST',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='Repository', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def create_fork(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Fork a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.create_fork(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo to fork (required)
|
|
|
|
:param str repo: name of the repo to fork (required)
|
|
|
|
:param CreateForkOption body:
|
|
|
|
:return: Repository
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.create_fork_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.create_fork_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def create_fork_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Fork a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.create_fork_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo to fork (required)
|
|
|
|
:param str repo: name of the repo to fork (required)
|
|
|
|
:param CreateForkOption body:
|
|
|
|
:return: Repository
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'body'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method create_fork" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `create_fork`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `create_fork`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
if 'body' in params:
|
|
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/forks', 'POST',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='Repository', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def get_tree(self, owner, repo, sha, **kwargs): # noqa: E501
|
|
|
|
"""Gets the tree of a repository. # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.get_tree(owner, repo, sha, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str sha: sha of the commit (required)
|
|
|
|
:param bool recursive: show all directories and files
|
|
|
|
:param int page: page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page
|
|
|
|
:param int per_page: number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE
|
|
|
|
:return: GitTreeResponse
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.get_tree_with_http_info(owner, repo, sha, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.get_tree_with_http_info(owner, repo, sha, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def get_tree_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501
|
|
|
|
"""Gets the tree of a repository. # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.get_tree_with_http_info(owner, repo, sha, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str sha: sha of the commit (required)
|
|
|
|
:param bool recursive: show all directories and files
|
|
|
|
:param int page: page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page
|
|
|
|
:param int per_page: number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE
|
|
|
|
:return: GitTreeResponse
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'sha', 'recursive', 'page', 'per_page'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method get_tree" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `get_tree`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `get_tree`") # noqa: E501
|
|
|
|
# verify the required parameter 'sha' is set
|
|
|
|
if ('sha' not in params or
|
|
|
|
params['sha'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `sha` when calling `get_tree`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'sha' in params:
|
|
|
|
path_params['sha'] = params['sha'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
if 'recursive' in params:
|
|
|
|
query_params.append(('recursive', params['recursive'])) # noqa: E501
|
|
|
|
if 'page' in params:
|
|
|
|
query_params.append(('page', params['page'])) # noqa: E501
|
|
|
|
if 'per_page' in params:
|
|
|
|
query_params.append(('per_page', params['per_page'])) # noqa: E501
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/git/trees/{sha}', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='GitTreeResponse', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def list_forks(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""List a repository's forks # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.list_forks(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: list[Repository]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.list_forks_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.list_forks_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def list_forks_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""List a repository's forks # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.list_forks_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: list[Repository]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method list_forks" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `list_forks`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `list_forks`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/forks', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='list[Repository]', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_add_collaborator(self, owner, repo, collaborator, **kwargs): # noqa: E501
|
|
|
|
"""Add a collaborator to a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_add_collaborator(owner, repo, collaborator, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str collaborator: username of the collaborator to add (required)
|
|
|
|
:param AddCollaboratorOption body:
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_add_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_add_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_add_collaborator_with_http_info(self, owner, repo, collaborator, **kwargs): # noqa: E501
|
|
|
|
"""Add a collaborator to a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_add_collaborator_with_http_info(owner, repo, collaborator, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str collaborator: username of the collaborator to add (required)
|
|
|
|
:param AddCollaboratorOption body:
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'collaborator', 'body'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_add_collaborator" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_add_collaborator`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_add_collaborator`") # noqa: E501
|
|
|
|
# verify the required parameter 'collaborator' is set
|
|
|
|
if ('collaborator' not in params or
|
|
|
|
params['collaborator'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `collaborator` when calling `repo_add_collaborator`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'collaborator' in params:
|
|
|
|
path_params['collaborator'] = params['collaborator'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
if 'body' in params:
|
|
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/collaborators/{collaborator}', 'PUT',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type=None, # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_check_collaborator(self, owner, repo, collaborator, **kwargs): # noqa: E501
|
|
|
|
"""Check if a user is a collaborator of a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_check_collaborator(owner, repo, collaborator, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str collaborator: username of the collaborator (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_check_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_check_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_check_collaborator_with_http_info(self, owner, repo, collaborator, **kwargs): # noqa: E501
|
|
|
|
"""Check if a user is a collaborator of a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_check_collaborator_with_http_info(owner, repo, collaborator, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str collaborator: username of the collaborator (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'collaborator'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_check_collaborator" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_check_collaborator`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_check_collaborator`") # noqa: E501
|
|
|
|
# verify the required parameter 'collaborator' is set
|
|
|
|
if ('collaborator' not in params or
|
|
|
|
params['collaborator'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `collaborator` when calling `repo_check_collaborator`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'collaborator' in params:
|
|
|
|
path_params['collaborator'] = params['collaborator'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/collaborators/{collaborator}', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type=None, # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_create_hook(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Create a hook # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_create_hook(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param CreateHookOption body:
|
|
|
|
:return: list[Branch]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_create_hook_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_create_hook_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_create_hook_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Create a hook # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_create_hook_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param CreateHookOption body:
|
|
|
|
:return: list[Branch]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'body'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_create_hook" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_create_hook`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_create_hook`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
if 'body' in params:
|
|
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/hooks', 'POST',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='list[Branch]', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_create_key(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Add a key to a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_create_key(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param CreateKeyOption body:
|
|
|
|
:return: DeployKey
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_create_key_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_create_key_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_create_key_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Add a key to a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_create_key_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param CreateKeyOption body:
|
|
|
|
:return: DeployKey
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'body'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_create_key" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_create_key`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_create_key`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
if 'body' in params:
|
|
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/keys', 'POST',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='DeployKey', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_create_pull_request(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Create a pull request # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_create_pull_request(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param CreatePullRequestOption body:
|
|
|
|
:return: PullRequest
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_create_pull_request_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_create_pull_request_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_create_pull_request_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Create a pull request # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_create_pull_request_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param CreatePullRequestOption body:
|
|
|
|
:return: PullRequest
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'body'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_create_pull_request" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_create_pull_request`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_create_pull_request`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
if 'body' in params:
|
|
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/pulls', 'POST',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='PullRequest', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_create_release(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Create a release # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_create_release(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param CreateReleaseOption body:
|
|
|
|
:return: Release
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_create_release_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_create_release_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_create_release_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Create a release # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_create_release_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param CreateReleaseOption body:
|
|
|
|
:return: Release
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'body'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_create_release" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_create_release`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_create_release`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
if 'body' in params:
|
|
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/releases', 'POST',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='Release', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_create_release_attachment(self, owner, repo, id, attachment, **kwargs): # noqa: E501
|
|
|
|
"""Create a release attachment # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_create_release_attachment(owner, repo, id, attachment, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the release (required)
|
|
|
|
:param file attachment: attachment to upload (required)
|
|
|
|
:param str name: name of the attachment
|
|
|
|
:return: Attachment
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_create_release_attachment_with_http_info(owner, repo, id, attachment, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_create_release_attachment_with_http_info(owner, repo, id, attachment, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_create_release_attachment_with_http_info(self, owner, repo, id, attachment, **kwargs): # noqa: E501
|
|
|
|
"""Create a release attachment # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_create_release_attachment_with_http_info(owner, repo, id, attachment, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the release (required)
|
|
|
|
:param file attachment: attachment to upload (required)
|
|
|
|
:param str name: name of the attachment
|
|
|
|
:return: Attachment
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'id', 'attachment', 'name'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_create_release_attachment" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_create_release_attachment`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_create_release_attachment`") # noqa: E501
|
|
|
|
# verify the required parameter 'id' is set
|
|
|
|
if ('id' not in params or
|
|
|
|
params['id'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `id` when calling `repo_create_release_attachment`") # noqa: E501
|
|
|
|
# verify the required parameter 'attachment' is set
|
|
|
|
if ('attachment' not in params or
|
|
|
|
params['attachment'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `attachment` when calling `repo_create_release_attachment`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'id' in params:
|
|
|
|
path_params['id'] = params['id'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
if 'name' in params:
|
|
|
|
query_params.append(('name', params['name'])) # noqa: E501
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
if 'attachment' in params:
|
|
|
|
local_var_files['attachment'] = params['attachment'] # noqa: E501
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['multipart/form-data']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/releases/{id}/assets', 'POST',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='Attachment', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_create_status(self, owner, repo, sha, **kwargs): # noqa: E501
|
|
|
|
"""Create a commit status # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_create_status(owner, repo, sha, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str sha: sha of the commit (required)
|
|
|
|
:param CreateStatusOption body:
|
|
|
|
:return: list[Status]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_create_status_with_http_info(owner, repo, sha, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_create_status_with_http_info(owner, repo, sha, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_create_status_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501
|
|
|
|
"""Create a commit status # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_create_status_with_http_info(owner, repo, sha, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str sha: sha of the commit (required)
|
|
|
|
:param CreateStatusOption body:
|
|
|
|
:return: list[Status]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'sha', 'body'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_create_status" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_create_status`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_create_status`") # noqa: E501
|
|
|
|
# verify the required parameter 'sha' is set
|
|
|
|
if ('sha' not in params or
|
|
|
|
params['sha'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `sha` when calling `repo_create_status`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'sha' in params:
|
|
|
|
path_params['sha'] = params['sha'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
if 'body' in params:
|
|
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/statuses/{sha}', 'POST',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='list[Status]', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_delete(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Delete a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_delete(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo to delete (required)
|
|
|
|
:param str repo: name of the repo to delete (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_delete_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_delete_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_delete_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Delete a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_delete_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo to delete (required)
|
|
|
|
:param str repo: name of the repo to delete (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_delete" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_delete`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_delete`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}', 'DELETE',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type=None, # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_delete_collaborator(self, owner, repo, collaborator, **kwargs): # noqa: E501
|
|
|
|
"""Delete a collaborator from a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_delete_collaborator(owner, repo, collaborator, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str collaborator: username of the collaborator to delete (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_delete_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_delete_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_delete_collaborator_with_http_info(self, owner, repo, collaborator, **kwargs): # noqa: E501
|
|
|
|
"""Delete a collaborator from a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_delete_collaborator_with_http_info(owner, repo, collaborator, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str collaborator: username of the collaborator to delete (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'collaborator'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_delete_collaborator" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_delete_collaborator`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_delete_collaborator`") # noqa: E501
|
|
|
|
# verify the required parameter 'collaborator' is set
|
|
|
|
if ('collaborator' not in params or
|
|
|
|
params['collaborator'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `collaborator` when calling `repo_delete_collaborator`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'collaborator' in params:
|
|
|
|
path_params['collaborator'] = params['collaborator'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/collaborators/{collaborator}', 'DELETE',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type=None, # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_delete_hook(self, owner, repo, id, **kwargs): # noqa: E501
|
|
|
|
"""Delete a hook in a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_delete_hook(owner, repo, id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the hook to delete (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_delete_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_delete_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_delete_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501
|
|
|
|
"""Delete a hook in a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_delete_hook_with_http_info(owner, repo, id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the hook to delete (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'id'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_delete_hook" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_delete_hook`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_delete_hook`") # noqa: E501
|
|
|
|
# verify the required parameter 'id' is set
|
|
|
|
if ('id' not in params or
|
|
|
|
params['id'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `id` when calling `repo_delete_hook`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'id' in params:
|
|
|
|
path_params['id'] = params['id'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/hooks/{id}', 'DELETE',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type=None, # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_delete_key(self, owner, repo, id, **kwargs): # noqa: E501
|
|
|
|
"""Delete a key from a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_delete_key(owner, repo, id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the key to delete (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_delete_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_delete_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_delete_key_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501
|
|
|
|
"""Delete a key from a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_delete_key_with_http_info(owner, repo, id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the key to delete (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'id'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_delete_key" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_delete_key`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_delete_key`") # noqa: E501
|
|
|
|
# verify the required parameter 'id' is set
|
|
|
|
if ('id' not in params or
|
|
|
|
params['id'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `id` when calling `repo_delete_key`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'id' in params:
|
|
|
|
path_params['id'] = params['id'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json', 'text/html']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/keys/{id}', 'DELETE',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type=None, # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_delete_release(self, owner, repo, id, **kwargs): # noqa: E501
|
|
|
|
"""Delete a release # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_delete_release(owner, repo, id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the release to delete (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_delete_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_delete_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_delete_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501
|
|
|
|
"""Delete a release # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_delete_release_with_http_info(owner, repo, id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the release to delete (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'id'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_delete_release" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_delete_release`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_delete_release`") # noqa: E501
|
|
|
|
# verify the required parameter 'id' is set
|
|
|
|
if ('id' not in params or
|
|
|
|
params['id'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `id` when calling `repo_delete_release`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'id' in params:
|
|
|
|
path_params['id'] = params['id'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json', 'text/html']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/releases/{id}', 'DELETE',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type=None, # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_delete_release_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501
|
|
|
|
"""Delete a release attachment # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_delete_release_attachment(owner, repo, id, attachment_id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the release (required)
|
|
|
|
:param int attachment_id: id of the attachment to delete (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_delete_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_delete_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_delete_release_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501
|
|
|
|
"""Delete a release attachment # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_delete_release_attachment_with_http_info(owner, repo, id, attachment_id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the release (required)
|
|
|
|
:param int attachment_id: id of the attachment to delete (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'id', 'attachment_id'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_delete_release_attachment" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_delete_release_attachment`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_delete_release_attachment`") # noqa: E501
|
|
|
|
# verify the required parameter 'id' is set
|
|
|
|
if ('id' not in params or
|
|
|
|
params['id'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `id` when calling `repo_delete_release_attachment`") # noqa: E501
|
|
|
|
# verify the required parameter 'attachment_id' is set
|
|
|
|
if ('attachment_id' not in params or
|
|
|
|
params['attachment_id'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `attachment_id` when calling `repo_delete_release_attachment`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'id' in params:
|
|
|
|
path_params['id'] = params['id'] # noqa: E501
|
|
|
|
if 'attachment_id' in params:
|
|
|
|
path_params['attachment_id'] = params['attachment_id'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}', 'DELETE',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type=None, # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_edit_hook(self, owner, repo, id, **kwargs): # noqa: E501
|
|
|
|
"""Edit a hook in a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_edit_hook(owner, repo, id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: index of the hook (required)
|
|
|
|
:param EditHookOption body:
|
|
|
|
:return: list[Branch]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_edit_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_edit_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_edit_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501
|
|
|
|
"""Edit a hook in a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_edit_hook_with_http_info(owner, repo, id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: index of the hook (required)
|
|
|
|
:param EditHookOption body:
|
|
|
|
:return: list[Branch]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'id', 'body'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_edit_hook" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_edit_hook`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_edit_hook`") # noqa: E501
|
|
|
|
# verify the required parameter 'id' is set
|
|
|
|
if ('id' not in params or
|
|
|
|
params['id'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `id` when calling `repo_edit_hook`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'id' in params:
|
|
|
|
path_params['id'] = params['id'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
if 'body' in params:
|
|
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/hooks/{id}', 'PATCH',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='list[Branch]', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_edit_pull_request(self, owner, repo, index, **kwargs): # noqa: E501
|
|
|
|
"""Update a pull request # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_edit_pull_request(owner, repo, index, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int index: index of the pull request to edit (required)
|
|
|
|
:param EditPullRequestOption body:
|
|
|
|
:return: PullRequest
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_edit_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_edit_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_edit_pull_request_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501
|
|
|
|
"""Update a pull request # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_edit_pull_request_with_http_info(owner, repo, index, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int index: index of the pull request to edit (required)
|
|
|
|
:param EditPullRequestOption body:
|
|
|
|
:return: PullRequest
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'index', 'body'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_edit_pull_request" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_edit_pull_request`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_edit_pull_request`") # noqa: E501
|
|
|
|
# verify the required parameter 'index' is set
|
|
|
|
if ('index' not in params or
|
|
|
|
params['index'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `index` when calling `repo_edit_pull_request`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'index' in params:
|
|
|
|
path_params['index'] = params['index'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
if 'body' in params:
|
|
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/pulls/{index}', 'PATCH',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='PullRequest', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_edit_release(self, owner, repo, id, **kwargs): # noqa: E501
|
|
|
|
"""Update a release # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_edit_release(owner, repo, id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the release to edit (required)
|
|
|
|
:param EditReleaseOption body:
|
|
|
|
:return: Release
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_edit_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_edit_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_edit_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501
|
|
|
|
"""Update a release # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_edit_release_with_http_info(owner, repo, id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the release to edit (required)
|
|
|
|
:param EditReleaseOption body:
|
|
|
|
:return: Release
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'id', 'body'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_edit_release" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_edit_release`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_edit_release`") # noqa: E501
|
|
|
|
# verify the required parameter 'id' is set
|
|
|
|
if ('id' not in params or
|
|
|
|
params['id'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `id` when calling `repo_edit_release`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'id' in params:
|
|
|
|
path_params['id'] = params['id'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
if 'body' in params:
|
|
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/releases/{id}', 'PATCH',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='Release', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_edit_release_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501
|
|
|
|
"""Edit a release attachment # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_edit_release_attachment(owner, repo, id, attachment_id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the release (required)
|
|
|
|
:param int attachment_id: id of the attachment to edit (required)
|
|
|
|
:param EditAttachmentOptions body:
|
|
|
|
:return: Attachment
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_edit_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_edit_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_edit_release_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501
|
|
|
|
"""Edit a release attachment # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_edit_release_attachment_with_http_info(owner, repo, id, attachment_id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the release (required)
|
|
|
|
:param int attachment_id: id of the attachment to edit (required)
|
|
|
|
:param EditAttachmentOptions body:
|
|
|
|
:return: Attachment
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'id', 'attachment_id', 'body'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_edit_release_attachment" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_edit_release_attachment`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_edit_release_attachment`") # noqa: E501
|
|
|
|
# verify the required parameter 'id' is set
|
|
|
|
if ('id' not in params or
|
|
|
|
params['id'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `id` when calling `repo_edit_release_attachment`") # noqa: E501
|
|
|
|
# verify the required parameter 'attachment_id' is set
|
|
|
|
if ('attachment_id' not in params or
|
|
|
|
params['attachment_id'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `attachment_id` when calling `repo_edit_release_attachment`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'id' in params:
|
|
|
|
path_params['id'] = params['id'] # noqa: E501
|
|
|
|
if 'attachment_id' in params:
|
|
|
|
path_params['attachment_id'] = params['attachment_id'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
if 'body' in params:
|
|
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}', 'PATCH',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='Attachment', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_get(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Get a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: Repository
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_get_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_get_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_get_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Get a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: Repository
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_get" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_get`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_get`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='Repository', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_get_archive(self, owner, repo, archive, **kwargs): # noqa: E501
|
|
|
|
"""Get an archive of a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_archive(owner, repo, archive, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str archive: archive to download, consisting of a git reference and archive (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_get_archive_with_http_info(owner, repo, archive, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_get_archive_with_http_info(owner, repo, archive, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_get_archive_with_http_info(self, owner, repo, archive, **kwargs): # noqa: E501
|
|
|
|
"""Get an archive of a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_archive_with_http_info(owner, repo, archive, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str archive: archive to download, consisting of a git reference and archive (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'archive'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_get_archive" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_get_archive`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_get_archive`") # noqa: E501
|
|
|
|
# verify the required parameter 'archive' is set
|
|
|
|
if ('archive' not in params or
|
|
|
|
params['archive'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `archive` when calling `repo_get_archive`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'archive' in params:
|
|
|
|
path_params['archive'] = params['archive'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/archive/{archive}', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type=None, # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_get_branch(self, owner, repo, branch, **kwargs): # noqa: E501
|
|
|
|
"""Retrieve a specific branch from a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_branch(owner, repo, branch, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str branch: branch to get (required)
|
|
|
|
:return: Branch
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_get_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_get_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_get_branch_with_http_info(self, owner, repo, branch, **kwargs): # noqa: E501
|
|
|
|
"""Retrieve a specific branch from a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_branch_with_http_info(owner, repo, branch, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str branch: branch to get (required)
|
|
|
|
:return: Branch
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'branch'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_get_branch" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_get_branch`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_get_branch`") # noqa: E501
|
|
|
|
# verify the required parameter 'branch' is set
|
|
|
|
if ('branch' not in params or
|
|
|
|
params['branch'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `branch` when calling `repo_get_branch`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'branch' in params:
|
|
|
|
path_params['branch'] = params['branch'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/branches/{branch}', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='Branch', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_get_by_id(self, id, **kwargs): # noqa: E501
|
|
|
|
"""Get a repository by id # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_by_id(id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param int id: id of the repo to get (required)
|
|
|
|
:return: Repository
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_get_by_id_with_http_info(id, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_get_by_id_with_http_info(id, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_get_by_id_with_http_info(self, id, **kwargs): # noqa: E501
|
|
|
|
"""Get a repository by id # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_by_id_with_http_info(id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param int id: id of the repo to get (required)
|
|
|
|
:return: Repository
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['id'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_get_by_id" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'id' is set
|
|
|
|
if ('id' not in params or
|
|
|
|
params['id'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `id` when calling `repo_get_by_id`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'id' in params:
|
|
|
|
path_params['id'] = params['id'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repositories/{id}', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='Repository', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_get_combined_status_by_ref(self, owner, repo, ref, **kwargs): # noqa: E501
|
|
|
|
"""Get a commit's combined status, by branch/tag/commit reference # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_combined_status_by_ref(owner, repo, ref, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str ref: name of branch/tag/commit (required)
|
|
|
|
:return: Status
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_get_combined_status_by_ref_with_http_info(owner, repo, ref, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_get_combined_status_by_ref_with_http_info(owner, repo, ref, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_get_combined_status_by_ref_with_http_info(self, owner, repo, ref, **kwargs): # noqa: E501
|
|
|
|
"""Get a commit's combined status, by branch/tag/commit reference # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_combined_status_by_ref_with_http_info(owner, repo, ref, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str ref: name of branch/tag/commit (required)
|
|
|
|
:return: Status
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'ref'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_get_combined_status_by_ref" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_get_combined_status_by_ref`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_get_combined_status_by_ref`") # noqa: E501
|
|
|
|
# verify the required parameter 'ref' is set
|
|
|
|
if ('ref' not in params or
|
|
|
|
params['ref'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `ref` when calling `repo_get_combined_status_by_ref`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'ref' in params:
|
|
|
|
path_params['ref'] = params['ref'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/commits/{ref}/statuses', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='Status', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_get_editor_config(self, owner, repo, filepath, **kwargs): # noqa: E501
|
|
|
|
"""Get the EditorConfig definitions of a file in a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_editor_config(owner, repo, filepath, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str filepath: filepath of file to get (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_get_editor_config_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_get_editor_config_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_get_editor_config_with_http_info(self, owner, repo, filepath, **kwargs): # noqa: E501
|
|
|
|
"""Get the EditorConfig definitions of a file in a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_editor_config_with_http_info(owner, repo, filepath, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str filepath: filepath of file to get (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'filepath'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_get_editor_config" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_get_editor_config`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_get_editor_config`") # noqa: E501
|
|
|
|
# verify the required parameter 'filepath' is set
|
|
|
|
if ('filepath' not in params or
|
|
|
|
params['filepath'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `filepath` when calling `repo_get_editor_config`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'filepath' in params:
|
|
|
|
path_params['filepath'] = params['filepath'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/editorconfig/{filepath}', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type=None, # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_get_hook(self, owner, repo, id, **kwargs): # noqa: E501
|
|
|
|
"""Get a hook # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_hook(owner, repo, id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the hook to get (required)
|
|
|
|
:return: list[Branch]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_get_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_get_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_get_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501
|
|
|
|
"""Get a hook # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_hook_with_http_info(owner, repo, id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the hook to get (required)
|
|
|
|
:return: list[Branch]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'id'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_get_hook" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_get_hook`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_get_hook`") # noqa: E501
|
|
|
|
# verify the required parameter 'id' is set
|
|
|
|
if ('id' not in params or
|
|
|
|
params['id'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `id` when calling `repo_get_hook`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'id' in params:
|
|
|
|
path_params['id'] = params['id'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/hooks/{id}', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='list[Branch]', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_get_key(self, owner, repo, id, **kwargs): # noqa: E501
|
|
|
|
"""Get a repository's key by id # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_key(owner, repo, id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the key to get (required)
|
|
|
|
:return: DeployKey
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_get_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_get_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_get_key_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501
|
|
|
|
"""Get a repository's key by id # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_key_with_http_info(owner, repo, id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the key to get (required)
|
|
|
|
:return: DeployKey
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'id'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_get_key" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_get_key`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_get_key`") # noqa: E501
|
|
|
|
# verify the required parameter 'id' is set
|
|
|
|
if ('id' not in params or
|
|
|
|
params['id'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `id` when calling `repo_get_key`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'id' in params:
|
|
|
|
path_params['id'] = params['id'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/keys/{id}', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='DeployKey', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_get_pull_request(self, owner, repo, index, **kwargs): # noqa: E501
|
|
|
|
"""Get a pull request # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_pull_request(owner, repo, index, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int index: index of the pull request to get (required)
|
|
|
|
:return: PullRequest
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_get_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_get_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_get_pull_request_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501
|
|
|
|
"""Get a pull request # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_pull_request_with_http_info(owner, repo, index, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int index: index of the pull request to get (required)
|
|
|
|
:return: PullRequest
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'index'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_get_pull_request" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_request`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_request`") # noqa: E501
|
|
|
|
# verify the required parameter 'index' is set
|
|
|
|
if ('index' not in params or
|
|
|
|
params['index'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `index` when calling `repo_get_pull_request`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'index' in params:
|
|
|
|
path_params['index'] = params['index'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/pulls/{index}', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='PullRequest', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_get_raw_file(self, owner, repo, filepath, **kwargs): # noqa: E501
|
|
|
|
"""Get a file from a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_raw_file(owner, repo, filepath, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str filepath: filepath of the file to get (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_get_raw_file_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_get_raw_file_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_get_raw_file_with_http_info(self, owner, repo, filepath, **kwargs): # noqa: E501
|
|
|
|
"""Get a file from a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_raw_file_with_http_info(owner, repo, filepath, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str filepath: filepath of the file to get (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'filepath'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_get_raw_file" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_get_raw_file`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_get_raw_file`") # noqa: E501
|
|
|
|
# verify the required parameter 'filepath' is set
|
|
|
|
if ('filepath' not in params or
|
|
|
|
params['filepath'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `filepath` when calling `repo_get_raw_file`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'filepath' in params:
|
|
|
|
path_params['filepath'] = params['filepath'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/raw/{filepath}', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type=None, # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_get_release(self, owner, repo, id, **kwargs): # noqa: E501
|
|
|
|
"""Get a release # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_release(owner, repo, id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the release to get (required)
|
|
|
|
:return: Release
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_get_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_get_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_get_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501
|
|
|
|
"""Get a release # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_release_with_http_info(owner, repo, id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the release to get (required)
|
|
|
|
:return: Release
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'id'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_get_release" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_get_release`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_get_release`") # noqa: E501
|
|
|
|
# verify the required parameter 'id' is set
|
|
|
|
if ('id' not in params or
|
|
|
|
params['id'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `id` when calling `repo_get_release`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'id' in params:
|
|
|
|
path_params['id'] = params['id'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/releases/{id}', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='Release', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_get_release_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501
|
|
|
|
"""Get a release attachment # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_release_attachment(owner, repo, id, attachment_id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the release (required)
|
|
|
|
:param int attachment_id: id of the attachment to get (required)
|
|
|
|
:return: Attachment
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_get_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_get_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_get_release_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501
|
|
|
|
"""Get a release attachment # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_release_attachment_with_http_info(owner, repo, id, attachment_id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the release (required)
|
|
|
|
:param int attachment_id: id of the attachment to get (required)
|
|
|
|
:return: Attachment
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'id', 'attachment_id'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_get_release_attachment" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_get_release_attachment`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_get_release_attachment`") # noqa: E501
|
|
|
|
# verify the required parameter 'id' is set
|
|
|
|
if ('id' not in params or
|
|
|
|
params['id'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `id` when calling `repo_get_release_attachment`") # noqa: E501
|
|
|
|
# verify the required parameter 'attachment_id' is set
|
|
|
|
if ('attachment_id' not in params or
|
|
|
|
params['attachment_id'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `attachment_id` when calling `repo_get_release_attachment`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'id' in params:
|
|
|
|
path_params['id'] = params['id'] # noqa: E501
|
|
|
|
if 'attachment_id' in params:
|
|
|
|
path_params['attachment_id'] = params['attachment_id'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='Attachment', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_get_single_commit(self, owner, repo, sha, **kwargs): # noqa: E501
|
|
|
|
"""Get a single commit from a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_single_commit(owner, repo, sha, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str sha: the commit hash (required)
|
|
|
|
:return: Commit
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_get_single_commit_with_http_info(owner, repo, sha, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_get_single_commit_with_http_info(owner, repo, sha, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_get_single_commit_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501
|
|
|
|
"""Get a single commit from a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_get_single_commit_with_http_info(owner, repo, sha, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str sha: the commit hash (required)
|
|
|
|
:return: Commit
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'sha'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_get_single_commit" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_get_single_commit`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_get_single_commit`") # noqa: E501
|
|
|
|
# verify the required parameter 'sha' is set
|
|
|
|
if ('sha' not in params or
|
|
|
|
params['sha'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `sha` when calling `repo_get_single_commit`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'sha' in params:
|
|
|
|
path_params['sha'] = params['sha'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/git/commits/{sha}', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='Commit', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_list_all_git_refs(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Get specified ref or filtered repository's refs # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_all_git_refs(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: list[Reference]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_list_all_git_refs_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_list_all_git_refs_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_list_all_git_refs_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Get specified ref or filtered repository's refs # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_all_git_refs_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: list[Reference]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_list_all_git_refs" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_list_all_git_refs`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_list_all_git_refs`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/git/refs', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='list[Reference]', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_list_branches(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""List a repository's branches # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_branches(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: list[Branch]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_list_branches_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_list_branches_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_list_branches_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""List a repository's branches # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_branches_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: list[Branch]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_list_branches" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_list_branches`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_list_branches`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/branches', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='list[Branch]', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_list_collaborators(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""List a repository's collaborators # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_collaborators(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: list[User]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_list_collaborators_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_list_collaborators_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_list_collaborators_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""List a repository's collaborators # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_collaborators_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: list[User]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_list_collaborators" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_list_collaborators`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_list_collaborators`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/collaborators', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='list[User]', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_list_git_refs(self, owner, repo, ref, **kwargs): # noqa: E501
|
|
|
|
"""Get specified ref or filtered repository's refs # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_git_refs(owner, repo, ref, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str ref: part or full name of the ref (required)
|
|
|
|
:return: list[Reference]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_list_git_refs_with_http_info(owner, repo, ref, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_list_git_refs_with_http_info(owner, repo, ref, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_list_git_refs_with_http_info(self, owner, repo, ref, **kwargs): # noqa: E501
|
|
|
|
"""Get specified ref or filtered repository's refs # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_git_refs_with_http_info(owner, repo, ref, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str ref: part or full name of the ref (required)
|
|
|
|
:return: list[Reference]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'ref'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_list_git_refs" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_list_git_refs`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_list_git_refs`") # noqa: E501
|
|
|
|
# verify the required parameter 'ref' is set
|
|
|
|
if ('ref' not in params or
|
|
|
|
params['ref'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `ref` when calling `repo_list_git_refs`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'ref' in params:
|
|
|
|
path_params['ref'] = params['ref'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/git/refs/{ref}', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='list[Reference]', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_list_hooks(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""List the hooks in a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_hooks(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: list[Branch]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_list_hooks_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_list_hooks_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_list_hooks_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""List the hooks in a repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_hooks_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: list[Branch]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_list_hooks" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_list_hooks`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_list_hooks`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/hooks', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='list[Branch]', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_list_keys(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""List a repository's keys # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_keys(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int key_id: the key_id to search for
|
|
|
|
:param str fingerprint: fingerprint of the key
|
|
|
|
:return: list[DeployKey]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_list_keys_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_list_keys_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_list_keys_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""List a repository's keys # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_keys_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int key_id: the key_id to search for
|
|
|
|
:param str fingerprint: fingerprint of the key
|
|
|
|
:return: list[DeployKey]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'key_id', 'fingerprint'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_list_keys" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_list_keys`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_list_keys`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
if 'key_id' in params:
|
|
|
|
query_params.append(('key_id', params['key_id'])) # noqa: E501
|
|
|
|
if 'fingerprint' in params:
|
|
|
|
query_params.append(('fingerprint', params['fingerprint'])) # noqa: E501
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/keys', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='list[DeployKey]', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_list_pull_requests(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""List a repo's pull requests # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_pull_requests(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int page: Page number
|
|
|
|
:param str state: State of pull request: open or closed (optional)
|
|
|
|
:param str sort: Type of sort
|
|
|
|
:param int milestone: ID of the milestone
|
|
|
|
:param list[int] labels: Label IDs
|
|
|
|
:return: list[PullRequest]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_list_pull_requests_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_list_pull_requests_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_list_pull_requests_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""List a repo's pull requests # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_pull_requests_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int page: Page number
|
|
|
|
:param str state: State of pull request: open or closed (optional)
|
|
|
|
:param str sort: Type of sort
|
|
|
|
:param int milestone: ID of the milestone
|
|
|
|
:param list[int] labels: Label IDs
|
|
|
|
:return: list[PullRequest]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'page', 'state', 'sort', 'milestone', 'labels'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_list_pull_requests" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_list_pull_requests`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_list_pull_requests`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
if 'page' in params:
|
|
|
|
query_params.append(('page', params['page'])) # noqa: E501
|
|
|
|
if 'state' in params:
|
|
|
|
query_params.append(('state', params['state'])) # noqa: E501
|
|
|
|
if 'sort' in params:
|
|
|
|
query_params.append(('sort', params['sort'])) # noqa: E501
|
|
|
|
if 'milestone' in params:
|
|
|
|
query_params.append(('milestone', params['milestone'])) # noqa: E501
|
|
|
|
if 'labels' in params:
|
|
|
|
query_params.append(('labels', params['labels'])) # noqa: E501
|
|
|
|
collection_formats['labels'] = 'multi' # noqa: E501
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/pulls', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='list[PullRequest]', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_list_release_attachments(self, owner, repo, id, **kwargs): # noqa: E501
|
|
|
|
"""List release's attachments # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_release_attachments(owner, repo, id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the release (required)
|
|
|
|
:return: list[Attachment]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_list_release_attachments_with_http_info(owner, repo, id, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_list_release_attachments_with_http_info(owner, repo, id, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_list_release_attachments_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501
|
|
|
|
"""List release's attachments # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_release_attachments_with_http_info(owner, repo, id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the release (required)
|
|
|
|
:return: list[Attachment]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'id'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_list_release_attachments" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_list_release_attachments`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_list_release_attachments`") # noqa: E501
|
|
|
|
# verify the required parameter 'id' is set
|
|
|
|
if ('id' not in params or
|
|
|
|
params['id'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `id` when calling `repo_list_release_attachments`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'id' in params:
|
|
|
|
path_params['id'] = params['id'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/releases/{id}/assets', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='list[Attachment]', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_list_releases(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""List a repo's releases # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_releases(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int page: page wants to load
|
|
|
|
:param int per_page: items count every page wants to load
|
|
|
|
:return: list[Release]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_list_releases_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_list_releases_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_list_releases_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""List a repo's releases # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_releases_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int page: page wants to load
|
|
|
|
:param int per_page: items count every page wants to load
|
|
|
|
:return: list[Release]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'page', 'per_page'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_list_releases" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_list_releases`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_list_releases`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
if 'page' in params:
|
|
|
|
query_params.append(('page', params['page'])) # noqa: E501
|
|
|
|
if 'per_page' in params:
|
|
|
|
query_params.append(('per_page', params['per_page'])) # noqa: E501
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/releases', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='list[Release]', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_list_stargazers(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""List a repo's stargazers # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_stargazers(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: list[User]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_list_stargazers_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_list_stargazers_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_list_stargazers_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""List a repo's stargazers # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_stargazers_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: list[User]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_list_stargazers" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_list_stargazers`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_list_stargazers`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/stargazers', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='list[User]', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_list_statuses(self, owner, repo, sha, **kwargs): # noqa: E501
|
|
|
|
"""Get a commit's statuses # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_statuses(owner, repo, sha, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str sha: sha of the commit (required)
|
|
|
|
:return: list[Status]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_list_statuses_with_http_info(owner, repo, sha, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_list_statuses_with_http_info(owner, repo, sha, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_list_statuses_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501
|
|
|
|
"""Get a commit's statuses # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_statuses_with_http_info(owner, repo, sha, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param str sha: sha of the commit (required)
|
|
|
|
:return: list[Status]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'sha'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_list_statuses" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_list_statuses`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_list_statuses`") # noqa: E501
|
|
|
|
# verify the required parameter 'sha' is set
|
|
|
|
if ('sha' not in params or
|
|
|
|
params['sha'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `sha` when calling `repo_list_statuses`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'sha' in params:
|
|
|
|
path_params['sha'] = params['sha'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/statuses/{sha}', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='list[Status]', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_list_subscribers(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""List a repo's watchers # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_subscribers(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: list[User]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_list_subscribers_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_list_subscribers_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_list_subscribers_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""List a repo's watchers # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_subscribers_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: list[User]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_list_subscribers" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_list_subscribers`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_list_subscribers`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/subscribers', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='list[User]', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_list_tags(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""List a repository's tags # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_tags(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: list[Tag]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_list_tags_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_list_tags_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_list_tags_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""List a repository's tags # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_list_tags_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: list[Tag]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_list_tags" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_list_tags`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_list_tags`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/tags', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='list[Tag]', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_merge_pull_request(self, owner, repo, index, **kwargs): # noqa: E501
|
|
|
|
"""Merge a pull request # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_merge_pull_request(owner, repo, index, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int index: index of the pull request to merge (required)
|
|
|
|
:param MergePullRequestOption body:
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_merge_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_merge_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_merge_pull_request_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501
|
|
|
|
"""Merge a pull request # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_merge_pull_request_with_http_info(owner, repo, index, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int index: index of the pull request to merge (required)
|
|
|
|
:param MergePullRequestOption body:
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'index', 'body'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_merge_pull_request" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_merge_pull_request`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_merge_pull_request`") # noqa: E501
|
|
|
|
# verify the required parameter 'index' is set
|
|
|
|
if ('index' not in params or
|
|
|
|
params['index'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `index` when calling `repo_merge_pull_request`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'index' in params:
|
|
|
|
path_params['index'] = params['index'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
if 'body' in params:
|
|
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/pulls/{index}/merge', 'POST',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type=None, # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_migrate(self, **kwargs): # noqa: E501
|
|
|
|
"""Migrate a remote git repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_migrate(async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param MigrateRepoForm body:
|
|
|
|
:return: Repository
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_migrate_with_http_info(**kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_migrate_with_http_info(**kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_migrate_with_http_info(self, **kwargs): # noqa: E501
|
|
|
|
"""Migrate a remote git repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_migrate_with_http_info(async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param MigrateRepoForm body:
|
|
|
|
:return: Repository
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['body'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_migrate" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
if 'body' in params:
|
|
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/migrate', 'POST',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='Repository', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_mirror_sync(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Sync a mirrored repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_mirror_sync(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo to sync (required)
|
|
|
|
:param str repo: name of the repo to sync (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_mirror_sync_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_mirror_sync_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_mirror_sync_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Sync a mirrored repository # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_mirror_sync_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo to sync (required)
|
|
|
|
:param str repo: name of the repo to sync (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_mirror_sync" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_mirror_sync`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_mirror_sync`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/mirror-sync', 'POST',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type=None, # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_pull_request_is_merged(self, owner, repo, index, **kwargs): # noqa: E501
|
|
|
|
"""Check if a pull request has been merged # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_pull_request_is_merged(owner, repo, index, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int index: index of the pull request (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_pull_request_is_merged_with_http_info(owner, repo, index, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_pull_request_is_merged_with_http_info(owner, repo, index, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_pull_request_is_merged_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501
|
|
|
|
"""Check if a pull request has been merged # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_pull_request_is_merged_with_http_info(owner, repo, index, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int index: index of the pull request (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'index'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_pull_request_is_merged" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_pull_request_is_merged`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_pull_request_is_merged`") # noqa: E501
|
|
|
|
# verify the required parameter 'index' is set
|
|
|
|
if ('index' not in params or
|
|
|
|
params['index'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `index` when calling `repo_pull_request_is_merged`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'index' in params:
|
|
|
|
path_params['index'] = params['index'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/pulls/{index}/merge', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type=None, # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_search(self, **kwargs): # noqa: E501
|
|
|
|
"""Search for repositories # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_search(async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str q: keyword
|
|
|
|
:param int uid: search only for repos that the user with the given id owns or contributes to
|
|
|
|
:param int page: page number of results to return (1-based)
|
|
|
|
:param int limit: page size of results, maximum page size is 50
|
|
|
|
:param str mode: type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\"
|
|
|
|
:param bool exclusive: if `uid` is given, search only for repos that the user owns
|
|
|
|
:param str sort: sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\"
|
|
|
|
:param str order: sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified.
|
|
|
|
:return: SearchResults
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_search_with_http_info(**kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_search_with_http_info(**kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_search_with_http_info(self, **kwargs): # noqa: E501
|
|
|
|
"""Search for repositories # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_search_with_http_info(async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str q: keyword
|
|
|
|
:param int uid: search only for repos that the user with the given id owns or contributes to
|
|
|
|
:param int page: page number of results to return (1-based)
|
|
|
|
:param int limit: page size of results, maximum page size is 50
|
|
|
|
:param str mode: type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\"
|
|
|
|
:param bool exclusive: if `uid` is given, search only for repos that the user owns
|
|
|
|
:param str sort: sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\"
|
|
|
|
:param str order: sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified.
|
|
|
|
:return: SearchResults
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['q', 'uid', 'page', 'limit', 'mode', 'exclusive', 'sort', 'order'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_search" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
if 'q' in params:
|
|
|
|
query_params.append(('q', params['q'])) # noqa: E501
|
|
|
|
if 'uid' in params:
|
|
|
|
query_params.append(('uid', params['uid'])) # noqa: E501
|
|
|
|
if 'page' in params:
|
|
|
|
query_params.append(('page', params['page'])) # noqa: E501
|
|
|
|
if 'limit' in params:
|
|
|
|
query_params.append(('limit', params['limit'])) # noqa: E501
|
|
|
|
if 'mode' in params:
|
|
|
|
query_params.append(('mode', params['mode'])) # noqa: E501
|
|
|
|
if 'exclusive' in params:
|
|
|
|
query_params.append(('exclusive', params['exclusive'])) # noqa: E501
|
|
|
|
if 'sort' in params:
|
|
|
|
query_params.append(('sort', params['sort'])) # noqa: E501
|
|
|
|
if 'order' in params:
|
|
|
|
query_params.append(('order', params['order'])) # noqa: E501
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/search', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='SearchResults', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_test_hook(self, owner, repo, id, **kwargs): # noqa: E501
|
|
|
|
"""Test a push webhook # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_test_hook(owner, repo, id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the hook to test (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_test_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_test_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_test_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501
|
|
|
|
"""Test a push webhook # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_test_hook_with_http_info(owner, repo, id, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:param int id: id of the hook to test (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo', 'id'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_test_hook" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_test_hook`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_test_hook`") # noqa: E501
|
|
|
|
# verify the required parameter 'id' is set
|
|
|
|
if ('id' not in params or
|
|
|
|
params['id'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `id` when calling `repo_test_hook`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
if 'id' in params:
|
|
|
|
path_params['id'] = params['id'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/hooks/{id}/tests', 'POST',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type=None, # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def repo_tracked_times(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""List a repo's tracked times # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_tracked_times(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: list[TrackedTime]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.repo_tracked_times_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.repo_tracked_times_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def repo_tracked_times_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""List a repo's tracked times # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.repo_tracked_times_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: list[TrackedTime]
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method repo_tracked_times" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `repo_tracked_times`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `repo_tracked_times`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/times', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='list[TrackedTime]', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def topic_search(self, q, **kwargs): # noqa: E501
|
|
|
|
"""search topics via keyword # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.topic_search(q, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str q: keywords to search (required)
|
|
|
|
:return: Repository
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.topic_search_with_http_info(q, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.topic_search_with_http_info(q, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def topic_search_with_http_info(self, q, **kwargs): # noqa: E501
|
|
|
|
"""search topics via keyword # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.topic_search_with_http_info(q, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str q: keywords to search (required)
|
|
|
|
:return: Repository
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['q'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method topic_search" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'q' is set
|
|
|
|
if ('q' not in params or
|
|
|
|
params['q'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `q` when calling `topic_search`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
if 'q' in params:
|
|
|
|
query_params.append(('q', params['q'])) # noqa: E501
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/topics/search', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='Repository', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def user_current_check_subscription(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Check if the current user is watching a repo # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.user_current_check_subscription(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: WatchInfo
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.user_current_check_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.user_current_check_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def user_current_check_subscription_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Check if the current user is watching a repo # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.user_current_check_subscription_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: WatchInfo
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method user_current_check_subscription" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `user_current_check_subscription`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `user_current_check_subscription`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json', 'text/html']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/subscription', 'GET',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='WatchInfo', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def user_current_delete_subscription(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Unwatch a repo # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.user_current_delete_subscription(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.user_current_delete_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.user_current_delete_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def user_current_delete_subscription_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Unwatch a repo # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.user_current_delete_subscription_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: None
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method user_current_delete_subscription" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `user_current_delete_subscription`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `user_current_delete_subscription`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json', 'text/html']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/subscription', 'DELETE',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type=None, # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|
|
|
|
|
|
|
|
def user_current_put_subscription(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Watch a repo # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.user_current_put_subscription(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: WatchInfo
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
kwargs['_return_http_data_only'] = True
|
|
|
|
if kwargs.get('async_req'):
|
|
|
|
return self.user_current_put_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
else:
|
|
|
|
(data) = self.user_current_put_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501
|
|
|
|
return data
|
|
|
|
|
|
|
|
def user_current_put_subscription_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
|
|
|
"""Watch a repo # noqa: E501
|
|
|
|
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
|
|
asynchronous HTTP request, please pass async_req=True
|
|
|
|
>>> thread = api.user_current_put_subscription_with_http_info(owner, repo, async_req=True)
|
|
|
|
>>> result = thread.get()
|
|
|
|
|
|
|
|
:param async_req bool
|
|
|
|
:param str owner: owner of the repo (required)
|
|
|
|
:param str repo: name of the repo (required)
|
|
|
|
:return: WatchInfo
|
|
|
|
If the method is called asynchronously,
|
|
|
|
returns the request thread.
|
|
|
|
"""
|
|
|
|
|
|
|
|
all_params = ['owner', 'repo'] # noqa: E501
|
|
|
|
all_params.append('async_req')
|
|
|
|
all_params.append('_return_http_data_only')
|
|
|
|
all_params.append('_preload_content')
|
|
|
|
all_params.append('_request_timeout')
|
|
|
|
|
|
|
|
params = locals()
|
|
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
|
|
if key not in all_params:
|
|
|
|
raise TypeError(
|
|
|
|
"Got an unexpected keyword argument '%s'"
|
|
|
|
" to method user_current_put_subscription" % key
|
|
|
|
)
|
|
|
|
params[key] = val
|
|
|
|
del params['kwargs']
|
|
|
|
# verify the required parameter 'owner' is set
|
|
|
|
if ('owner' not in params or
|
|
|
|
params['owner'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `owner` when calling `user_current_put_subscription`") # noqa: E501
|
|
|
|
# verify the required parameter 'repo' is set
|
|
|
|
if ('repo' not in params or
|
|
|
|
params['repo'] is None):
|
|
|
|
raise ValueError("Missing the required parameter `repo` when calling `user_current_put_subscription`") # noqa: E501
|
|
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
|
|
|
|
path_params = {}
|
|
|
|
if 'owner' in params:
|
|
|
|
path_params['owner'] = params['owner'] # noqa: E501
|
|
|
|
if 'repo' in params:
|
|
|
|
path_params['repo'] = params['repo'] # noqa: E501
|
|
|
|
|
|
|
|
query_params = []
|
|
|
|
|
|
|
|
header_params = {}
|
|
|
|
|
|
|
|
form_params = []
|
|
|
|
local_var_files = {}
|
|
|
|
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
|
|
['application/json', 'text/html']) # noqa: E501
|
|
|
|
|
|
|
|
# HTTP header `Content-Type`
|
|
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
|
|
['application/json', 'text/plain']) # noqa: E501
|
|
|
|
|
|
|
|
# Authentication setting
|
|
|
|
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501
|
|
|
|
|
|
|
|
return self.api_client.call_api(
|
|
|
|
'/repos/{owner}/{repo}/subscription', 'PUT',
|
|
|
|
path_params,
|
|
|
|
query_params,
|
|
|
|
header_params,
|
|
|
|
body=body_params,
|
|
|
|
post_params=form_params,
|
|
|
|
files=local_var_files,
|
|
|
|
response_type='WatchInfo', # noqa: E501
|
|
|
|
auth_settings=auth_settings,
|
|
|
|
async_req=params.get('async_req'),
|
|
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
|
|
_preload_content=params.get('_preload_content', True),
|
|
|
|
_request_timeout=params.get('_request_timeout'),
|
|
|
|
collection_formats=collection_formats)
|