LP#1367926: Add support for (nearly) direct access to the full unapi backend
authorMike Rylander <mrylander@gmail.com>
Wed, 10 Sep 2014 16:22:44 +0000 (12:22 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 16 Feb 2016 18:36:27 +0000 (13:36 -0500)
commit7bcacb08d656d8a41a7a3de8b35bc2b2859c8aff
treeb9644c771511221c0aa816f57d1c74b519963368
parentc3fe2f44128f83720777052745015b2b7265887a
LP#1367926: Add support for (nearly) direct access to the full unapi backend

Some parts of Evergreen (notably the TPAC), and various 3rd party services,
would benefit from full and direct access to the power of the backend (read:
faster, more complete, more API-stable) unAPI (um) API. Related, many moons
ago, I built a perl module (OpenILS::Utils::TagURI) to make parsing of tag
URIs systematic for use in OpenSearch and unAPI contexts. This branch uses
O::U::TagURI and a simple shim inside open-ils.supercat to expose the power
of that backend unAPI functionality.

By way of example, here is the tag URI to look up a copy, by barcode, and
request the call number, bib and bib attributes at the same time.  The
barcode in this example is "ACQ140":

 tag::U2@acp/ACQ140{acn,bre,mra}/-/0/barcode

The full example URL would be something like:

 http://example.com/opac/extras/unapi?id=tag::U2@acp/ACQ140{acn,bre,mra}/-/0/barcode&format=xml

Here is retrieving a bib in MODS 3.2 with holdings embedded:

 tag::U2@bre/267{holdings_xml,acn,acp,mra}

And the URL:

 http://example.com/opac/extras/unapi?tag::U2@bre/267{holdings_xml,acn,acp,mra}&format=mods32

To test:

Try the example URLs, varying record ID, classes, and includes. Some
classes and includes available are:

* bre (bibs)
* acn (volumes)
* acp (copies)
* biblio_record_entry_feed (multiple bibs)
* holdings_xml
* cbs (bib source)
* circ (circulation checkout and due dates)

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/SuperCat.pm
Open-ILS/src/perlmods/lib/OpenILS/Utils/TagURI.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm