]> git.evergreen-ils.org Git - Evergreen.git/commit
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)
committerKathy Lussier <klussier@masslnc.org>
Thu, 18 Feb 2016 15:52:20 +0000 (10:52 -0500)
commit4fbeac6d22deeeeb9d5998f072df8662f7ed2c68
treeec6cd6e945440a161e5d9f1ef5b691f10258fbac
parentfb65ec1881afc5c4d217b3a0502ad288b063f8db
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>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
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