Skip to content

Commit

Permalink
docs: ✏️ update
Browse files Browse the repository at this point in the history
  • Loading branch information
touv committed May 17, 2024
1 parent 7c3561a commit 9f4f6c2
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
34 changes: 34 additions & 0 deletions docs/plugin-conditor.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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`
Expand Down
34 changes: 34 additions & 0 deletions packages/conditor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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`
Expand Down

0 comments on commit 9f4f6c2

Please sign in to comment.