def request_all_static_data(self): all_required_sources = [{'partype' : True}, {'passive': True}, {'spells': True}, {'stats': True} ] rs = RiotConstants() query_data_tool = QueryStaticData('9de3f30d-f37c-4153-afd8-480f746c650d' , 'europe_west' ) for item in all_required_sources: for key in item: if item[key] == True: query_data_tool.request_all_champs_info({"champData" : key}) if rs.is_error_code(query_data_tool.m_query_response_code) == False: query_data_tool.export_json_response('json_' + key + '.txt') else: print(rs.ERROR_CODES_DESCRIPTION [query_data_tool.m_query_response_code]['name']) print(rs.ERROR_CODES_DESCRIPTION [query_data_tool.m_query_response_code]['message']) return False return True