@must_have_permission('write')
@must_have_addon(SHORT_NAME, 'user')
@must_have_addon(SHORT_NAME, 'node')
def dataverse_get_datasets(node_addon, **kwargs):
 alias = request.json.get('alias')
 connection = client.connect_from_settings(node_addon)
 dataverse = client.get_dataverse(connection, alias)
 datasets = client.get_datasets(dataverse)
 ret = {'alias': alias, 'datasets': [{'title': dataset.title, 'doi': dataset.doi} for dataset in datasets]}
 return (ret, http.OK)

@ must_have_permission ( 'write' ) @ must_have_addon ( SHORT_NAME , 'user' ) @ must_have_addon ( SHORT_NAME , 'node' ) def dataverse_get_datasets ( node_addon , ** kwargs ) : alias = request . json . get ( 'alias' ) connection = client . connect_from_settings ( node_addon ) dataverse = client . get_dataverse ( connection , alias ) datasets = client . get_datasets ( dataverse ) ret = { 'alias' : alias , 'datasets' : [ { 'title' : dataset . title , 'doi' : dataset . doi } for dataset in datasets ] } return ( ret , http . OK )
get list of datasets from provided dataverse alias .