From 9f4f6c239896abc14f48cd988f663a4b78c48367 Mon Sep 17 00:00:00 2001 From: Nicolas Thouvenin Date: Fri, 17 May 2024 16:32:34 +0200 Subject: [PATCH] =?UTF-8?q?docs:=20=E2=9C=8F=EF=B8=8F=20update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/plugin-conditor.md | 34 ++++++++++++++++++++++++++++++++++ packages/conditor/README.md | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/docs/plugin-conditor.md b/docs/plugin-conditor.md index cba40ace1..86d33c4ca 100644 --- a/docs/plugin-conditor.md +++ b/docs/plugin-conditor.md @@ -56,6 +56,7 @@ Sachant qu'on appauvrit (casse, accents, tiret, apostrophe) tous les champs. - [compareRnsr](#comparernsr) - [conditorScroll](#conditorscroll) - [CORHALFetch](#corhalfetch) +- [CORHALFetch](#corhalfetch-1) - [getRnsr](#getrnsr) - [getRnsrInfo](#getrnsrinfo) - [WOSFetch](#wosfetch) @@ -226,6 +227,39 @@ Output: Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** +### CORHALFetch + +Take `String` as URL, throw each chunk from the result + +Input: + +```json +[ + { q: "toto" }, +] +``` + +Script: + +```ini +[CORHALFetch] +url = https://corhal-api.inist.fr +``` + +Output: + +```json +[{...}, {"a": "b"}, {"a": "c" }] +``` + +#### Parameters + +- `url` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** corhal api url +- `timeout` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Timeout in milliseconds (optional, default `1000`) +- `retries` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** The maximum amount of times to retry the connection (optional, default `5`) + +Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** + ### getRnsr Find the RNSR identifier(s) matching the `address` and the publication `year` diff --git a/packages/conditor/README.md b/packages/conditor/README.md index cba40ace1..86d33c4ca 100644 --- a/packages/conditor/README.md +++ b/packages/conditor/README.md @@ -56,6 +56,7 @@ Sachant qu'on appauvrit (casse, accents, tiret, apostrophe) tous les champs. - [compareRnsr](#comparernsr) - [conditorScroll](#conditorscroll) - [CORHALFetch](#corhalfetch) +- [CORHALFetch](#corhalfetch-1) - [getRnsr](#getrnsr) - [getRnsrInfo](#getrnsrinfo) - [WOSFetch](#wosfetch) @@ -226,6 +227,39 @@ Output: Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** +### CORHALFetch + +Take `String` as URL, throw each chunk from the result + +Input: + +```json +[ + { q: "toto" }, +] +``` + +Script: + +```ini +[CORHALFetch] +url = https://corhal-api.inist.fr +``` + +Output: + +```json +[{...}, {"a": "b"}, {"a": "c" }] +``` + +#### Parameters + +- `url` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** corhal api url +- `timeout` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Timeout in milliseconds (optional, default `1000`) +- `retries` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** The maximum amount of times to retry the connection (optional, default `5`) + +Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** + ### getRnsr Find the RNSR identifier(s) matching the `address` and the publication `year`