diff --git a/biblio-tools/examples.http b/biblio-tools/examples.http index b8c8dc7..38fbefc 100644 --- a/biblio-tools/examples.http +++ b/biblio-tools/examples.http @@ -117,3 +117,32 @@ ] ### +# wos/fecth +POST http://localhost:31976/v1/wos/fetch?indent=true HTTP/1.1 +Content-Type: application/json + +[ + { + "query": "0", + "value": "XX" + }, + { + "query" :"I", + "value": { + "databaseId": "WOK", + "usrQuery": "TS=(cadmium)", + "count": "5", + "firstRecord": "1" + } + }, + { + "query" :"II", + "value": { + "databaseId": "WOK", + "usrQuery": "TS=(cadmium)", + "count": "5", + "firstRecord": "6" + } + } +] +### diff --git a/biblio-tools/v1/wos/fetch.ini b/biblio-tools/v1/wos/fetch.ini new file mode 100644 index 0000000..0c77da7 --- /dev/null +++ b/biblio-tools/v1/wos/fetch.ini @@ -0,0 +1,76 @@ +# OpenAPI Documentation - JSON format (dot notation) +mimeType = application/json + +post.operationId = post-v1-wos-search +post.description = Recherche et récuperation dans le Web of science +post.summary = Récupération de notices WOS à partir d'un tableau de requetes +post.tags.0 = biblio-tools +post.requestBody.content.application/json.example.0.value.databaseId = WOK +post.requestBody.content.application/json.example.0.value.usrQuery = TS=(cadmium) +post.requestBody.content.application/json.example.0.value.count = 5 +post.requestBody.content.application/json.example.0.value.firstRecord = 1 +post.requestBody.content.application/json.schema.$ref = #/components/schemas/JSONStream +post.requestBody.required = true +post.parameters.0.description = Indenter le JSON résultant +post.parameters.0.in = query +post.parameters.0.name = indent +post.parameters.0.schema.type = boolean + +# Necessary plugins +[use] +plugin = basics +plugin = analytics +plugin = storage + +# Flow configuration +[JSONParse] +separator = * + +[env] +path = indent +value = true + +path = token +value = env('WOS_API_KEY') + +[expand] +path = value +size = 1 +cacheName = wos-search + +[expand/URLFetch] +path = value +target = value +url = https://wos-api.clarivate.com/api/wos/ +json = true +timeout = 60000 +noerror = true +header = accept: application/json +header = env('token').prepend('X-ApiKey:') +header = Content-Type: application/json + +[expand/replace] +path = id +value = get('id') +path = value +value = get('value.Data.Records.records.REC', 'n/a') + +[replace] +path = id +value = self().omit('value') +path = value +value = get('value', 'n/a') + +[exploding] +id = id +value = value + +[assign] +path = id.value +value = get('value') + +[exchange] +value = get('id') + +[dump] +indent = env('indent', false)