diff --git a/README.md b/README.md index 888443e..171545b 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,59 @@ (...) +### Tester + +Des exemples de requetes sont disponbiles dans des fichers `examples.http` +ceux-ci peuvent être utilisés directment dans VSCode, avec l'extension REST Client (humao.rest-client) +Ils peuvent également être lancés en ligne de commande via [rest-cli](https://www.npmjs.com/package/rest-cli) +ou via [dot-http](https://github.com/bayne/dot-http) + +Exemple : + +```bash + +$ restcli ./biblio-tools/examples.http +examples:1 [1] POST https://biblio-tools.services.inist.fr/v1/unpaywall/is_oa?indent=true +examples:2 [1] POST https://biblio-tools.services.inist.fr/v1/crossref/prefixes/expand?indent=true +$ restcli --full ./affiliations-libpostal/examples.http +examples:1 [1] POST https://affiliations-libpostal.services.inist.fr/v1/parse?indent=true +POST https://affiliations-libpostal.services.inist.fr/v1/parse?indent=true +Content-Type: application/json + +[ + { + "value": "Barboncino 781 Franklin Ave, Crown Heights, Brooklyn, NY 11238" + } +] + +HTTP/1.1 200 OK +Access-Control-Allow-Origin: * +Connection: close +Content-Disposition: inline +Content-Encoding: gzip +Content-Type: application/octet-stream +Date: Fri, 23 Jul 2021 09:00:14 GMT +Server: nginx/1.15.10 +Transfer-Encoding: chunked + +[{ + "value": { + "id": "Barboncino 781 Franklin Ave, Crown Heights, Brooklyn, NY 11238", + "value": { + "house": "barboncino", + "house_number": "781", + "road": "franklin ave", + "suburb": "crown heights", + "city_district": "brooklyn", + "state": "ny", + "postcode": "11238" + } + } +}] + +``` + + ### Déclarer la documentation Swagger Le répertoire `www-home` contient le HTML de la page d'accueil diff --git a/affiliations-libpostal/examples.http b/affiliations-libpostal/examples.http new file mode 100644 index 0000000..d8b9840 --- /dev/null +++ b/affiliations-libpostal/examples.http @@ -0,0 +1,11 @@ + +POST https://affiliations-libpostal.services.inist.fr/v1/parse?indent=true HTTP/1.1 +Content-Type: application/json + +[ + { + "value": "Barboncino 781 Franklin Ave, Crown Heights, Brooklyn, NY 11238" + } +] + +### diff --git a/biblio-tools/examples.http b/biblio-tools/examples.http new file mode 100644 index 0000000..9fddd49 --- /dev/null +++ b/biblio-tools/examples.http @@ -0,0 +1,25 @@ +# unpaywall/is_oa +POST https://biblio-tools.services.inist.fr/v1/unpaywall/is_oa?indent=true HTTP/1.1 +Content-Type: application/json + +[ + { "value": "10.1016/j.fuel.2018.07.071" }, + { "value": "10.1007/s10980-018-0699-8" }, + { "value": "10.1159/000490004" }, + { "value": "10.1016/j.memsci.2018.08.024"} +] +### + + +# crossref/pref +POST https://biblio-tools.services.inist.fr/v1/crossref/prefixes/expand?indent=true HTTP/1.1 +Content-Type: application/json + +[ + { "value": "10.3998"}, + { "value": "10.1016" }, + { "value": "10.1007" }, + { "value": "10.1159" }, + { "value": "10.1037"} +] +### diff --git a/biblio-tools/v1/crossref/prefixes/README.md b/biblio-tools/v1/crossref/prefixes/README.md deleted file mode 100644 index fd80c11..0000000 --- a/biblio-tools/v1/crossref/prefixes/README.md +++ /dev/null @@ -1,9 +0,0 @@ -## To Test -``` -cat <