LP#1367926: Add support for (nearly) direct access to the full unapi backend user/miker/lp_1367926-extended-unapi
authorMike Rylander <mrylander@gmail.com>
Wed, 10 Sep 2014 16:22:44 +0000 (12:22 -0400)
committerMike Rylander <mrylander@gmail.com>
Wed, 10 Sep 2014 21:24:37 +0000 (17:24 -0400)
commit82278c64a5f6644d273f4af38bb6542b4a26b3c3
tree456fd790d9e7381e1fef7ad778b45fcafc3c7828
parentd6c14634e23bd4189b1deb1382227c526af483fc
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