def fetch_datacite_metadata(): import json # CRCNS.org is publisher-id "cdl.ucbcrcns" # We request all of them at once arx = 'https://api.datacite.org/works?data-center-id=cdl.ucbcrcns&page%5Bsize%5D=1000' text = get_cached_url_content(arx, name='crcns', maxage=1) return json.loads(text)
def fetch_datacite_metadata(): import json # CRCNS.org is publisher-id "cdl.ucbcrcns" arx = 'http://search.datacite.org/api?q=datacentre_symbol:cdl.ucbcrcns' \ '&fl=doi,minted,updated,xml&fq=has_metadata:true&fq=is_active:true' \ '&rows=1000&start=0&sort=updated+asc&wt=json' text = get_cached_url_content(arx, name='crcns', maxage=1) return json.loads(text)
def _cached_load_document(url): """Loader of pyld document from a url, which caches loaded instance on disk """ from datalad.support.network import get_cached_url_content from pyld.jsonld import load_document return get_cached_url_content( url, name='schema', fetcher=load_document, maxage=1 )
def _cached_load_document(url): """Loader of pyld document from a url, which caches loaded instance on disk """ from datalad.support.network import get_cached_url_content from pyld.jsonld import load_document return get_cached_url_content(url, name='schema', fetcher=load_document, maxage=1)