OneClickdigital API integration
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
OneClickdigital now provides APIs to allow third-party applications to interact with their products and services (see http://
1. Add a simple, generic HTTPClient utility to handle HTTP requests/responses from third-party servers. (This can also be used by open-ils.resolver and other EG services.)
2. Develop a generic third-party-API integration service for EG, open-ils.ebook_api, which can be used "out of the box" with OneClickdigital.
3. Eventually, add OverDrive API integration using the open-ils.ebook_api service. This will supersede the existing OverDrive integration layer described in bug 1410537, which currently works but has limitations that make it hard to extend for use with non-OverDrive services.
My target for steps 1 and 2 is late summer/fall 2016, with step 3 to follow at some point afterwards.
Changed in evergreen: | |
assignee: | nobody → Jeff Davis (jdavis-sitka) |
importance: | Undecided → Wishlist |
Changed in evergreen: | |
milestone: | 2.next → 2.12-beta |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
For anyone interested, my (very incomplete, pre-alpha) working branch is here: git.sitka. bclibraries. ca/gitweb/ ?p=sitka/ evergreen. git;a=shortlog; h=refs/ heads/user/ jeffdavis/ ebook-api- upstream
http://
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.