# coding: utf-8 """ Gitea API This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.23.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 gitea.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 self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 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', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{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 create_org_repo_deprecated(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_deprecated(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_deprecated_with_http_info(org, **kwargs) # noqa: E501 else: (data) = self.create_org_repo_deprecated_with_http_info(org, **kwargs) # noqa: E501 return data def create_org_repo_deprecated_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_deprecated_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_deprecated" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `create_org_repo_deprecated`") # 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', 'TOTPHeader', '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 create_org_variable(self, org, variablename, **kwargs): # noqa: E501 """Create an org-level variable # 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_variable(org, variablename, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param str variablename: name of the variable (required) :param CreateVariableOption body: :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 else: (data) = self.create_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 return data def create_org_variable_with_http_info(self, org, variablename, **kwargs): # noqa: E501 """Create an org-level variable # 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_variable_with_http_info(org, variablename, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param str variablename: name of the variable (required) :param CreateVariableOption body: :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['org', 'variablename', '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_variable" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `create_org_variable`") # noqa: E501 # verify the required parameter 'variablename' is set if self.api_client.client_side_validation and ('variablename' not in params or params['variablename'] is None): # noqa: E501 raise ValueError("Missing the required parameter `variablename` when calling `create_org_variable`") # noqa: E501 collection_formats = {} path_params = {} if 'org' in params: path_params['org'] = params['org'] # noqa: E501 if 'variablename' in params: path_params['variablename'] = params['variablename'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{org}/actions/variables/{variablename}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def delete_org_secret(self, org, secretname, **kwargs): # noqa: E501 """Delete a secret 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.delete_org_secret(org, secretname, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of organization (required) :param str secretname: name of the secret (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.delete_org_secret_with_http_info(org, secretname, **kwargs) # noqa: E501 else: (data) = self.delete_org_secret_with_http_info(org, secretname, **kwargs) # noqa: E501 return data def delete_org_secret_with_http_info(self, org, secretname, **kwargs): # noqa: E501 """Delete a secret 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.delete_org_secret_with_http_info(org, secretname, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of organization (required) :param str secretname: name of the secret (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['org', 'secretname'] # 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 delete_org_secret" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `delete_org_secret`") # noqa: E501 # verify the required parameter 'secretname' is set if self.api_client.client_side_validation and ('secretname' not in params or params['secretname'] is None): # noqa: E501 raise ValueError("Missing the required parameter `secretname` when calling `delete_org_secret`") # noqa: E501 collection_formats = {} path_params = {} if 'org' in params: path_params['org'] = params['org'] # noqa: E501 if 'secretname' in params: path_params['secretname'] = params['secretname'] # 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']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{org}/actions/secrets/{secretname}', '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 delete_org_variable(self, org, variablename, **kwargs): # noqa: E501 """Delete an org-level variable # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_org_variable(org, variablename, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param str variablename: name of the variable (required) :return: ActionVariable If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 else: (data) = self.delete_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 return data def delete_org_variable_with_http_info(self, org, variablename, **kwargs): # noqa: E501 """Delete an org-level variable # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_org_variable_with_http_info(org, variablename, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param str variablename: name of the variable (required) :return: ActionVariable If the method is called asynchronously, returns the request thread. """ all_params = ['org', 'variablename'] # 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 delete_org_variable" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `delete_org_variable`") # noqa: E501 # verify the required parameter 'variablename' is set if self.api_client.client_side_validation and ('variablename' not in params or params['variablename'] is None): # noqa: E501 raise ValueError("Missing the required parameter `variablename` when calling `delete_org_variable`") # noqa: E501 collection_formats = {} path_params = {} if 'org' in params: path_params['org'] = params['org'] # noqa: E501 if 'variablename' in params: path_params['variablename'] = params['variablename'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{org}/actions/variables/{variablename}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ActionVariable', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_org_variable(self, org, variablename, **kwargs): # noqa: E501 """Get an org-level variable # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_org_variable(org, variablename, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param str variablename: name of the variable (required) :return: ActionVariable If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 else: (data) = self.get_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 return data def get_org_variable_with_http_info(self, org, variablename, **kwargs): # noqa: E501 """Get an org-level variable # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_org_variable_with_http_info(org, variablename, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param str variablename: name of the variable (required) :return: ActionVariable If the method is called asynchronously, returns the request thread. """ all_params = ['org', 'variablename'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_org_variable" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `get_org_variable`") # noqa: E501 # verify the required parameter 'variablename' is set if self.api_client.client_side_validation and ('variablename' not in params or params['variablename'] is None): # noqa: E501 raise ValueError("Missing the required parameter `variablename` when calling `get_org_variable`") # noqa: E501 collection_formats = {} path_params = {} if 'org' in params: path_params['org'] = params['org'] # noqa: E501 if 'variablename' in params: path_params['variablename'] = params['variablename'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{org}/actions/variables/{variablename}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ActionVariable', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_org_variables_list(self, org, **kwargs): # noqa: E501 """Get an org-level variables list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_org_variables_list(org, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[ActionVariable] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_org_variables_list_with_http_info(org, **kwargs) # noqa: E501 else: (data) = self.get_org_variables_list_with_http_info(org, **kwargs) # noqa: E501 return data def get_org_variables_list_with_http_info(self, org, **kwargs): # noqa: E501 """Get an org-level variables list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_org_variables_list_with_http_info(org, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[ActionVariable] If the method is called asynchronously, returns the request thread. """ all_params = ['org', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_org_variables_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `get_org_variables_list`") # noqa: E501 collection_formats = {} path_params = {} if 'org' in params: path_params['org'] = params['org'] # noqa: E501 query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{org}/actions/variables', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[ActionVariable]', # 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 self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `org_add_team_member`") # noqa: E501 # verify the required parameter 'username' is set if self.api_client.client_side_validation and ('username' not in params or params['username'] is None): # noqa: E501 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `org_add_team_repository`") # noqa: E501 # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_add_team_repository`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_conceal_member`") # noqa: E501 # verify the required parameter 'username' is set if self.api_client.client_side_validation and ('username' not in params or params['username'] is None): # noqa: E501 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('organization' not in params or params['organization'] is None): # noqa: E501 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', 'TOTPHeader', '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: Hook 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: Hook 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 self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_create_hook`") # noqa: E501 # verify the required parameter 'body' is set if self.api_client.client_side_validation and ('body' not in params or params['body'] is None): # noqa: E501 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', 'TOTPHeader', '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='Hook', # 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_label(self, org, **kwargs): # noqa: E501 """Create a label for 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_label(org, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param CreateLabelOption body: :return: Label 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_label_with_http_info(org, **kwargs) # noqa: E501 else: (data) = self.org_create_label_with_http_info(org, **kwargs) # noqa: E501 return data def org_create_label_with_http_info(self, org, **kwargs): # noqa: E501 """Create a label for 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_label_with_http_info(org, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param CreateLabelOption body: :return: Label 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_label" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_create_label`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{org}/labels', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Label', # 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 self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 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', 'TOTPHeader', '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_avatar(self, org, **kwargs): # noqa: E501 """Delete Avatar # 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_avatar(org, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (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_avatar_with_http_info(org, **kwargs) # noqa: E501 else: (data) = self.org_delete_avatar_with_http_info(org, **kwargs) # noqa: E501 return data def org_delete_avatar_with_http_info(self, org, **kwargs): # noqa: E501 """Delete Avatar # 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_avatar_with_http_info(org, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (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_avatar" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_delete_avatar`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{org}/avatar', '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 self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_delete_hook`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 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', 'TOTPHeader', '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_label(self, org, id, **kwargs): # noqa: E501 """Delete a label # 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_label(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 label 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_label_with_http_info(org, id, **kwargs) # noqa: E501 else: (data) = self.org_delete_label_with_http_info(org, id, **kwargs) # noqa: E501 return data def org_delete_label_with_http_info(self, org, id, **kwargs): # noqa: E501 """Delete a label # 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_label_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 label 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_label" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_delete_label`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `org_delete_label`") # 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', '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', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{org}/labels/{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 self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_delete_member`") # noqa: E501 # verify the required parameter 'username' is set if self.api_client.client_side_validation and ('username' not in params or params['username'] is None): # noqa: E501 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 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', 'TOTPHeader', '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, body, **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, body, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization to edit (required) :param EditOrgOption body: (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_edit_with_http_info(org, body, **kwargs) # noqa: E501 else: (data) = self.org_edit_with_http_info(org, body, **kwargs) # noqa: E501 return data def org_edit_with_http_info(self, org, body, **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, body, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization to edit (required) :param EditOrgOption body: (required) :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 self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_edit`") # noqa: E501 # verify the required parameter 'body' is set if self.api_client.client_side_validation and ('body' not in params or params['body'] is None): # noqa: E501 raise ValueError("Missing the required parameter `body` 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', 'TOTPHeader', '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: Hook 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: Hook 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 self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_edit_hook`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 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', 'TOTPHeader', '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='Hook', # 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_label(self, org, id, **kwargs): # noqa: E501 """Update a label # 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_label(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 label to edit (required) :param EditLabelOption body: :return: Label 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_label_with_http_info(org, id, **kwargs) # noqa: E501 else: (data) = self.org_edit_label_with_http_info(org, id, **kwargs) # noqa: E501 return data def org_edit_label_with_http_info(self, org, id, **kwargs): # noqa: E501 """Update a label # 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_label_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 label to edit (required) :param EditLabelOption body: :return: Label 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_label" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_edit_label`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `org_edit_label`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{org}/labels/{id}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Label', # 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 self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 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', 'TOTPHeader', '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_all(self, **kwargs): # noqa: E501 """Get list of 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_get_all(async_req=True) >>> result = thread.get() :param async_req bool :param int page: page number of results to return (1-based) :param int limit: page size of results :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_get_all_with_http_info(**kwargs) # noqa: E501 else: (data) = self.org_get_all_with_http_info(**kwargs) # noqa: E501 return data def org_get_all_with_http_info(self, **kwargs): # noqa: E501 """Get list of 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_get_all_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Organization] If the method is called asynchronously, returns the request thread. """ all_params = ['page', 'limit'] # 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_all" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/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_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: Hook 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: Hook 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 self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_get_hook`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 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', 'TOTPHeader', '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='Hook', # 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_label(self, org, id, **kwargs): # noqa: E501 """Get a single label # 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_label(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 label to get (required) :return: Label 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_label_with_http_info(org, id, **kwargs) # noqa: E501 else: (data) = self.org_get_label_with_http_info(org, id, **kwargs) # noqa: E501 return data def org_get_label_with_http_info(self, org, id, **kwargs): # noqa: E501 """Get a single label # 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_label_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 label to get (required) :return: Label 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_label" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_get_label`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `org_get_label`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{org}/labels/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Label', # 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_runner_registration_token(self, org, **kwargs): # noqa: E501 """Get an organization's actions runner registration token # 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_runner_registration_token(org, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (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_get_runner_registration_token_with_http_info(org, **kwargs) # noqa: E501 else: (data) = self.org_get_runner_registration_token_with_http_info(org, **kwargs) # noqa: E501 return data def org_get_runner_registration_token_with_http_info(self, org, **kwargs): # noqa: E501 """Get an organization's actions runner registration token # 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_runner_registration_token_with_http_info(org, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (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_get_runner_registration_token" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_get_runner_registration_token`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{org}/actions/runners/registration-token', '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_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 self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 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', 'TOTPHeader', '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_get_user_permissions(self, username, org, **kwargs): # noqa: E501 """Get user permissions in 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_user_permissions(username, org, async_req=True) >>> result = thread.get() :param async_req bool :param str username: username of user (required) :param str org: name of the organization (required) :return: OrganizationPermissions 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_user_permissions_with_http_info(username, org, **kwargs) # noqa: E501 else: (data) = self.org_get_user_permissions_with_http_info(username, org, **kwargs) # noqa: E501 return data def org_get_user_permissions_with_http_info(self, username, org, **kwargs): # noqa: E501 """Get user permissions in 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_user_permissions_with_http_info(username, org, async_req=True) >>> result = thread.get() :param async_req bool :param str username: username of user (required) :param str org: name of the organization (required) :return: OrganizationPermissions If the method is called asynchronously, returns the request thread. """ all_params = ['username', '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_user_permissions" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'username' is set if self.api_client.client_side_validation and ('username' not in params or params['username'] is None): # noqa: E501 raise ValueError("Missing the required parameter `username` when calling `org_get_user_permissions`") # noqa: E501 # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_get_user_permissions`") # noqa: E501 collection_formats = {} path_params = {} if 'username' in params: path_params['username'] = params['username'] # noqa: E501 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', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/users/{username}/orgs/{org}/permissions', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='OrganizationPermissions', # 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 self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_is_member`") # noqa: E501 # verify the required parameter 'username' is set if self.api_client.client_side_validation and ('username' not in params or params['username'] is None): # noqa: E501 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_is_public_member`") # noqa: E501 # verify the required parameter 'username' is set if self.api_client.client_side_validation and ('username' not in params or params['username'] is None): # noqa: E501 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', 'TOTPHeader', '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_actions_secrets(self, org, **kwargs): # noqa: E501 """List an organization's actions secrets # 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_actions_secrets(org, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Secret] 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_actions_secrets_with_http_info(org, **kwargs) # noqa: E501 else: (data) = self.org_list_actions_secrets_with_http_info(org, **kwargs) # noqa: E501 return data def org_list_actions_secrets_with_http_info(self, org, **kwargs): # noqa: E501 """List an organization's actions secrets # 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_actions_secrets_with_http_info(org, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Secret] If the method is called asynchronously, returns the request thread. """ all_params = ['org', 'page', 'limit'] # 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_actions_secrets" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_list_actions_secrets`") # noqa: E501 collection_formats = {} path_params = {} if 'org' in params: path_params['org'] = params['org'] # noqa: E501 query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{org}/actions/secrets', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Secret]', # 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_activity_feeds(self, org, **kwargs): # noqa: E501 """List an organization's activity feeds # 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_activity_feeds(org, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the org (required) :param date _date: the date of the activities to be found :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Activity] 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_activity_feeds_with_http_info(org, **kwargs) # noqa: E501 else: (data) = self.org_list_activity_feeds_with_http_info(org, **kwargs) # noqa: E501 return data def org_list_activity_feeds_with_http_info(self, org, **kwargs): # noqa: E501 """List an organization's activity feeds # 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_activity_feeds_with_http_info(org, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the org (required) :param date _date: the date of the activities to be found :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Activity] If the method is called asynchronously, returns the request thread. """ all_params = ['org', '_date', 'page', 'limit'] # 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_activity_feeds" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_list_activity_feeds`") # noqa: E501 collection_formats = {} path_params = {} if 'org' in params: path_params['org'] = params['org'] # noqa: E501 query_params = [] if '_date' in params: query_params.append(('date', params['_date'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 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', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{org}/activities/feeds', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Activity]', # 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 :param int page: page number of results to return (1-based) :param int limit: page size of results :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 :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Organization] If the method is called asynchronously, returns the request thread. """ all_params = ['page', 'limit'] # 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 = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', '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) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Hook] 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) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Hook] If the method is called asynchronously, returns the request thread. """ all_params = ['org', 'page', 'limit'] # 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 self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 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 = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', '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[Hook]', # 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_labels(self, org, **kwargs): # noqa: E501 """List an organization's labels # 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_labels(org, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Label] 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_labels_with_http_info(org, **kwargs) # noqa: E501 else: (data) = self.org_list_labels_with_http_info(org, **kwargs) # noqa: E501 return data def org_list_labels_with_http_info(self, org, **kwargs): # noqa: E501 """List an organization's labels # 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_labels_with_http_info(org, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Label] If the method is called asynchronously, returns the request thread. """ all_params = ['org', 'page', 'limit'] # 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_labels" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_list_labels`") # noqa: E501 collection_formats = {} path_params = {} if 'org' in params: path_params['org'] = params['org'] # noqa: E501 query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{org}/labels', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Label]', # 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) :param int page: page number of results to return (1-based) :param int limit: page size of results :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) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[User] If the method is called asynchronously, returns the request thread. """ all_params = ['org', 'page', 'limit'] # 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 self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 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 = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', '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) :param int page: page number of results to return (1-based) :param int limit: page size of results :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) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[User] If the method is called asynchronously, returns the request thread. """ all_params = ['org', 'page', 'limit'] # 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 self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 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 = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', '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) :param int page: page number of results to return (1-based) :param int limit: page size of results :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) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Repository] If the method is called asynchronously, returns the request thread. """ all_params = ['org', 'page', 'limit'] # 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 self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 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 = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', '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_activity_feeds(self, id, **kwargs): # noqa: E501 """List a team's activity feeds # 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_activity_feeds(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: id of the team (required) :param date _date: the date of the activities to be found :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Activity] 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_activity_feeds_with_http_info(id, **kwargs) # noqa: E501 else: (data) = self.org_list_team_activity_feeds_with_http_info(id, **kwargs) # noqa: E501 return data def org_list_team_activity_feeds_with_http_info(self, id, **kwargs): # noqa: E501 """List a team's activity feeds # 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_activity_feeds_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: id of the team (required) :param date _date: the date of the activities to be found :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Activity] If the method is called asynchronously, returns the request thread. """ all_params = ['id', '_date', 'page', 'limit'] # 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_activity_feeds" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `org_list_team_activity_feeds`") # noqa: E501 collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] if '_date' in params: query_params.append(('date', params['_date'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 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', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/teams/{id}/activities/feeds', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Activity]', # 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_member(self, id, username, **kwargs): # noqa: E501 """List a particular member of 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_list_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 member to list (required) :return: 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_member_with_http_info(id, username, **kwargs) # noqa: E501 else: (data) = self.org_list_team_member_with_http_info(id, username, **kwargs) # noqa: E501 return data def org_list_team_member_with_http_info(self, id, username, **kwargs): # noqa: E501 """List a particular member of 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_list_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 member to list (required) :return: User 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_list_team_member" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `org_list_team_member`") # noqa: E501 # verify the required parameter 'username' is set if self.api_client.client_side_validation and ('username' not in params or params['username'] is None): # noqa: E501 raise ValueError("Missing the required parameter `username` when calling `org_list_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', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/teams/{id}/members/{username}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='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_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) :param int page: page number of results to return (1-based) :param int limit: page size of results :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) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[User] If the method is called asynchronously, returns the request thread. """ all_params = ['id', 'page', 'limit'] # 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 self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 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 = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', '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_repo(self, id, org, repo, **kwargs): # noqa: E501 """List a particular repo of 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_list_team_repo(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 list (required) :param str repo: name of the repo to list (required) :return: Repository If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.org_list_team_repo_with_http_info(id, org, repo, **kwargs) # noqa: E501 else: (data) = self.org_list_team_repo_with_http_info(id, org, repo, **kwargs) # noqa: E501 return data def org_list_team_repo_with_http_info(self, id, org, repo, **kwargs): # noqa: E501 """List a particular repo of 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_list_team_repo_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 list (required) :param str repo: name of the repo to list (required) :return: Repository 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_list_team_repo" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `org_list_team_repo`") # noqa: E501 # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_list_team_repo`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `org_list_team_repo`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/teams/{id}/repos/{org}/{repo}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Repository', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def 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) :param int page: page number of results to return (1-based) :param int limit: page size of results :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) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Repository] If the method is called asynchronously, returns the request thread. """ all_params = ['id', 'page', 'limit'] # 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 self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 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 = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', '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) :param int page: page number of results to return (1-based) :param int limit: page size of results :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) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Team] If the method is called asynchronously, returns the request thread. """ all_params = ['org', 'page', 'limit'] # 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 self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 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 = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', '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) :param int page: page number of results to return (1-based) :param int limit: page size of results :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) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Organization] If the method is called asynchronously, returns the request thread. """ all_params = ['username', 'page', 'limit'] # 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 self.api_client.client_side_validation and ('username' not in params or params['username'] is None): # noqa: E501 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 = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', '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 self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_publicize_member`") # noqa: E501 # verify the required parameter 'username' is set if self.api_client.client_side_validation and ('username' not in params or params['username'] is None): # noqa: E501 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `org_remove_team_member`") # noqa: E501 # verify the required parameter 'username' is set if self.api_client.client_side_validation and ('username' not in params or params['username'] is None): # noqa: E501 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', 'TOTPHeader', '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 self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `org_remove_team_repository`") # noqa: E501 # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_remove_team_repository`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 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', 'TOTPHeader', '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) def org_update_avatar(self, org, **kwargs): # noqa: E501 """Update Avatar # 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_update_avatar(org, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param UpdateUserAvatarOption body: :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.org_update_avatar_with_http_info(org, **kwargs) # noqa: E501 else: (data) = self.org_update_avatar_with_http_info(org, **kwargs) # noqa: E501 return data def org_update_avatar_with_http_info(self, org, **kwargs): # noqa: E501 """Update Avatar # 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_update_avatar_with_http_info(org, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param UpdateUserAvatarOption body: :return: None 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_update_avatar" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `org_update_avatar`") # 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', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{org}/avatar', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def organization_block_user(self, org, username, **kwargs): # noqa: E501 """Block a user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.organization_block_user(org, username, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param str username: user to block (required) :param str note: optional note for the block :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.organization_block_user_with_http_info(org, username, **kwargs) # noqa: E501 else: (data) = self.organization_block_user_with_http_info(org, username, **kwargs) # noqa: E501 return data def organization_block_user_with_http_info(self, org, username, **kwargs): # noqa: E501 """Block a user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.organization_block_user_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: user to block (required) :param str note: optional note for the block :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['org', 'username', 'note'] # 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 organization_block_user" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `organization_block_user`") # noqa: E501 # verify the required parameter 'username' is set if self.api_client.client_side_validation and ('username' not in params or params['username'] is None): # noqa: E501 raise ValueError("Missing the required parameter `username` when calling `organization_block_user`") # 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 = [] if 'note' in params: query_params.append(('note', params['note'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', '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', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{org}/blocks/{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 organization_check_user_block(self, org, username, **kwargs): # noqa: E501 """Check if a user is blocked by the 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.organization_check_user_block(org, username, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param str username: user to check (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.organization_check_user_block_with_http_info(org, username, **kwargs) # noqa: E501 else: (data) = self.organization_check_user_block_with_http_info(org, username, **kwargs) # noqa: E501 return data def organization_check_user_block_with_http_info(self, org, username, **kwargs): # noqa: E501 """Check if a user is blocked by the 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.organization_check_user_block_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: user to check (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 organization_check_user_block" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `organization_check_user_block`") # noqa: E501 # verify the required parameter 'username' is set if self.api_client.client_side_validation and ('username' not in params or params['username'] is None): # noqa: E501 raise ValueError("Missing the required parameter `username` when calling `organization_check_user_block`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{org}/blocks/{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 organization_list_blocks(self, org, **kwargs): # noqa: E501 """List users blocked by the 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.organization_list_blocks(org, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :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.organization_list_blocks_with_http_info(org, **kwargs) # noqa: E501 else: (data) = self.organization_list_blocks_with_http_info(org, **kwargs) # noqa: E501 return data def organization_list_blocks_with_http_info(self, org, **kwargs): # noqa: E501 """List users blocked by the 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.organization_list_blocks_with_http_info(org, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[User] If the method is called asynchronously, returns the request thread. """ all_params = ['org', 'page', 'limit'] # 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 organization_list_blocks" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `organization_list_blocks`") # noqa: E501 collection_formats = {} path_params = {} if 'org' in params: path_params['org'] = params['org'] # noqa: E501 query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{org}/blocks', '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 organization_unblock_user(self, org, username, **kwargs): # noqa: E501 """Unblock a user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.organization_unblock_user(org, username, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param str username: user to unblock (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.organization_unblock_user_with_http_info(org, username, **kwargs) # noqa: E501 else: (data) = self.organization_unblock_user_with_http_info(org, username, **kwargs) # noqa: E501 return data def organization_unblock_user_with_http_info(self, org, username, **kwargs): # noqa: E501 """Unblock a user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.organization_unblock_user_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: user to unblock (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 organization_unblock_user" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `organization_unblock_user`") # noqa: E501 # verify the required parameter 'username' is set if self.api_client.client_side_validation and ('username' not in params or params['username'] is None): # noqa: E501 raise ValueError("Missing the required parameter `username` when calling `organization_unblock_user`") # 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', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{org}/blocks/{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 team_search(self, org, **kwargs): # noqa: E501 """Search for teams within 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.team_search(org, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param str q: keywords to search :param bool include_desc: include search within team description (defaults to true) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: InlineResponse200 If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.team_search_with_http_info(org, **kwargs) # noqa: E501 else: (data) = self.team_search_with_http_info(org, **kwargs) # noqa: E501 return data def team_search_with_http_info(self, org, **kwargs): # noqa: E501 """Search for teams within 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.team_search_with_http_info(org, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param str q: keywords to search :param bool include_desc: include search within team description (defaults to true) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: InlineResponse200 If the method is called asynchronously, returns the request thread. """ all_params = ['org', 'q', 'include_desc', 'page', 'limit'] # 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 team_search" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `team_search`") # noqa: E501 collection_formats = {} path_params = {} if 'org' in params: path_params['org'] = params['org'] # noqa: E501 query_params = [] if 'q' in params: query_params.append(('q', params['q'])) # noqa: E501 if 'include_desc' in params: query_params.append(('include_desc', params['include_desc'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 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', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{org}/teams/search', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='InlineResponse200', # 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 update_org_secret(self, org, secretname, **kwargs): # noqa: E501 """Create or Update a secret value 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.update_org_secret(org, secretname, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of organization (required) :param str secretname: name of the secret (required) :param CreateOrUpdateSecretOption body: :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_org_secret_with_http_info(org, secretname, **kwargs) # noqa: E501 else: (data) = self.update_org_secret_with_http_info(org, secretname, **kwargs) # noqa: E501 return data def update_org_secret_with_http_info(self, org, secretname, **kwargs): # noqa: E501 """Create or Update a secret value 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.update_org_secret_with_http_info(org, secretname, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of organization (required) :param str secretname: name of the secret (required) :param CreateOrUpdateSecretOption body: :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['org', 'secretname', '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 update_org_secret" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `update_org_secret`") # noqa: E501 # verify the required parameter 'secretname' is set if self.api_client.client_side_validation and ('secretname' not in params or params['secretname'] is None): # noqa: E501 raise ValueError("Missing the required parameter `secretname` when calling `update_org_secret`") # noqa: E501 collection_formats = {} path_params = {} if 'org' in params: path_params['org'] = params['org'] # noqa: E501 if 'secretname' in params: path_params['secretname'] = params['secretname'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{org}/actions/secrets/{secretname}', '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 update_org_variable(self, org, variablename, **kwargs): # noqa: E501 """Update an org-level variable # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_org_variable(org, variablename, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param str variablename: name of the variable (required) :param UpdateVariableOption body: :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 else: (data) = self.update_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 return data def update_org_variable_with_http_info(self, org, variablename, **kwargs): # noqa: E501 """Update an org-level variable # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_org_variable_with_http_info(org, variablename, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) :param str variablename: name of the variable (required) :param UpdateVariableOption body: :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['org', 'variablename', '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 update_org_variable" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if self.api_client.client_side_validation and ('org' not in params or params['org'] is None): # noqa: E501 raise ValueError("Missing the required parameter `org` when calling `update_org_variable`") # noqa: E501 # verify the required parameter 'variablename' is set if self.api_client.client_side_validation and ('variablename' not in params or params['variablename'] is None): # noqa: E501 raise ValueError("Missing the required parameter `variablename` when calling `update_org_variable`") # noqa: E501 collection_formats = {} path_params = {} if 'org' in params: path_params['org'] = params['org'] # noqa: E501 if 'variablename' in params: path_params['variablename'] = params['variablename'] # 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', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/orgs/{org}/actions/variables/{variablename}', '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)