diff --git a/biblio-tools/v1/unpaywall/corhal.ini b/biblio-tools/v1/unpaywall/corhal.ini index c80895c..066012b 100644 --- a/biblio-tools/v1/unpaywall/corhal.ini +++ b/biblio-tools/v1/unpaywall/corhal.ini @@ -69,6 +69,7 @@ path = query value = fix('{GetByDOI(dois:[', self.dois, ']){doi, is_oa, oa_status, has_repository_copy, oa_locations{host_type, is_best, license, url, url_for_landing_page, url_for_pdf}}}').join('') +text = graphql.input [spawn/combine/URLStream] url = https://unpaywall.inist.fr/api/graphql header = env('token').prepend('x-api-key:') @@ -80,6 +81,9 @@ [spawn/combine/drop] path = is_oa +[spawn/combine/debug] +text = graphql.output + # On créé l'object attendu par combine { id, value } pour faire le mapping [spawn/combine/replace] path = id @@ -91,11 +95,11 @@ path = value.oa_status value = get('oa_status') -path = value.host_type -value = get('best_oa_location.host_type', 'n/a') - path = value.has_repository_copy -value = get('has_repository_copy', 'n/a') +value = get('has_repository_copy') + +path = value.oa_locations +value = get('oa_locations') # On nettoie l'objet en supprimant les champs temporaires