# coding: utf-8 """ Gitea API. This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.17.0+rc1 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 UserApi(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def create_current_user_repo(self, **kwargs): # noqa: E501 """Create a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_current_user_repo(async_req=True) >>> result = thread.get() :param async_req bool :param CreateRepoOption body: :return: Repository If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_current_user_repo_with_http_info(**kwargs) # noqa: E501 else: (data) = self.create_current_user_repo_with_http_info(**kwargs) # noqa: E501 return data def create_current_user_repo_with_http_info(self, **kwargs): # noqa: E501 """Create a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_current_user_repo_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param CreateRepoOption body: :return: Repository If the method is called asynchronously, returns the request thread. """ all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_current_user_repo" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/user/repos', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Repository', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_user_settings(self, **kwargs): # noqa: E501 """Get user settings # 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_user_settings(async_req=True) >>> result = thread.get() :param async_req bool :return: list[UserSettings] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_user_settings_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_user_settings_with_http_info(**kwargs) # noqa: E501 return data def get_user_settings_with_http_info(self, **kwargs): # noqa: E501 """Get user settings # 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_user_settings_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: list[UserSettings] If the method is called asynchronously, returns the request thread. """ all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_user_settings" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/user/settings', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[UserSettings]', # 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_verification_token(self, **kwargs): # noqa: E501 """Get a Token to verify # 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_verification_token(async_req=True) >>> result = thread.get() :param async_req bool :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_verification_token_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_verification_token_with_http_info(**kwargs) # noqa: E501 return data def get_verification_token_with_http_info(self, **kwargs): # noqa: E501 """Get a Token to verify # 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_verification_token_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: str If the method is called asynchronously, returns the request thread. """ all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_verification_token" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain']) # 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/gpg_key_token', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', # 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_user_settings(self, **kwargs): # noqa: E501 """Update user settings # 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_user_settings(async_req=True) >>> result = thread.get() :param async_req bool :param UserSettingsOptions body: :return: list[UserSettings] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_user_settings_with_http_info(**kwargs) # noqa: E501 else: (data) = self.update_user_settings_with_http_info(**kwargs) # noqa: E501 return data def update_user_settings_with_http_info(self, **kwargs): # noqa: E501 """Update user settings # 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_user_settings_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param UserSettingsOptions body: :return: list[UserSettings] If the method is called asynchronously, returns the request thread. """ all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_user_settings" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/user/settings', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[UserSettings]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_add_email(self, **kwargs): # noqa: E501 """Add email addresses # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_add_email(async_req=True) >>> result = thread.get() :param async_req bool :param CreateEmailOption body: :return: list[Email] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_add_email_with_http_info(**kwargs) # noqa: E501 else: (data) = self.user_add_email_with_http_info(**kwargs) # noqa: E501 return data def user_add_email_with_http_info(self, **kwargs): # noqa: E501 """Add email addresses # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_add_email_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param CreateEmailOption body: :return: list[Email] If the method is called asynchronously, returns the request thread. """ all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_add_email" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/user/emails', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Email]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_check_following(self, username, target, **kwargs): # noqa: E501 """Check if one user is following another 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.user_check_following(username, target, async_req=True) >>> result = thread.get() :param async_req bool :param str username: username of following user (required) :param str target: username of followed 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.user_check_following_with_http_info(username, target, **kwargs) # noqa: E501 else: (data) = self.user_check_following_with_http_info(username, target, **kwargs) # noqa: E501 return data def user_check_following_with_http_info(self, username, target, **kwargs): # noqa: E501 """Check if one user is following another 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.user_check_following_with_http_info(username, target, async_req=True) >>> result = thread.get() :param async_req bool :param str username: username of following user (required) :param str target: username of followed user (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['username', 'target'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_check_following" % 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 `user_check_following`") # noqa: E501 # verify the required parameter 'target' is set if self.api_client.client_side_validation and ('target' not in params or params['target'] is None): # noqa: E501 raise ValueError("Missing the required parameter `target` when calling `user_check_following`") # noqa: E501 collection_formats = {} path_params = {} if 'username' in params: path_params['username'] = params['username'] # noqa: E501 if 'target' in params: path_params['target'] = params['target'] # 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( '/users/{username}/following/{target}', '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 user_create_o_auth2_application(self, body, **kwargs): # noqa: E501 """creates a new OAuth2 application # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_create_o_auth2_application(body, async_req=True) >>> result = thread.get() :param async_req bool :param CreateOAuth2ApplicationOptions body: (required) :return: OAuth2Application If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_create_o_auth2_application_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.user_create_o_auth2_application_with_http_info(body, **kwargs) # noqa: E501 return data def user_create_o_auth2_application_with_http_info(self, body, **kwargs): # noqa: E501 """creates a new OAuth2 application # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_create_o_auth2_application_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool :param CreateOAuth2ApplicationOptions body: (required) :return: OAuth2Application If the method is called asynchronously, returns the request thread. """ all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_create_o_auth2_application" % key ) params[key] = val del params['kwargs'] # 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 `user_create_o_auth2_application`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/user/applications/oauth2', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='OAuth2Application', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_create_token(self, username, **kwargs): # noqa: E501 """Create an access 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.user_create_token(username, async_req=True) >>> result = thread.get() :param async_req bool :param str username: username of user (required) :param CreateAccessTokenOption user_create_token: :return: AccessToken If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_create_token_with_http_info(username, **kwargs) # noqa: E501 else: (data) = self.user_create_token_with_http_info(username, **kwargs) # noqa: E501 return data def user_create_token_with_http_info(self, username, **kwargs): # noqa: E501 """Create an access 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.user_create_token_with_http_info(username, async_req=True) >>> result = thread.get() :param async_req bool :param str username: username of user (required) :param CreateAccessTokenOption user_create_token: :return: AccessToken If the method is called asynchronously, returns the request thread. """ all_params = ['username', 'user_create_token'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_create_token" % 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 `user_create_token`") # noqa: E501 collection_formats = {} path_params = {} if 'username' in params: path_params['username'] = params['username'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'user_create_token' in params: body_params = params['user_create_token'] # 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( '/users/{username}/tokens', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='AccessToken', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_current_check_following(self, username, **kwargs): # noqa: E501 """Check whether a user is followed by the authenticated 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.user_current_check_following(username, async_req=True) >>> result = thread.get() :param async_req bool :param str username: username of followed 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.user_current_check_following_with_http_info(username, **kwargs) # noqa: E501 else: (data) = self.user_current_check_following_with_http_info(username, **kwargs) # noqa: E501 return data def user_current_check_following_with_http_info(self, username, **kwargs): # noqa: E501 """Check whether a user is followed by the authenticated 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.user_current_check_following_with_http_info(username, async_req=True) >>> result = thread.get() :param async_req bool :param str username: username of followed user (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['username'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_current_check_following" % 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 `user_current_check_following`") # noqa: E501 collection_formats = {} path_params = {} if 'username' in params: path_params['username'] = params['username'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', '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( '/user/following/{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 user_current_check_starring(self, owner, repo, **kwargs): # noqa: E501 """Whether the authenticated is starring the repo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_check_starring(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_current_check_starring_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.user_current_check_starring_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def user_current_check_starring_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Whether the authenticated is starring the repo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_check_starring_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_current_check_starring" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `user_current_check_starring`") # 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 `user_current_check_starring`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'text/html']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/user/starred/{owner}/{repo}', '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 user_current_delete_follow(self, username, **kwargs): # noqa: E501 """Unfollow 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.user_current_delete_follow(username, async_req=True) >>> result = thread.get() :param async_req bool :param str username: username of user to unfollow (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_current_delete_follow_with_http_info(username, **kwargs) # noqa: E501 else: (data) = self.user_current_delete_follow_with_http_info(username, **kwargs) # noqa: E501 return data def user_current_delete_follow_with_http_info(self, username, **kwargs): # noqa: E501 """Unfollow 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.user_current_delete_follow_with_http_info(username, async_req=True) >>> result = thread.get() :param async_req bool :param str username: username of user to unfollow (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['username'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_current_delete_follow" % 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 `user_current_delete_follow`") # noqa: E501 collection_formats = {} path_params = {} if 'username' in params: path_params['username'] = params['username'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', '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( '/user/following/{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 user_current_delete_gpg_key(self, id, **kwargs): # noqa: E501 """Remove a GPG key # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_delete_gpg_key(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: id of key to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_current_delete_gpg_key_with_http_info(id, **kwargs) # noqa: E501 else: (data) = self.user_current_delete_gpg_key_with_http_info(id, **kwargs) # noqa: E501 return data def user_current_delete_gpg_key_with_http_info(self, id, **kwargs): # noqa: E501 """Remove a GPG key # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_delete_gpg_key_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: id of key 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 user_current_delete_gpg_key" % 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 `user_current_delete_gpg_key`") # 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( '/user/gpg_keys/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_current_delete_key(self, id, **kwargs): # noqa: E501 """Delete a public key # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_delete_key(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: id of key to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_current_delete_key_with_http_info(id, **kwargs) # noqa: E501 else: (data) = self.user_current_delete_key_with_http_info(id, **kwargs) # noqa: E501 return data def user_current_delete_key_with_http_info(self, id, **kwargs): # noqa: E501 """Delete a public key # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_delete_key_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: id of key 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 user_current_delete_key" % 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 `user_current_delete_key`") # 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( '/user/keys/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_current_delete_star(self, owner, repo, **kwargs): # noqa: E501 """Unstar the given repo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_delete_star(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo to unstar (required) :param str repo: name of the repo to unstar (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_current_delete_star_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.user_current_delete_star_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def user_current_delete_star_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Unstar the given repo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_delete_star_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo to unstar (required) :param str repo: name of the repo to unstar (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_current_delete_star" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `user_current_delete_star`") # 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 `user_current_delete_star`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'text/html']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/user/starred/{owner}/{repo}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_current_get_gpg_key(self, id, **kwargs): # noqa: E501 """Get a GPG key # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_get_gpg_key(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: id of key to get (required) :return: GPGKey If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_current_get_gpg_key_with_http_info(id, **kwargs) # noqa: E501 else: (data) = self.user_current_get_gpg_key_with_http_info(id, **kwargs) # noqa: E501 return data def user_current_get_gpg_key_with_http_info(self, id, **kwargs): # noqa: E501 """Get a GPG key # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_get_gpg_key_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: id of key to get (required) :return: GPGKey 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 user_current_get_gpg_key" % 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 `user_current_get_gpg_key`") # 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( '/user/gpg_keys/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GPGKey', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_current_get_key(self, id, **kwargs): # noqa: E501 """Get a public key # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_get_key(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: id of key to get (required) :return: PublicKey If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_current_get_key_with_http_info(id, **kwargs) # noqa: E501 else: (data) = self.user_current_get_key_with_http_info(id, **kwargs) # noqa: E501 return data def user_current_get_key_with_http_info(self, id, **kwargs): # noqa: E501 """Get a public key # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_get_key_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: id of key to get (required) :return: PublicKey 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 user_current_get_key" % 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 `user_current_get_key`") # 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( '/user/keys/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PublicKey', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_current_list_followers(self, **kwargs): # noqa: E501 """List the authenticated user's followers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_list_followers(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[User] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_current_list_followers_with_http_info(**kwargs) # noqa: E501 else: (data) = self.user_current_list_followers_with_http_info(**kwargs) # noqa: E501 return data def user_current_list_followers_with_http_info(self, **kwargs): # noqa: E501 """List the authenticated user's followers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_list_followers_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[User] 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 user_current_list_followers" % 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/followers', '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 user_current_list_following(self, **kwargs): # noqa: E501 """List the users that the authenticated user is following # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_list_following(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[User] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_current_list_following_with_http_info(**kwargs) # noqa: E501 else: (data) = self.user_current_list_following_with_http_info(**kwargs) # noqa: E501 return data def user_current_list_following_with_http_info(self, **kwargs): # noqa: E501 """List the users that the authenticated user is following # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_list_following_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[User] 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 user_current_list_following" % 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/following', '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 user_current_list_gpg_keys(self, **kwargs): # noqa: E501 """List the authenticated user's GPG keys # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_list_gpg_keys(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[GPGKey] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_current_list_gpg_keys_with_http_info(**kwargs) # noqa: E501 else: (data) = self.user_current_list_gpg_keys_with_http_info(**kwargs) # noqa: E501 return data def user_current_list_gpg_keys_with_http_info(self, **kwargs): # noqa: E501 """List the authenticated user's GPG keys # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_list_gpg_keys_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[GPGKey] 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 user_current_list_gpg_keys" % 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/gpg_keys', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[GPGKey]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_current_list_keys(self, **kwargs): # noqa: E501 """List the authenticated user's public keys # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_list_keys(async_req=True) >>> result = thread.get() :param async_req bool :param str fingerprint: fingerprint of the key :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[PublicKey] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_current_list_keys_with_http_info(**kwargs) # noqa: E501 else: (data) = self.user_current_list_keys_with_http_info(**kwargs) # noqa: E501 return data def user_current_list_keys_with_http_info(self, **kwargs): # noqa: E501 """List the authenticated user's public keys # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_list_keys_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param str fingerprint: fingerprint of the key :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[PublicKey] If the method is called asynchronously, returns the request thread. """ all_params = ['fingerprint', '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 user_current_list_keys" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'fingerprint' in params: query_params.append(('fingerprint', params['fingerprint'])) # 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( '/user/keys', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[PublicKey]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_current_list_repos(self, **kwargs): # noqa: E501 """List the repos that the authenticated user owns # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_list_repos(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[Repository] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_current_list_repos_with_http_info(**kwargs) # noqa: E501 else: (data) = self.user_current_list_repos_with_http_info(**kwargs) # noqa: E501 return data def user_current_list_repos_with_http_info(self, **kwargs): # noqa: E501 """List the repos that the authenticated user owns # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_list_repos_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[Repository] 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 user_current_list_repos" % 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/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 user_current_list_starred(self, **kwargs): # noqa: E501 """The repos that the authenticated user has starred # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_list_starred(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[Repository] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_current_list_starred_with_http_info(**kwargs) # noqa: E501 else: (data) = self.user_current_list_starred_with_http_info(**kwargs) # noqa: E501 return data def user_current_list_starred_with_http_info(self, **kwargs): # noqa: E501 """The repos that the authenticated user has starred # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_list_starred_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[Repository] 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 user_current_list_starred" % 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/starred', '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 user_current_list_subscriptions(self, **kwargs): # noqa: E501 """List repositories watched by the authenticated 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.user_current_list_subscriptions(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[Repository] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_current_list_subscriptions_with_http_info(**kwargs) # noqa: E501 else: (data) = self.user_current_list_subscriptions_with_http_info(**kwargs) # noqa: E501 return data def user_current_list_subscriptions_with_http_info(self, **kwargs): # noqa: E501 """List repositories watched by the authenticated 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.user_current_list_subscriptions_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[Repository] 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 user_current_list_subscriptions" % 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/subscriptions', '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 user_current_post_gpg_key(self, **kwargs): # noqa: E501 """Create a GPG key # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_post_gpg_key(async_req=True) >>> result = thread.get() :param async_req bool :param CreateGPGKeyOption form: :return: GPGKey If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_current_post_gpg_key_with_http_info(**kwargs) # noqa: E501 else: (data) = self.user_current_post_gpg_key_with_http_info(**kwargs) # noqa: E501 return data def user_current_post_gpg_key_with_http_info(self, **kwargs): # noqa: E501 """Create a GPG key # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_post_gpg_key_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param CreateGPGKeyOption form: :return: GPGKey If the method is called asynchronously, returns the request thread. """ all_params = ['form'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_current_post_gpg_key" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'form' in params: body_params = params['form'] # 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( '/user/gpg_keys', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GPGKey', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_current_post_key(self, **kwargs): # noqa: E501 """Create a public key # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_post_key(async_req=True) >>> result = thread.get() :param async_req bool :param CreateKeyOption body: :return: PublicKey If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_current_post_key_with_http_info(**kwargs) # noqa: E501 else: (data) = self.user_current_post_key_with_http_info(**kwargs) # noqa: E501 return data def user_current_post_key_with_http_info(self, **kwargs): # noqa: E501 """Create a public key # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_post_key_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param CreateKeyOption body: :return: PublicKey If the method is called asynchronously, returns the request thread. """ all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_current_post_key" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/user/keys', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PublicKey', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_current_put_follow(self, username, **kwargs): # noqa: E501 """Follow 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.user_current_put_follow(username, async_req=True) >>> result = thread.get() :param async_req bool :param str username: username of user to follow (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_current_put_follow_with_http_info(username, **kwargs) # noqa: E501 else: (data) = self.user_current_put_follow_with_http_info(username, **kwargs) # noqa: E501 return data def user_current_put_follow_with_http_info(self, username, **kwargs): # noqa: E501 """Follow 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.user_current_put_follow_with_http_info(username, async_req=True) >>> result = thread.get() :param async_req bool :param str username: username of user to follow (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['username'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_current_put_follow" % 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 `user_current_put_follow`") # noqa: E501 collection_formats = {} path_params = {} if 'username' in params: path_params['username'] = params['username'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', '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( '/user/following/{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 user_current_put_star(self, owner, repo, **kwargs): # noqa: E501 """Star the given repo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_put_star(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo to star (required) :param str repo: name of the repo to star (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_current_put_star_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.user_current_put_star_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def user_current_put_star_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Star the given repo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_put_star_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo to star (required) :param str repo: name of the repo to star (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_current_put_star" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `user_current_put_star`") # 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 `user_current_put_star`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'text/html']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/user/starred/{owner}/{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 user_current_tracked_times(self, **kwargs): # noqa: E501 """List the current user's tracked times # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_tracked_times(async_req=True) >>> result = thread.get() :param async_req bool :param datetime since: Only show times updated after the given time. This is a timestamp in RFC 3339 format :param datetime before: Only show times updated before the given time. This is a timestamp in RFC 3339 format :return: list[TrackedTime] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_current_tracked_times_with_http_info(**kwargs) # noqa: E501 else: (data) = self.user_current_tracked_times_with_http_info(**kwargs) # noqa: E501 return data def user_current_tracked_times_with_http_info(self, **kwargs): # noqa: E501 """List the current user's tracked times # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_tracked_times_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param datetime since: Only show times updated after the given time. This is a timestamp in RFC 3339 format :param datetime before: Only show times updated before the given time. This is a timestamp in RFC 3339 format :return: list[TrackedTime] If the method is called asynchronously, returns the request thread. """ all_params = ['since', 'before'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_current_tracked_times" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'since' in params: query_params.append(('since', params['since'])) # noqa: E501 if 'before' in params: query_params.append(('before', params['before'])) # 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/times', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[TrackedTime]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_delete_access_token(self, username, token, **kwargs): # noqa: E501 """delete an access 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.user_delete_access_token(username, token, async_req=True) >>> result = thread.get() :param async_req bool :param str username: username of user (required) :param str token: token to be deleted, identified by ID and if not available by name (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_delete_access_token_with_http_info(username, token, **kwargs) # noqa: E501 else: (data) = self.user_delete_access_token_with_http_info(username, token, **kwargs) # noqa: E501 return data def user_delete_access_token_with_http_info(self, username, token, **kwargs): # noqa: E501 """delete an access 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.user_delete_access_token_with_http_info(username, token, async_req=True) >>> result = thread.get() :param async_req bool :param str username: username of user (required) :param str token: token to be deleted, identified by ID and if not available by name (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['username', 'token'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_delete_access_token" % 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 `user_delete_access_token`") # noqa: E501 # verify the required parameter 'token' is set if self.api_client.client_side_validation and ('token' not in params or params['token'] is None): # noqa: E501 raise ValueError("Missing the required parameter `token` when calling `user_delete_access_token`") # noqa: E501 collection_formats = {} path_params = {} if 'username' in params: path_params['username'] = params['username'] # noqa: E501 if 'token' in params: path_params['token'] = params['token'] # 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}/tokens/{token}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_delete_email(self, **kwargs): # noqa: E501 """Delete email addresses # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_delete_email(async_req=True) >>> result = thread.get() :param async_req bool :param DeleteEmailOption 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.user_delete_email_with_http_info(**kwargs) # noqa: E501 else: (data) = self.user_delete_email_with_http_info(**kwargs) # noqa: E501 return data def user_delete_email_with_http_info(self, **kwargs): # noqa: E501 """Delete email addresses # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_delete_email_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param DeleteEmailOption body: :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_delete_email" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/user/emails', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_delete_o_auth2_application(self, id, **kwargs): # noqa: E501 """delete an OAuth2 Application # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_delete_o_auth2_application(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: token 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.user_delete_o_auth2_application_with_http_info(id, **kwargs) # noqa: E501 else: (data) = self.user_delete_o_auth2_application_with_http_info(id, **kwargs) # noqa: E501 return data def user_delete_o_auth2_application_with_http_info(self, id, **kwargs): # noqa: E501 """delete an OAuth2 Application # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_delete_o_auth2_application_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: token to be deleted (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 user_delete_o_auth2_application" % 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 `user_delete_o_auth2_application`") # 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( '/user/applications/oauth2/{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 user_get(self, username, **kwargs): # noqa: E501 """Get 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.user_get(username, async_req=True) >>> result = thread.get() :param async_req bool :param str username: username of user to get (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.user_get_with_http_info(username, **kwargs) # noqa: E501 else: (data) = self.user_get_with_http_info(username, **kwargs) # noqa: E501 return data def user_get_with_http_info(self, username, **kwargs): # noqa: E501 """Get 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.user_get_with_http_info(username, async_req=True) >>> result = thread.get() :param async_req bool :param str username: username of user to get (required) :return: User If the method is called asynchronously, returns the request thread. """ all_params = ['username'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_get" % 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 `user_get`") # noqa: E501 collection_formats = {} path_params = {} if 'username' in params: path_params['username'] = params['username'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/users/{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 user_get_current(self, **kwargs): # noqa: E501 """Get the authenticated 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.user_get_current(async_req=True) >>> result = thread.get() :param async_req bool :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.user_get_current_with_http_info(**kwargs) # noqa: E501 else: (data) = self.user_get_current_with_http_info(**kwargs) # noqa: E501 return data def user_get_current_with_http_info(self, **kwargs): # noqa: E501 """Get the authenticated 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.user_get_current_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: User If the method is called asynchronously, returns the request thread. """ all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_get_current" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/user', '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 user_get_heatmap_data(self, username, **kwargs): # noqa: E501 """Get a user's heatmap # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_get_heatmap_data(username, async_req=True) >>> result = thread.get() :param async_req bool :param str username: username of user to get (required) :return: list[UserHeatmapData] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_get_heatmap_data_with_http_info(username, **kwargs) # noqa: E501 else: (data) = self.user_get_heatmap_data_with_http_info(username, **kwargs) # noqa: E501 return data def user_get_heatmap_data_with_http_info(self, username, **kwargs): # noqa: E501 """Get a user's heatmap # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_get_heatmap_data_with_http_info(username, async_req=True) >>> result = thread.get() :param async_req bool :param str username: username of user to get (required) :return: list[UserHeatmapData] If the method is called asynchronously, returns the request thread. """ all_params = ['username'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_get_heatmap_data" % 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 `user_get_heatmap_data`") # noqa: E501 collection_formats = {} path_params = {} if 'username' in params: path_params['username'] = params['username'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/users/{username}/heatmap', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[UserHeatmapData]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_get_o_auth2_application(self, id, **kwargs): # noqa: E501 """get an OAuth2 Application # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_get_o_auth2_application(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: Application ID to be found (required) :return: OAuth2Application If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_get_o_auth2_application_with_http_info(id, **kwargs) # noqa: E501 else: (data) = self.user_get_o_auth2_application_with_http_info(id, **kwargs) # noqa: E501 return data def user_get_o_auth2_application_with_http_info(self, id, **kwargs): # noqa: E501 """get an OAuth2 Application # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_get_o_auth2_application_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: Application ID to be found (required) :return: OAuth2Application 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 user_get_o_auth2_application" % 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 `user_get_o_auth2_application`") # 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( '/user/applications/oauth2/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='OAuth2Application', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_get_oauth2_application(self, **kwargs): # noqa: E501 """List the authenticated user's oauth2 applications # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_get_oauth2_application(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[OAuth2Application] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_get_oauth2_application_with_http_info(**kwargs) # noqa: E501 else: (data) = self.user_get_oauth2_application_with_http_info(**kwargs) # noqa: E501 return data def user_get_oauth2_application_with_http_info(self, **kwargs): # noqa: E501 """List the authenticated user's oauth2 applications # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_get_oauth2_application_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[OAuth2Application] 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 user_get_oauth2_application" % 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/applications/oauth2', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[OAuth2Application]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_get_stop_watches(self, **kwargs): # noqa: E501 """Get list of all existing stopwatches # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_get_stop_watches(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[StopWatch] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_get_stop_watches_with_http_info(**kwargs) # noqa: E501 else: (data) = self.user_get_stop_watches_with_http_info(**kwargs) # noqa: E501 return data def user_get_stop_watches_with_http_info(self, **kwargs): # noqa: E501 """Get list of all existing stopwatches # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_get_stop_watches_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[StopWatch] 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 user_get_stop_watches" % 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']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/user/stopwatches', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[StopWatch]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_get_tokens(self, username, **kwargs): # noqa: E501 """List the authenticated user's access tokens # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_get_tokens(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[AccessToken] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_get_tokens_with_http_info(username, **kwargs) # noqa: E501 else: (data) = self.user_get_tokens_with_http_info(username, **kwargs) # noqa: E501 return data def user_get_tokens_with_http_info(self, username, **kwargs): # noqa: E501 """List the authenticated user's access tokens # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_get_tokens_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[AccessToken] 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 user_get_tokens" % 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 `user_get_tokens`") # 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}/tokens', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[AccessToken]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_list_emails(self, **kwargs): # noqa: E501 """List the authenticated user's email addresses # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_list_emails(async_req=True) >>> result = thread.get() :param async_req bool :return: list[Email] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_list_emails_with_http_info(**kwargs) # noqa: E501 else: (data) = self.user_list_emails_with_http_info(**kwargs) # noqa: E501 return data def user_list_emails_with_http_info(self, **kwargs): # noqa: E501 """List the authenticated user's email addresses # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_list_emails_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: list[Email] If the method is called asynchronously, returns the request thread. """ all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_list_emails" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/user/emails', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Email]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_list_followers(self, username, **kwargs): # noqa: E501 """List the given user's followers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_list_followers(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[User] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_list_followers_with_http_info(username, **kwargs) # noqa: E501 else: (data) = self.user_list_followers_with_http_info(username, **kwargs) # noqa: E501 return data def user_list_followers_with_http_info(self, username, **kwargs): # noqa: E501 """List the given user's followers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_list_followers_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[User] 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 user_list_followers" % 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 `user_list_followers`") # 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}/followers', '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 user_list_following(self, username, **kwargs): # noqa: E501 """List the users that the given user is following # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_list_following(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[User] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_list_following_with_http_info(username, **kwargs) # noqa: E501 else: (data) = self.user_list_following_with_http_info(username, **kwargs) # noqa: E501 return data def user_list_following_with_http_info(self, username, **kwargs): # noqa: E501 """List the users that the given user is following # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_list_following_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[User] 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 user_list_following" % 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 `user_list_following`") # 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}/following', '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 user_list_gpg_keys(self, username, **kwargs): # noqa: E501 """List the given user's GPG keys # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_list_gpg_keys(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[GPGKey] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_list_gpg_keys_with_http_info(username, **kwargs) # noqa: E501 else: (data) = self.user_list_gpg_keys_with_http_info(username, **kwargs) # noqa: E501 return data def user_list_gpg_keys_with_http_info(self, username, **kwargs): # noqa: E501 """List the given user's GPG keys # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_list_gpg_keys_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[GPGKey] 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 user_list_gpg_keys" % 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 `user_list_gpg_keys`") # 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}/gpg_keys', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[GPGKey]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_list_keys(self, username, **kwargs): # noqa: E501 """List the given user's public keys # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_list_keys(username, async_req=True) >>> result = thread.get() :param async_req bool :param str username: username of user (required) :param str fingerprint: fingerprint of the key :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[PublicKey] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_list_keys_with_http_info(username, **kwargs) # noqa: E501 else: (data) = self.user_list_keys_with_http_info(username, **kwargs) # noqa: E501 return data def user_list_keys_with_http_info(self, username, **kwargs): # noqa: E501 """List the given user's public keys # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_list_keys_with_http_info(username, async_req=True) >>> result = thread.get() :param async_req bool :param str username: username of user (required) :param str fingerprint: fingerprint of the key :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[PublicKey] If the method is called asynchronously, returns the request thread. """ all_params = ['username', 'fingerprint', '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 user_list_keys" % 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 `user_list_keys`") # noqa: E501 collection_formats = {} path_params = {} if 'username' in params: path_params['username'] = params['username'] # noqa: E501 query_params = [] if 'fingerprint' in params: query_params.append(('fingerprint', params['fingerprint'])) # 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( '/users/{username}/keys', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[PublicKey]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_list_repos(self, username, **kwargs): # noqa: E501 """List the repos owned by the given 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.user_list_repos(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[Repository] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_list_repos_with_http_info(username, **kwargs) # noqa: E501 else: (data) = self.user_list_repos_with_http_info(username, **kwargs) # noqa: E501 return data def user_list_repos_with_http_info(self, username, **kwargs): # noqa: E501 """List the repos owned by the given 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.user_list_repos_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[Repository] 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 user_list_repos" % 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 `user_list_repos`") # 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}/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 user_list_starred(self, username, **kwargs): # noqa: E501 """The repos that the given user has starred # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_list_starred(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[Repository] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_list_starred_with_http_info(username, **kwargs) # noqa: E501 else: (data) = self.user_list_starred_with_http_info(username, **kwargs) # noqa: E501 return data def user_list_starred_with_http_info(self, username, **kwargs): # noqa: E501 """The repos that the given user has starred # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_list_starred_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[Repository] 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 user_list_starred" % 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 `user_list_starred`") # 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}/starred', '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 user_list_subscriptions(self, username, **kwargs): # noqa: E501 """List the repositories watched by 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.user_list_subscriptions(username, async_req=True) >>> result = thread.get() :param async_req bool :param str username: username of the user (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.user_list_subscriptions_with_http_info(username, **kwargs) # noqa: E501 else: (data) = self.user_list_subscriptions_with_http_info(username, **kwargs) # noqa: E501 return data def user_list_subscriptions_with_http_info(self, username, **kwargs): # noqa: E501 """List the repositories watched by 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.user_list_subscriptions_with_http_info(username, async_req=True) >>> result = thread.get() :param async_req bool :param str username: username of the user (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 = ['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 user_list_subscriptions" % 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 `user_list_subscriptions`") # 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}/subscriptions', '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 user_list_teams(self, **kwargs): # noqa: E501 """List all the teams a user belongs to # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_list_teams(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[Team] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_list_teams_with_http_info(**kwargs) # noqa: E501 else: (data) = self.user_list_teams_with_http_info(**kwargs) # noqa: E501 return data def user_list_teams_with_http_info(self, **kwargs): # noqa: E501 """List all the teams a user belongs to # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_list_teams_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[Team] 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 user_list_teams" % 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/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 user_search(self, **kwargs): # noqa: E501 """Search for users # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_search(async_req=True) >>> result = thread.get() :param async_req bool :param str q: keyword :param int uid: ID of the user to search for :param int page: page number of results to return (1-based) :param int limit: page size of results :return: object If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_search_with_http_info(**kwargs) # noqa: E501 else: (data) = self.user_search_with_http_info(**kwargs) # noqa: E501 return data def user_search_with_http_info(self, **kwargs): # noqa: E501 """Search for users # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_search_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param str q: keyword :param int uid: ID of the user to search for :param int page: page number of results to return (1-based) :param int limit: page size of results :return: object If the method is called asynchronously, returns the request thread. """ all_params = ['q', 'uid', '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 user_search" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'q' in params: query_params.append(('q', params['q'])) # noqa: E501 if 'uid' in params: query_params.append(('uid', params['uid'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 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/search', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='object', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_update_o_auth2_application(self, id, body, **kwargs): # noqa: E501 """update an OAuth2 Application, this includes regenerating the client secret # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_update_o_auth2_application(id, body, async_req=True) >>> result = thread.get() :param async_req bool :param int id: application to be updated (required) :param CreateOAuth2ApplicationOptions body: (required) :return: OAuth2Application If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_update_o_auth2_application_with_http_info(id, body, **kwargs) # noqa: E501 else: (data) = self.user_update_o_auth2_application_with_http_info(id, body, **kwargs) # noqa: E501 return data def user_update_o_auth2_application_with_http_info(self, id, body, **kwargs): # noqa: E501 """update an OAuth2 Application, this includes regenerating the client secret # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_update_o_auth2_application_with_http_info(id, body, async_req=True) >>> result = thread.get() :param async_req bool :param int id: application to be updated (required) :param CreateOAuth2ApplicationOptions body: (required) :return: OAuth2Application 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 user_update_o_auth2_application" % 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 `user_update_o_auth2_application`") # 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 `user_update_o_auth2_application`") # 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', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/user/applications/oauth2/{id}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='OAuth2Application', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_verify_gpg_key(self, **kwargs): # noqa: E501 """Verify a GPG key # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_verify_gpg_key(async_req=True) >>> result = thread.get() :param async_req bool :return: GPGKey If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_verify_gpg_key_with_http_info(**kwargs) # noqa: E501 else: (data) = self.user_verify_gpg_key_with_http_info(**kwargs) # noqa: E501 return data def user_verify_gpg_key_with_http_info(self, **kwargs): # noqa: E501 """Verify a GPG key # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_verify_gpg_key_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: GPGKey If the method is called asynchronously, returns the request thread. """ all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_verify_gpg_key" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/user/gpg_key_verify', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GPGKey', # 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)