Skip to content

API and front-end for searching all the UK public library catalogues for ISBN results

License

Notifications You must be signed in to change notification settings

LibrariesHacked/catalogues-api

Repository files navigation

Library Catalogues API

This is a web service, with basic front-end, for searching multiple UK public library catalogues. It implements the catalogues-library JavaScript library and exposes it as an API.

Install

The project uses Node Package Manager (NPM) for package management. Assuming Node is already installed, to install the project dependencies:

npm install

Run

The solution can be run on a local system with Node JS installed. The solution will be available under localhost at http://localhost:3000/.

npm run start

Load the Swagger/OpenAI documentation at http://localhost:3000/api

The solution can be deployed into any production environment set up to run Node.

Using the API

The project implements the following endpoints.

Service Description
Services Returns stored data about library services (authorities).
Libraries Returns branch/location information, taken from the online catalogue.
Availability Returns availability of a particular book.

Services

Returns selected contents of the data.json file for each service. This can be useful if a developer wished to create an interface that first listed the library authorities to be used in a search filter.

URL Route Description Example
/services Returns a list of library authorities http://localhost:3000/services

Libraries

Returns a list of the library service points in each library service. This may include mobile libraries, and different locations within individual library buildings.

URL Route Description Example
/libraries Returns a list of libraries for each service. /libraries
/libraries?service=:service Filters the results to a particular library service. /libraries?service=Wiltshire

Availability

Returns data showing the number of available/unavailable copies of the relevant title in each library service point, for each library service.

Route Description Example
/availability/:isbn Retrieves availability of a particular by ISBN. /availability/9780747538493
/availability/:isbn?service=:service Filters the results to a particular library service. /availability/9780747538493?service=Gloucestershire

Licence

Original code licensed with MIT Licence.