You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3176 lines
123 KiB
3176 lines
123 KiB
6 years ago
|
# 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 OrganizationApi(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_org_repo(self, org, **kwargs): # noqa: E501
|
||
|
"""Create a repository in an organization # 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_org_repo(org, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of organization (required)
|
||
|
: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_org_repo_with_http_info(org, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.create_org_repo_with_http_info(org, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def create_org_repo_with_http_info(self, org, **kwargs): # noqa: E501
|
||
|
"""Create a repository in an organization # 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_org_repo_with_http_info(org, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of organization (required)
|
||
|
:param CreateRepoOption body:
|
||
|
:return: Repository
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['org', '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_org_repo" % key
|
||
|
)
|
||
|
params[key] = val
|
||
|
del params['kwargs']
|
||
|
# verify the required parameter 'org' is set
|
||
|
if ('org' not in params or
|
||
|
params['org'] is None):
|
||
|
raise ValueError("Missing the required parameter `org` when calling `create_org_repo`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'org' in params:
|
||
|
path_params['org'] = params['org'] # 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(
|
||
|
'/org/{org}/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 org_add_team_member(self, id, username, **kwargs): # noqa: E501
|
||
|
"""Add a team member # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_add_team_member(id, username, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param int id: id of the team (required)
|
||
|
:param str username: username of the user to add (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.org_add_team_member_with_http_info(id, username, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_add_team_member_with_http_info(id, username, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_add_team_member_with_http_info(self, id, username, **kwargs): # noqa: E501
|
||
|
"""Add a team member # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_add_team_member_with_http_info(id, username, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param int id: id of the team (required)
|
||
|
:param str username: username of the user to add (required)
|
||
|
:return: None
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['id', 'username'] # 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 org_add_team_member" % 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 `org_add_team_member`") # noqa: E501
|
||
|
# verify the required parameter 'username' is set
|
||
|
if ('username' not in params or
|
||
|
params['username'] is None):
|
||
|
raise ValueError("Missing the required parameter `username` when calling `org_add_team_member`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'id' in params:
|
||
|
path_params['id'] = params['id'] # noqa: E501
|
||
|
if 'username' in params:
|
||
|
path_params['username'] = params['username'] # 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(
|
||
|
'/teams/{id}/members/{username}', '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 org_add_team_repository(self, id, org, repo, **kwargs): # noqa: E501
|
||
|
"""Add a repository to a team # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_add_team_repository(id, org, repo, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param int id: id of the team (required)
|
||
|
:param str org: organization that owns the repo to add (required)
|
||
|
:param str repo: name of the repo to add (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.org_add_team_repository_with_http_info(id, org, repo, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_add_team_repository_with_http_info(id, org, repo, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_add_team_repository_with_http_info(self, id, org, repo, **kwargs): # noqa: E501
|
||
|
"""Add a repository to a team # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_add_team_repository_with_http_info(id, org, repo, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param int id: id of the team (required)
|
||
|
:param str org: organization that owns the repo to add (required)
|
||
|
:param str repo: name of the repo to add (required)
|
||
|
:return: None
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['id', 'org', '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 org_add_team_repository" % 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 `org_add_team_repository`") # noqa: E501
|
||
|
# verify the required parameter 'org' is set
|
||
|
if ('org' not in params or
|
||
|
params['org'] is None):
|
||
|
raise ValueError("Missing the required parameter `org` when calling `org_add_team_repository`") # 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 `org_add_team_repository`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'id' in params:
|
||
|
path_params['id'] = params['id'] # noqa: E501
|
||
|
if 'org' in params:
|
||
|
path_params['org'] = params['org'] # 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(
|
||
|
'/teams/{id}/repos/{org}/{repo}', '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 org_conceal_member(self, org, username, **kwargs): # noqa: E501
|
||
|
"""Conceal a user's membership # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_conceal_member(org, username, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (required)
|
||
|
:param str username: username of the user (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.org_conceal_member_with_http_info(org, username, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_conceal_member_with_http_info(org, username, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_conceal_member_with_http_info(self, org, username, **kwargs): # noqa: E501
|
||
|
"""Conceal a user's membership # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_conceal_member_with_http_info(org, username, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (required)
|
||
|
:param str username: username of the user (required)
|
||
|
:return: None
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['org', 'username'] # 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 org_conceal_member" % key
|
||
|
)
|
||
|
params[key] = val
|
||
|
del params['kwargs']
|
||
|
# verify the required parameter 'org' is set
|
||
|
if ('org' not in params or
|
||
|
params['org'] is None):
|
||
|
raise ValueError("Missing the required parameter `org` when calling `org_conceal_member`") # noqa: E501
|
||
|
# verify the required parameter 'username' is set
|
||
|
if ('username' not in params or
|
||
|
params['username'] is None):
|
||
|
raise ValueError("Missing the required parameter `username` when calling `org_conceal_member`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'org' in params:
|
||
|
path_params['org'] = params['org'] # noqa: E501
|
||
|
if 'username' in params:
|
||
|
path_params['username'] = params['username'] # 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(
|
||
|
'/orgs/{org}/public_members/{username}', '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 org_create(self, organization, **kwargs): # noqa: E501
|
||
|
"""Create an organization # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_create(organization, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param CreateOrgOption organization: (required)
|
||
|
:return: Organization
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
kwargs['_return_http_data_only'] = True
|
||
|
if kwargs.get('async_req'):
|
||
|
return self.org_create_with_http_info(organization, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_create_with_http_info(organization, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_create_with_http_info(self, organization, **kwargs): # noqa: E501
|
||
|
"""Create an organization # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_create_with_http_info(organization, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param CreateOrgOption organization: (required)
|
||
|
:return: Organization
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['organization'] # 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 org_create" % key
|
||
|
)
|
||
|
params[key] = val
|
||
|
del params['kwargs']
|
||
|
# verify the required parameter 'organization' is set
|
||
|
if ('organization' not in params or
|
||
|
params['organization'] is None):
|
||
|
raise ValueError("Missing the required parameter `organization` when calling `org_create`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
|
||
|
query_params = []
|
||
|
|
||
|
header_params = {}
|
||
|
|
||
|
form_params = []
|
||
|
local_var_files = {}
|
||
|
|
||
|
body_params = None
|
||
|
if 'organization' in params:
|
||
|
body_params = params['organization']
|
||
|
# 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(
|
||
|
'/orgs', 'POST',
|
||
|
path_params,
|
||
|
query_params,
|
||
|
header_params,
|
||
|
body=body_params,
|
||
|
post_params=form_params,
|
||
|
files=local_var_files,
|
||
|
response_type='Organization', # 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 org_create_hook(self, org, body, **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.org_create_hook(org, body, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (required)
|
||
|
:param CreateHookOption body: (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.org_create_hook_with_http_info(org, body, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_create_hook_with_http_info(org, body, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_create_hook_with_http_info(self, org, body, **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.org_create_hook_with_http_info(org, body, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (required)
|
||
|
:param CreateHookOption body: (required)
|
||
|
:return: list[Branch]
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['org', '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 org_create_hook" % key
|
||
|
)
|
||
|
params[key] = val
|
||
|
del params['kwargs']
|
||
|
# verify the required parameter 'org' is set
|
||
|
if ('org' not in params or
|
||
|
params['org'] is None):
|
||
|
raise ValueError("Missing the required parameter `org` when calling `org_create_hook`") # noqa: E501
|
||
|
# verify the required parameter 'body' is set
|
||
|
if ('body' not in params or
|
||
|
params['body'] is None):
|
||
|
raise ValueError("Missing the required parameter `body` when calling `org_create_hook`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'org' in params:
|
||
|
path_params['org'] = params['org'] # 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(
|
||
|
'/orgs/{org}/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 org_create_team(self, org, **kwargs): # noqa: E501
|
||
|
"""Create a team # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_create_team(org, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (required)
|
||
|
:param CreateTeamOption body:
|
||
|
:return: Team
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
kwargs['_return_http_data_only'] = True
|
||
|
if kwargs.get('async_req'):
|
||
|
return self.org_create_team_with_http_info(org, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_create_team_with_http_info(org, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_create_team_with_http_info(self, org, **kwargs): # noqa: E501
|
||
|
"""Create a team # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_create_team_with_http_info(org, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (required)
|
||
|
:param CreateTeamOption body:
|
||
|
:return: Team
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['org', '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 org_create_team" % key
|
||
|
)
|
||
|
params[key] = val
|
||
|
del params['kwargs']
|
||
|
# verify the required parameter 'org' is set
|
||
|
if ('org' not in params or
|
||
|
params['org'] is None):
|
||
|
raise ValueError("Missing the required parameter `org` when calling `org_create_team`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'org' in params:
|
||
|
path_params['org'] = params['org'] # 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(
|
||
|
'/orgs/{org}/teams', 'POST',
|
||
|
path_params,
|
||
|
query_params,
|
||
|
header_params,
|
||
|
body=body_params,
|
||
|
post_params=form_params,
|
||
|
files=local_var_files,
|
||
|
response_type='Team', # 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 org_delete(self, org, **kwargs): # noqa: E501
|
||
|
"""Delete an organization # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_delete(org, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: organization that is to be deleted (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.org_delete_with_http_info(org, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_delete_with_http_info(org, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_delete_with_http_info(self, org, **kwargs): # noqa: E501
|
||
|
"""Delete an organization # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_delete_with_http_info(org, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: organization that is to be deleted (required)
|
||
|
:return: None
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['org'] # 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 org_delete" % key
|
||
|
)
|
||
|
params[key] = val
|
||
|
del params['kwargs']
|
||
|
# verify the required parameter 'org' is set
|
||
|
if ('org' not in params or
|
||
|
params['org'] is None):
|
||
|
raise ValueError("Missing the required parameter `org` when calling `org_delete`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'org' in params:
|
||
|
path_params['org'] = params['org'] # 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(
|
||
|
'/orgs/{org}', '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 org_delete_hook(self, org, id, **kwargs): # noqa: E501
|
||
|
"""Delete 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.org_delete_hook(org, id, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (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.org_delete_hook_with_http_info(org, id, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_delete_hook_with_http_info(org, id, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_delete_hook_with_http_info(self, org, id, **kwargs): # noqa: E501
|
||
|
"""Delete 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.org_delete_hook_with_http_info(org, id, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (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 = ['org', '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 org_delete_hook" % key
|
||
|
)
|
||
|
params[key] = val
|
||
|
del params['kwargs']
|
||
|
# verify the required parameter 'org' is set
|
||
|
if ('org' not in params or
|
||
|
params['org'] is None):
|
||
|
raise ValueError("Missing the required parameter `org` when calling `org_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 `org_delete_hook`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'org' in params:
|
||
|
path_params['org'] = params['org'] # 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(
|
||
|
'/orgs/{org}/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 org_delete_member(self, org, username, **kwargs): # noqa: E501
|
||
|
"""Remove a member from an organization # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_delete_member(org, username, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (required)
|
||
|
:param str username: username of the user (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.org_delete_member_with_http_info(org, username, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_delete_member_with_http_info(org, username, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_delete_member_with_http_info(self, org, username, **kwargs): # noqa: E501
|
||
|
"""Remove a member from an organization # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_delete_member_with_http_info(org, username, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (required)
|
||
|
:param str username: username of the user (required)
|
||
|
:return: None
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['org', 'username'] # 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 org_delete_member" % key
|
||
|
)
|
||
|
params[key] = val
|
||
|
del params['kwargs']
|
||
|
# verify the required parameter 'org' is set
|
||
|
if ('org' not in params or
|
||
|
params['org'] is None):
|
||
|
raise ValueError("Missing the required parameter `org` when calling `org_delete_member`") # noqa: E501
|
||
|
# verify the required parameter 'username' is set
|
||
|
if ('username' not in params or
|
||
|
params['username'] is None):
|
||
|
raise ValueError("Missing the required parameter `username` when calling `org_delete_member`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'org' in params:
|
||
|
path_params['org'] = params['org'] # noqa: E501
|
||
|
if 'username' in params:
|
||
|
path_params['username'] = params['username'] # 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(
|
||
|
'/orgs/{org}/members/{username}', '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 org_delete_team(self, id, **kwargs): # noqa: E501
|
||
|
"""Delete a team # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_delete_team(id, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param int id: id of the team 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.org_delete_team_with_http_info(id, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_delete_team_with_http_info(id, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_delete_team_with_http_info(self, id, **kwargs): # noqa: E501
|
||
|
"""Delete a team # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_delete_team_with_http_info(id, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param int id: id of the team to delete (required)
|
||
|
:return: None
|
||
|
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 org_delete_team" % 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 `org_delete_team`") # 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', '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(
|
||
|
'/teams/{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 org_edit(self, org, **kwargs): # noqa: E501
|
||
|
"""Edit an organization # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_edit(org, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization to edit (required)
|
||
|
:param EditOrgOption body:
|
||
|
:return: Organization
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
kwargs['_return_http_data_only'] = True
|
||
|
if kwargs.get('async_req'):
|
||
|
return self.org_edit_with_http_info(org, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_edit_with_http_info(org, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_edit_with_http_info(self, org, **kwargs): # noqa: E501
|
||
|
"""Edit an organization # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_edit_with_http_info(org, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization to edit (required)
|
||
|
:param EditOrgOption body:
|
||
|
:return: Organization
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['org', '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 org_edit" % key
|
||
|
)
|
||
|
params[key] = val
|
||
|
del params['kwargs']
|
||
|
# verify the required parameter 'org' is set
|
||
|
if ('org' not in params or
|
||
|
params['org'] is None):
|
||
|
raise ValueError("Missing the required parameter `org` when calling `org_edit`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'org' in params:
|
||
|
path_params['org'] = params['org'] # 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(
|
||
|
'/orgs/{org}', 'PATCH',
|
||
|
path_params,
|
||
|
query_params,
|
||
|
header_params,
|
||
|
body=body_params,
|
||
|
post_params=form_params,
|
||
|
files=local_var_files,
|
||
|
response_type='Organization', # 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 org_edit_hook(self, org, id, **kwargs): # noqa: E501
|
||
|
"""Update 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.org_edit_hook(org, id, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (required)
|
||
|
:param int id: id of the hook to update (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.org_edit_hook_with_http_info(org, id, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_edit_hook_with_http_info(org, id, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_edit_hook_with_http_info(self, org, id, **kwargs): # noqa: E501
|
||
|
"""Update 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.org_edit_hook_with_http_info(org, id, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (required)
|
||
|
:param int id: id of the hook to update (required)
|
||
|
:param EditHookOption body:
|
||
|
:return: list[Branch]
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['org', '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 org_edit_hook" % key
|
||
|
)
|
||
|
params[key] = val
|
||
|
del params['kwargs']
|
||
|
# verify the required parameter 'org' is set
|
||
|
if ('org' not in params or
|
||
|
params['org'] is None):
|
||
|
raise ValueError("Missing the required parameter `org` when calling `org_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 `org_edit_hook`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'org' in params:
|
||
|
path_params['org'] = params['org'] # 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(
|
||
|
'/orgs/{org}/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 org_edit_team(self, id, **kwargs): # noqa: E501
|
||
|
"""Edit a team # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_edit_team(id, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param int id: id of the team to edit (required)
|
||
|
:param EditTeamOption body:
|
||
|
:return: Team
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
kwargs['_return_http_data_only'] = True
|
||
|
if kwargs.get('async_req'):
|
||
|
return self.org_edit_team_with_http_info(id, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_edit_team_with_http_info(id, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_edit_team_with_http_info(self, id, **kwargs): # noqa: E501
|
||
|
"""Edit a team # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_edit_team_with_http_info(id, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param int id: id of the team to edit (required)
|
||
|
:param EditTeamOption body:
|
||
|
:return: Team
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['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 org_edit_team" % 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 `org_edit_team`") # 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
|
||
|
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(
|
||
|
'/teams/{id}', 'PATCH',
|
||
|
path_params,
|
||
|
query_params,
|
||
|
header_params,
|
||
|
body=body_params,
|
||
|
post_params=form_params,
|
||
|
files=local_var_files,
|
||
|
response_type='Team', # 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 org_get(self, org, **kwargs): # noqa: E501
|
||
|
"""Get an organization # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_get(org, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization to get (required)
|
||
|
:return: Organization
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
kwargs['_return_http_data_only'] = True
|
||
|
if kwargs.get('async_req'):
|
||
|
return self.org_get_with_http_info(org, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_get_with_http_info(org, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_get_with_http_info(self, org, **kwargs): # noqa: E501
|
||
|
"""Get an organization # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_get_with_http_info(org, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization to get (required)
|
||
|
:return: Organization
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['org'] # 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 org_get" % key
|
||
|
)
|
||
|
params[key] = val
|
||
|
del params['kwargs']
|
||
|
# verify the required parameter 'org' is set
|
||
|
if ('org' not in params or
|
||
|
params['org'] is None):
|
||
|
raise ValueError("Missing the required parameter `org` when calling `org_get`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'org' in params:
|
||
|
path_params['org'] = params['org'] # 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(
|
||
|
'/orgs/{org}', 'GET',
|
||
|
path_params,
|
||
|
query_params,
|
||
|
header_params,
|
||
|
body=body_params,
|
||
|
post_params=form_params,
|
||
|
files=local_var_files,
|
||
|
response_type='Organization', # 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 org_get_hook(self, org, 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.org_get_hook(org, id, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (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.org_get_hook_with_http_info(org, id, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_get_hook_with_http_info(org, id, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_get_hook_with_http_info(self, org, 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.org_get_hook_with_http_info(org, id, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (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 = ['org', '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 org_get_hook" % key
|
||
|
)
|
||
|
params[key] = val
|
||
|
del params['kwargs']
|
||
|
# verify the required parameter 'org' is set
|
||
|
if ('org' not in params or
|
||
|
params['org'] is None):
|
||
|
raise ValueError("Missing the required parameter `org` when calling `org_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 `org_get_hook`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'org' in params:
|
||
|
path_params['org'] = params['org'] # 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(
|
||
|
'/orgs/{org}/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 org_get_team(self, id, **kwargs): # noqa: E501
|
||
|
"""Get a team # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_get_team(id, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param int id: id of the team to get (required)
|
||
|
:return: Team
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
kwargs['_return_http_data_only'] = True
|
||
|
if kwargs.get('async_req'):
|
||
|
return self.org_get_team_with_http_info(id, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_get_team_with_http_info(id, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_get_team_with_http_info(self, id, **kwargs): # noqa: E501
|
||
|
"""Get a team # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_get_team_with_http_info(id, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param int id: id of the team to get (required)
|
||
|
:return: Team
|
||
|
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 org_get_team" % 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 `org_get_team`") # 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(
|
||
|
'/teams/{id}', 'GET',
|
||
|
path_params,
|
||
|
query_params,
|
||
|
header_params,
|
||
|
body=body_params,
|
||
|
post_params=form_params,
|
||
|
files=local_var_files,
|
||
|
response_type='Team', # 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 org_is_member(self, org, username, **kwargs): # noqa: E501
|
||
|
"""Check if a user is a member of an organization # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_is_member(org, username, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (required)
|
||
|
:param str username: username of the user (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.org_is_member_with_http_info(org, username, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_is_member_with_http_info(org, username, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_is_member_with_http_info(self, org, username, **kwargs): # noqa: E501
|
||
|
"""Check if a user is a member of an organization # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_is_member_with_http_info(org, username, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (required)
|
||
|
:param str username: username of the user (required)
|
||
|
:return: None
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['org', 'username'] # 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 org_is_member" % key
|
||
|
)
|
||
|
params[key] = val
|
||
|
del params['kwargs']
|
||
|
# verify the required parameter 'org' is set
|
||
|
if ('org' not in params or
|
||
|
params['org'] is None):
|
||
|
raise ValueError("Missing the required parameter `org` when calling `org_is_member`") # noqa: E501
|
||
|
# verify the required parameter 'username' is set
|
||
|
if ('username' not in params or
|
||
|
params['username'] is None):
|
||
|
raise ValueError("Missing the required parameter `username` when calling `org_is_member`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'org' in params:
|
||
|
path_params['org'] = params['org'] # noqa: E501
|
||
|
if 'username' in params:
|
||
|
path_params['username'] = params['username'] # 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(
|
||
|
'/orgs/{org}/members/{username}', '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 org_is_public_member(self, org, username, **kwargs): # noqa: E501
|
||
|
"""Check if a user is a public member of an organization # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_is_public_member(org, username, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (required)
|
||
|
:param str username: username of the user (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.org_is_public_member_with_http_info(org, username, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_is_public_member_with_http_info(org, username, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_is_public_member_with_http_info(self, org, username, **kwargs): # noqa: E501
|
||
|
"""Check if a user is a public member of an organization # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_is_public_member_with_http_info(org, username, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (required)
|
||
|
:param str username: username of the user (required)
|
||
|
:return: None
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['org', 'username'] # 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 org_is_public_member" % key
|
||
|
)
|
||
|
params[key] = val
|
||
|
del params['kwargs']
|
||
|
# verify the required parameter 'org' is set
|
||
|
if ('org' not in params or
|
||
|
params['org'] is None):
|
||
|
raise ValueError("Missing the required parameter `org` when calling `org_is_public_member`") # noqa: E501
|
||
|
# verify the required parameter 'username' is set
|
||
|
if ('username' not in params or
|
||
|
params['username'] is None):
|
||
|
raise ValueError("Missing the required parameter `username` when calling `org_is_public_member`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'org' in params:
|
||
|
path_params['org'] = params['org'] # noqa: E501
|
||
|
if 'username' in params:
|
||
|
path_params['username'] = params['username'] # 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(
|
||
|
'/orgs/{org}/public_members/{username}', '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 org_list_current_user_orgs(self, **kwargs): # noqa: E501
|
||
|
"""List the current user's organizations # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_list_current_user_orgs(async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:return: list[Organization]
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
kwargs['_return_http_data_only'] = True
|
||
|
if kwargs.get('async_req'):
|
||
|
return self.org_list_current_user_orgs_with_http_info(**kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_list_current_user_orgs_with_http_info(**kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_list_current_user_orgs_with_http_info(self, **kwargs): # noqa: E501
|
||
|
"""List the current user's organizations # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_list_current_user_orgs_with_http_info(async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:return: list[Organization]
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = [] # 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 org_list_current_user_orgs" % key
|
||
|
)
|
||
|
params[key] = val
|
||
|
del params['kwargs']
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
|
||
|
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(
|
||
|
'/user/orgs', 'GET',
|
||
|
path_params,
|
||
|
query_params,
|
||
|
header_params,
|
||
|
body=body_params,
|
||
|
post_params=form_params,
|
||
|
files=local_var_files,
|
||
|
response_type='list[Organization]', # 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 org_list_hooks(self, org, **kwargs): # noqa: E501
|
||
|
"""List an organization's webhooks # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_list_hooks(org, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (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.org_list_hooks_with_http_info(org, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_list_hooks_with_http_info(org, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_list_hooks_with_http_info(self, org, **kwargs): # noqa: E501
|
||
|
"""List an organization's webhooks # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_list_hooks_with_http_info(org, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (required)
|
||
|
:return: list[Branch]
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['org'] # 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 org_list_hooks" % key
|
||
|
)
|
||
|
params[key] = val
|
||
|
del params['kwargs']
|
||
|
# verify the required parameter 'org' is set
|
||
|
if ('org' not in params or
|
||
|
params['org'] is None):
|
||
|
raise ValueError("Missing the required parameter `org` when calling `org_list_hooks`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'org' in params:
|
||
|
path_params['org'] = params['org'] # 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(
|
||
|
'/orgs/{org}/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 org_list_members(self, org, **kwargs): # noqa: E501
|
||
|
"""List an organization's members # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_list_members(org, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (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.org_list_members_with_http_info(org, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_list_members_with_http_info(org, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_list_members_with_http_info(self, org, **kwargs): # noqa: E501
|
||
|
"""List an organization's members # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_list_members_with_http_info(org, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (required)
|
||
|
:return: list[User]
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['org'] # 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 org_list_members" % key
|
||
|
)
|
||
|
params[key] = val
|
||
|
del params['kwargs']
|
||
|
# verify the required parameter 'org' is set
|
||
|
if ('org' not in params or
|
||
|
params['org'] is None):
|
||
|
raise ValueError("Missing the required parameter `org` when calling `org_list_members`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'org' in params:
|
||
|
path_params['org'] = params['org'] # 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(
|
||
|
'/orgs/{org}/members', '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 org_list_public_members(self, org, **kwargs): # noqa: E501
|
||
|
"""List an organization's public members # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_list_public_members(org, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (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.org_list_public_members_with_http_info(org, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_list_public_members_with_http_info(org, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_list_public_members_with_http_info(self, org, **kwargs): # noqa: E501
|
||
|
"""List an organization's public members # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_list_public_members_with_http_info(org, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (required)
|
||
|
:return: list[User]
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['org'] # 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 org_list_public_members" % key
|
||
|
)
|
||
|
params[key] = val
|
||
|
del params['kwargs']
|
||
|
# verify the required parameter 'org' is set
|
||
|
if ('org' not in params or
|
||
|
params['org'] is None):
|
||
|
raise ValueError("Missing the required parameter `org` when calling `org_list_public_members`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'org' in params:
|
||
|
path_params['org'] = params['org'] # 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(
|
||
|
'/orgs/{org}/public_members', '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 org_list_repos(self, org, **kwargs): # noqa: E501
|
||
|
"""List an organization's repos # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_list_repos(org, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (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.org_list_repos_with_http_info(org, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_list_repos_with_http_info(org, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_list_repos_with_http_info(self, org, **kwargs): # noqa: E501
|
||
|
"""List an organization's repos # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_list_repos_with_http_info(org, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (required)
|
||
|
:return: list[Repository]
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['org'] # 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 org_list_repos" % key
|
||
|
)
|
||
|
params[key] = val
|
||
|
del params['kwargs']
|
||
|
# verify the required parameter 'org' is set
|
||
|
if ('org' not in params or
|
||
|
params['org'] is None):
|
||
|
raise ValueError("Missing the required parameter `org` when calling `org_list_repos`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'org' in params:
|
||
|
path_params['org'] = params['org'] # 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(
|
||
|
'/orgs/{org}/repos', '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 org_list_team_members(self, id, **kwargs): # noqa: E501
|
||
|
"""List a team's members # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_list_team_members(id, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param int id: id of the team (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.org_list_team_members_with_http_info(id, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_list_team_members_with_http_info(id, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_list_team_members_with_http_info(self, id, **kwargs): # noqa: E501
|
||
|
"""List a team's members # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_list_team_members_with_http_info(id, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param int id: id of the team (required)
|
||
|
:return: list[User]
|
||
|
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 org_list_team_members" % 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 `org_list_team_members`") # 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(
|
||
|
'/teams/{id}/members', '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 org_list_team_repos(self, id, **kwargs): # noqa: E501
|
||
|
"""List a team's repos # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_list_team_repos(id, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param int id: id of the team (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.org_list_team_repos_with_http_info(id, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_list_team_repos_with_http_info(id, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_list_team_repos_with_http_info(self, id, **kwargs): # noqa: E501
|
||
|
"""List a team's repos # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_list_team_repos_with_http_info(id, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param int id: id of the team (required)
|
||
|
:return: list[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 org_list_team_repos" % 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 `org_list_team_repos`") # 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(
|
||
|
'/teams/{id}/repos', '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 org_list_teams(self, org, **kwargs): # noqa: E501
|
||
|
"""List an organization's teams # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_list_teams(org, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (required)
|
||
|
:return: list[Team]
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
kwargs['_return_http_data_only'] = True
|
||
|
if kwargs.get('async_req'):
|
||
|
return self.org_list_teams_with_http_info(org, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_list_teams_with_http_info(org, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_list_teams_with_http_info(self, org, **kwargs): # noqa: E501
|
||
|
"""List an organization's teams # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_list_teams_with_http_info(org, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (required)
|
||
|
:return: list[Team]
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['org'] # 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 org_list_teams" % key
|
||
|
)
|
||
|
params[key] = val
|
||
|
del params['kwargs']
|
||
|
# verify the required parameter 'org' is set
|
||
|
if ('org' not in params or
|
||
|
params['org'] is None):
|
||
|
raise ValueError("Missing the required parameter `org` when calling `org_list_teams`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'org' in params:
|
||
|
path_params['org'] = params['org'] # 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(
|
||
|
'/orgs/{org}/teams', 'GET',
|
||
|
path_params,
|
||
|
query_params,
|
||
|
header_params,
|
||
|
body=body_params,
|
||
|
post_params=form_params,
|
||
|
files=local_var_files,
|
||
|
response_type='list[Team]', # 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 org_list_user_orgs(self, username, **kwargs): # noqa: E501
|
||
|
"""List a user's organizations # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_list_user_orgs(username, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str username: username of user (required)
|
||
|
:return: list[Organization]
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
kwargs['_return_http_data_only'] = True
|
||
|
if kwargs.get('async_req'):
|
||
|
return self.org_list_user_orgs_with_http_info(username, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_list_user_orgs_with_http_info(username, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_list_user_orgs_with_http_info(self, username, **kwargs): # noqa: E501
|
||
|
"""List a user's organizations # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_list_user_orgs_with_http_info(username, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str username: username of user (required)
|
||
|
:return: list[Organization]
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['username'] # 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 org_list_user_orgs" % key
|
||
|
)
|
||
|
params[key] = val
|
||
|
del params['kwargs']
|
||
|
# verify the required parameter 'username' is set
|
||
|
if ('username' not in params or
|
||
|
params['username'] is None):
|
||
|
raise ValueError("Missing the required parameter `username` when calling `org_list_user_orgs`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'username' in params:
|
||
|
path_params['username'] = params['username'] # 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(
|
||
|
'/users/{username}/orgs', 'GET',
|
||
|
path_params,
|
||
|
query_params,
|
||
|
header_params,
|
||
|
body=body_params,
|
||
|
post_params=form_params,
|
||
|
files=local_var_files,
|
||
|
response_type='list[Organization]', # 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 org_publicize_member(self, org, username, **kwargs): # noqa: E501
|
||
|
"""Publicize a user's membership # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_publicize_member(org, username, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (required)
|
||
|
:param str username: username of the user (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.org_publicize_member_with_http_info(org, username, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_publicize_member_with_http_info(org, username, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_publicize_member_with_http_info(self, org, username, **kwargs): # noqa: E501
|
||
|
"""Publicize a user's membership # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_publicize_member_with_http_info(org, username, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param str org: name of the organization (required)
|
||
|
:param str username: username of the user (required)
|
||
|
:return: None
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['org', 'username'] # 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 org_publicize_member" % key
|
||
|
)
|
||
|
params[key] = val
|
||
|
del params['kwargs']
|
||
|
# verify the required parameter 'org' is set
|
||
|
if ('org' not in params or
|
||
|
params['org'] is None):
|
||
|
raise ValueError("Missing the required parameter `org` when calling `org_publicize_member`") # noqa: E501
|
||
|
# verify the required parameter 'username' is set
|
||
|
if ('username' not in params or
|
||
|
params['username'] is None):
|
||
|
raise ValueError("Missing the required parameter `username` when calling `org_publicize_member`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'org' in params:
|
||
|
path_params['org'] = params['org'] # noqa: E501
|
||
|
if 'username' in params:
|
||
|
path_params['username'] = params['username'] # 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(
|
||
|
'/orgs/{org}/public_members/{username}', '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 org_remove_team_member(self, id, username, **kwargs): # noqa: E501
|
||
|
"""Remove a team member # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_remove_team_member(id, username, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param int id: id of the team (required)
|
||
|
:param str username: username of the user to remove (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.org_remove_team_member_with_http_info(id, username, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_remove_team_member_with_http_info(id, username, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_remove_team_member_with_http_info(self, id, username, **kwargs): # noqa: E501
|
||
|
"""Remove a team member # noqa: E501
|
||
|
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_remove_team_member_with_http_info(id, username, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param int id: id of the team (required)
|
||
|
:param str username: username of the user to remove (required)
|
||
|
:return: None
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['id', 'username'] # 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 org_remove_team_member" % 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 `org_remove_team_member`") # noqa: E501
|
||
|
# verify the required parameter 'username' is set
|
||
|
if ('username' not in params or
|
||
|
params['username'] is None):
|
||
|
raise ValueError("Missing the required parameter `username` when calling `org_remove_team_member`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'id' in params:
|
||
|
path_params['id'] = params['id'] # noqa: E501
|
||
|
if 'username' in params:
|
||
|
path_params['username'] = params['username'] # 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(
|
||
|
'/teams/{id}/members/{username}', '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 org_remove_team_repository(self, id, org, repo, **kwargs): # noqa: E501
|
||
|
"""Remove a repository from a team # noqa: E501
|
||
|
|
||
|
This does not delete the repository, it only removes the repository from the team. # noqa: E501
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_remove_team_repository(id, org, repo, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param int id: id of the team (required)
|
||
|
:param str org: organization that owns the repo to remove (required)
|
||
|
:param str repo: name of the repo to remove (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.org_remove_team_repository_with_http_info(id, org, repo, **kwargs) # noqa: E501
|
||
|
else:
|
||
|
(data) = self.org_remove_team_repository_with_http_info(id, org, repo, **kwargs) # noqa: E501
|
||
|
return data
|
||
|
|
||
|
def org_remove_team_repository_with_http_info(self, id, org, repo, **kwargs): # noqa: E501
|
||
|
"""Remove a repository from a team # noqa: E501
|
||
|
|
||
|
This does not delete the repository, it only removes the repository from the team. # noqa: E501
|
||
|
This method makes a synchronous HTTP request by default. To make an
|
||
|
asynchronous HTTP request, please pass async_req=True
|
||
|
>>> thread = api.org_remove_team_repository_with_http_info(id, org, repo, async_req=True)
|
||
|
>>> result = thread.get()
|
||
|
|
||
|
:param async_req bool
|
||
|
:param int id: id of the team (required)
|
||
|
:param str org: organization that owns the repo to remove (required)
|
||
|
:param str repo: name of the repo to remove (required)
|
||
|
:return: None
|
||
|
If the method is called asynchronously,
|
||
|
returns the request thread.
|
||
|
"""
|
||
|
|
||
|
all_params = ['id', 'org', '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 org_remove_team_repository" % 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 `org_remove_team_repository`") # noqa: E501
|
||
|
# verify the required parameter 'org' is set
|
||
|
if ('org' not in params or
|
||
|
params['org'] is None):
|
||
|
raise ValueError("Missing the required parameter `org` when calling `org_remove_team_repository`") # 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 `org_remove_team_repository`") # noqa: E501
|
||
|
|
||
|
collection_formats = {}
|
||
|
|
||
|
path_params = {}
|
||
|
if 'id' in params:
|
||
|
path_params['id'] = params['id'] # noqa: E501
|
||
|
if 'org' in params:
|
||
|
path_params['org'] = params['org'] # 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(
|
||
|
'/teams/{id}/repos/{org}/{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)
|