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.
The project uses Node Package Manager (NPM) for package management. Assuming Node is already installed, run the install for project dependencies:
npm installThe 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 startYou 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.
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 |
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 |
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 |
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 |
Original code licensed with MIT Licence.