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)
committerMike Rylander <mrylander@gmail.com>
Tue, 8 Dec 2015 14:47:19 +0000 (09:47 -0500)
commitcea7e2f8f1c64d1002a79a68e03f0298a260c9a6
treea63ca48fe5c05b4053c0ef9c74d7eee20d80f9be
parent2038e93aa68baaabe20a8b4218cfb0ed6fc5903c
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

Signed-off-by: Mike Rylander <mrylander@gmail.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