vitorsilverio / libraryapi

An API to get MARC data from Pergamum.
https://libraryapi.sites.ufsc.br/docs
GNU General Public License v3.0
3 stars 1 forks source link
api docker ils python

libraryapi

deploy lint Snyk CodeQL Analysis Tests Dockerhub

An API to get MARC (Machine-Readable Cataloging) data in many formats (MARC ISO, MARCXML, mnemonic MARC, JSON) from ILS like Pergamum.

Update

If you use an instance of Pergamum version 10 or you want to use a JavaScript tool that uses API, see the Get Pergamum Marc Records tool.

Running

Using Docker

Locally

Endpoints and services

Check the endpoints in documentation page at http://**deploy-ip**:**port**/docs

Demo

See a working demo instance:

Examples (version 2)

Using query params:

https://libraryapi.sites.ufsc.br/api/v2/pergamum/64967?url=https://pergamumweb.udesc.br/pergamum/web_service/servidor_ws.php&media_type=application/marc

https://libraryapi.sites.ufsc.br/api/v2/pergamum/64967?url=https://pergamumweb.udesc.br/pergamum/web_service/servidor_ws.php&media_type=application/xml

https://libraryapi.sites.ufsc.br/api/v2/pergamum/64967?url=https://pergamumweb.udesc.br/pergamum/web_service/servidor_ws.php&media_type=text/plain

https://libraryapi.sites.ufsc.br/api/v2/pergamum/64967?url=https://pergamumweb.udesc.br/pergamum/web_service/servidor_ws.php&media_type=application/json

Using headers:

curl "https://libraryapi.sites.ufsc.br/api/v2/pergamum/64967" \
-H "Server: https://pergamumweb.udesc.br/pergamum/web_service/servidor_ws.php" \
-H "Accept: application/marc"
curl "https://libraryapi.sites.ufsc.br/api/v2/pergamum/64967" \
-H "Server: https://pergamumweb.udesc.br/pergamum/web_service/servidor_ws.php" \
-H "Accept: application/xml"
curl "https://libraryapi.sites.ufsc.br/api/v2/pergamum/64967" \
-H "Server: https://pergamumweb.udesc.br/pergamum/web_service/servidor_ws.php" \
-H "Accept: text/plain"
curl "https://libraryapi.sites.ufsc.br/api/v2/pergamum/64967" \
-H "Server: https://pergamumweb.udesc.br/pergamum/web_service/servidor_ws.php" \
-H "Accept: application/json"

Version 1 style (deprecated)

Contributing

Please read Contibution.md to know how to contribute code or buy me a ☕