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.
The project uses Node Package Manager (NPM) for package management. Assuming Node is already installed, to install the project dependencies:
npm install
The solution can be run on a local system with Node JS installed. The solution will be available under localhost at https://localhost:3000/.
npm run start
Load the Swagger/OpenAI documentation at https://localhost:3000/api
The solution can be deployed into any production environment set up to run Node.
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. |
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 | https://localhost:3000/services |
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 |
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 |
Original code licensed with MIT Licence.