##// END OF EJS Templates
v2.9.2 :: Fixed 'download' bugs
eynilupu -
r19:1886da7a44e6
parent child
Show More
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
@@ -413,7 +413,7 class JROAPI():
413 else:
413 else:
414 return 'ERROR:: "type_option" must be <str>'
414 return 'ERROR:: "type_option" must be <str>'
415
415
416 def download_files(self, id_or_name, processes=1, path=os.path.expanduser("~"), **kwargs):
416 def download_files(self, id, processes=1, path=os.path.expanduser("~"), **kwargs):
417 '''
417 '''
418 FINALIDAD:
418 FINALIDAD:
419 Funcion personalizada avanzada para la descarga de archivos existentes de un(os) dataset(s).
419 Funcion personalizada avanzada para la descarga de archivos existentes de un(os) dataset(s).
@@ -422,7 +422,7 class JROAPI():
422 CONSULTAR: "GUIA DE SCRIPT.pdf"
422 CONSULTAR: "GUIA DE SCRIPT.pdf"
423
423
424 ESTRUCTURA:
424 ESTRUCTURA:
425 <access_name>.download_files(id_or_name= <class 'str' or 'list'>, param_1 = <class 'param_1'>, ...)
425 <access_name>.download_files(id = <class 'str' or 'list'>, param_1 = <class 'param_1'>, ...)
426 '''
426 '''
427 #------------------ PATH ----------------------#
427 #------------------ PATH ----------------------#
428 if isinstance(path, str):
428 if isinstance(path, str):
@@ -446,12 +446,12 class JROAPI():
446 return 'ERROR:: "processes" must be: <class "int">'
446 return 'ERROR:: "processes" must be: <class "int">'
447
447
448 #------------------ ID OR NAME ----------------#
448 #------------------ ID OR NAME ----------------#
449 if isinstance(id_or_name, str):
449 if isinstance(id, str):
450 id_or_name = [id_or_name]
450 id = [id]
451 elif isinstance(id_or_name, list):
451 elif isinstance(id, list):
452 id_or_name = list(map(str, id_or_name))
452 id = list(map(str, id))
453 else:
453 else:
454 return 'ERROR:: dataset "id_or_name" must be: <class "str" or "list">'
454 return 'ERROR:: dataset "id" must be: <class "str" or "list">'
455 #----------------------------------------------#
455 #----------------------------------------------#
456 arguments = {
456 arguments = {
457 '--apikey': self.Authorization,
457 '--apikey': self.Authorization,
@@ -481,7 +481,7 class JROAPI():
481 #'--upload-logo': False,
481 #'--upload-logo': False,
482 #'--upload-resources': False,
482 #'--upload-resources': False,
483 #'--version': False,
483 #'--version': False,
484 'ID_OR_NAME': id_or_name,
484 'ID_OR_NAME': id,
485 'datasets': True,
485 'datasets': True,
486 'dump': True,
486 'dump': True,
487 #'ACTION_NAME': None,
487 #'ACTION_NAME': None,
General Comments 0
You need to be logged in to leave comments. Login now