def get_player_with_http_info(self, player_tag, **kwargs): # noqa: E501 """Get player information # noqa: E501 Get information about a single player by player tag. Player tags can befound either in game or by from clan member lists. Note that player tags start with hash character '#' and that needs to be URL-encoded properly to work in URL, so for example player tag '#2ABC' would become '%232ABC' in the URL. # 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_player_with_http_info(player_tag, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str player_tag: Tag of the player to retrieve. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PlayerDetail, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['player_tag'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_player" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'player_tag' is set if ('player_tag' not in local_var_params or local_var_params['player_tag'] is None): raise ApiValueError( "Missing the required parameter `player_tag` when calling `get_player`" ) # noqa: E501 collection_formats = {} path_params = {} if 'player_tag' in local_var_params: path_params['playerTag'] = local_var_params[ 'player_tag'] # 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 # Authentication setting auth_settings = ['JWT'] # noqa: E501 return self.api_client.call_api( '/players/{playerTag}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PlayerDetail', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def get_global_tournaments_with_http_info(self, **kwargs): # noqa: E501 """List global tournaments # noqa: E501 List all available global tournaments. # 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_global_tournaments_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(TournamentSearchResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() 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') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_global_tournaments" % key) local_var_params[key] = val del local_var_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 # Authentication setting auth_settings = ['JWT'] # noqa: E501 return self.api_client.call_api( '/globaltournaments', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TournamentSearchResult', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def get_clan_ranking_with_http_info(self, location_id, **kwargs): # noqa: E501 """Get clan rankings for a specific location # noqa: E501 Get clan rankings for a specific location # 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_clan_ranking_with_http_info(location_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str location_id: Identifier of the location to retrieve. (required) :param int limit: Limit the number of items returned in the response. :param int after: Return only items that occur after this marker. After marker can be found from the response, inside the 'paging' property. Note that only after or before can be specified for a request, not both. :param int before: Return only items that occur before this marker. Before marker can be found from the response, inside the 'paging' property. Note that only after or before can be specified for a request, not both. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(ClanRankingList, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['location_id', 'limit', 'after', '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') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_clan_ranking" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'location_id' is set if ('location_id' not in local_var_params or local_var_params['location_id'] is None): raise ApiValueError("Missing the required parameter `location_id` when calling `get_clan_ranking`") # noqa: E501 collection_formats = {} path_params = {} if 'location_id' in local_var_params: path_params['locationId'] = local_var_params['location_id'] # noqa: E501 query_params = [] if 'limit' in local_var_params: query_params.append(('limit', local_var_params['limit'])) # noqa: E501 if 'after' in local_var_params: query_params.append(('after', local_var_params['after'])) # noqa: E501 if 'before' in local_var_params: query_params.append(('before', local_var_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 # Authentication setting auth_settings = ['JWT'] # noqa: E501 return self.api_client.call_api( '/locations/{locationId}/rankings/clans', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ClanRankingList', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def search_tournaments_with_http_info(self, **kwargs): # noqa: E501 """Search tournaments # noqa: E501 Search all tournaments by name. It is not possible to specify ordering for results so clients should not rely on any specific ordering as that may change in the future releases of the API. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_tournaments_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: Search tournaments by name. :param int limit: Limit the number of items returned in the response. :param int after: Return only items that occur after this marker. After marker can be found from the response, inside the 'paging' property. Note that only after or before can be specified for a request, not both. :param int before: Return only items that occur before this marker. Before marker can be found from the response, inside the 'paging' property. Note that only after or before can be specified for a request, not both. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(TournamentSearchResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['name', 'limit', 'after', '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') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method search_tournaments" % key) local_var_params[key] = val del local_var_params['kwargs'] if ('name' in local_var_params and len(local_var_params['name']) < 1): raise ApiValueError( "Invalid value for parameter `name` when calling `search_tournaments`, length must be greater than or equal to `1`" ) # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'name' in local_var_params: query_params.append( ('name', local_var_params['name'])) # noqa: E501 if 'limit' in local_var_params: query_params.append( ('limit', local_var_params['limit'])) # noqa: E501 if 'after' in local_var_params: query_params.append( ('after', local_var_params['after'])) # noqa: E501 if 'before' in local_var_params: query_params.append( ('before', local_var_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 # Authentication setting auth_settings = ['JWT'] # noqa: E501 return self.api_client.call_api( '/tournaments', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TournamentSearchResult', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def get_current_war_with_http_info(self, clan_tag, **kwargs): # noqa: E501 """Information about clan's current clan war # noqa: E501 Retrieve information about clan's current clan war # 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_current_war_with_http_info(clan_tag, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str clan_tag: Tag of the clan whose war log to retrieve. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(WarCurrent, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['clan_tag'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_current_war" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'clan_tag' is set if ('clan_tag' not in local_var_params or local_var_params['clan_tag'] is None): raise ApiValueError("Missing the required parameter `clan_tag` when calling `get_current_war`") # noqa: E501 collection_formats = {} path_params = {} if 'clan_tag' in local_var_params: path_params['clanTag'] = local_var_params['clan_tag'] # 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 # Authentication setting auth_settings = ['JWT'] # noqa: E501 return self.api_client.call_api( '/clans/{clanTag}/currentwar', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='WarCurrent', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)