Support for v5 of the Patron API
Pre-releaseComplete support for the Patron API
In additional to completing support for v4 of the Patron API, this release also extends support to v5.
Updated function names
The naming scheme of the functions in Patron API has been updated.
Support for v5
This has required some structural changes to the library so it can automatically select either v4 or v5 of the API is used, depending on the capabilities of the Sierra API host.
Instead of the library initialising at start up, the library now exports the factory function SierraAPIAsPromised
, that returns SierraAPIConnection
objects. From an SierraAPIConnection
object, you can access the API. SierraAPIAsPromised
selects the correct version of the API based on the about info received from the Sierra API host.
Forwards compatibility
Normally the latest API version that both the host and the library supports is selected. This can be controlled with apiMajorVersion
configuration option. apiMajorVersion
can bring forwards compatibility to library users when the library is updated with newer API versions that bring breaking changes.
Backwards compatability
The new findPatron
function has been added to the v5 Patron API. So the findPatronWithBarcode
function in the v5 Patron API is emulated by calling findPatron
giving b
for varFieldTag
.