Skip to content

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 and UI.

Install

The project uses Node Package Manager (NPM) for package management. Assuming Node is already installed, run the install for 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

You can 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.

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

Services

Returns stored information for each service. This can be useful if a developer wished to create an interface that listed the library authorities to be used in a search filter.

URL Route Description Example
/api/services Returns a list of library authorities http://localhost:3000/api/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
/api/libraries Returns a list of libraries for each service. /api/libraries
/api/libraries?service=:service Filters the results to a particular library service. /api/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
/api/availability/:isbn Retrieves availability of a particular by ISBN. /api/availability/9780747538493
/api/availability/:isbn?service=:service Filters the results to a particular library service. /api/availability/9780747538493?service=Gloucestershire

Licence

Original code licensed with MIT Licence.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •