Comment 1 for bug 1541559

Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

For anyone interested, my (very incomplete, pre-alpha) working branch is here:
http://git.sitka.bclibraries.ca/gitweb/?p=sitka/evergreen.git;a=shortlog;h=refs/heads/user/jeffdavis/ebook-api-upstream

The backend design is somewhat similar to Evergreen's added content module. Common functionality and API calls are defined in the main Perl module, OpenILS::Application::EbookAPI, while vendor-specific details like endpoint URLs are broken out into separate "handler" submodules for each vendor API. The actual mechanics of HTTP requests/responses are handled by the new OpenILS::Utils::HTTPClient module.

The frontend is essentially a JS layer over top of the OPAC, with some light use of Dojo since we're already using it, plus a few additions to TT2 templates. The JS layer uses the OpenSRF translator to talk to the open-ils.ebook_api service, which in turn makes the appropriate calls to the third-party API. (This is a little different from the existing OverDrive integration layer, where the client did most of the work and the server was merely a proxy.) The open-ils.ebook_api service is session-based; when the client initializes a session, connection info is pulled from org unit settings and stored in memcached, and the session ID is saved in a browser cookie. Among other things, this prevents authentication tokens from being exposed to the client.

The user will see the following changes:

- The "Place Hold" link on search results and record summary, which is currently suppressed on e-books, will be replaced with a "Check Out" link, allowing the user to directly check out the title from OneClickdigital (OPAC login required, of course).

- If the title is not available, the "Check Out" link will instead be a "Place Hold" link, allowing the user to place a hold on the title with OneClickdigital.

- For OverDrive, e-book holdings information (number of "copies" available per format) will be displayed in item details. OneClickdigital doesn't have this concept of holdings, so there is nothing to display.

- When the user is logged in, the dashboard will show a count of e-book checkouts and holds. This will be separate from the "main" checkouts/holds display, since checkouts/holds on titles from third-party vendors are unrelated to checkouts/holds in Evergreen.

- Additional tabs in My Account will allow the user to view their e-book checkouts, checkin or renew titles, view or cancel holds, etc.