Penguin Random House Developer Blog
Enhanced API v1.2.6 released
On Wednesday June 20, 2016, version 1.2.6 of the Enhanced PRH API was released to production. If you encounter any problems with your applications as a result of these changes, please contact us at api@penguinrandomhouse.com.
Version 1.2.6 release notes
This version is another maintenance release with a couple of bug fixes as well as some additions to support Sales website development. The bug fixes involved making the performance of rows=0 consistent with a couple of views as well as returning data from the /titles/{isbn}/content subresource when only TI sheet data was present.
New filter field: propertyName
You can now restrict results by the database field TITLE.PROPERTYNAME.
/domains/PRH.US/works?propertyName=Sesame%20Street
{ "status": "ok", "recordCount": 111, "startTimestamp": "2016-06-20T11:03Z", "endTimestamp": "2016-06-20T11:03Z", "timeTaken": 11, "data": { "works": [ { "workId": 1493, "title": "Elmo Loves You (Sesame Street)", "author": "Sarah Albee; illustrated by Maggie Swanson", "onsale": "2002-01-02", "language": "E",
Sorting author-display view by ISBN on-sale date
Among the new features added is support for the sort parameter "frontlistiest_onsale" in the view /authors/{authorId}/views/author-display. This causes the "works" listing to be ordered by the on-sale date of the frontlistiest ISBN rather than the on-sale date of the work.
Note on views and features like sort parameters
It is perhaps useful to point out that in most cases, views have been developed narrowly to work for only a few specific use cases and thus do not have generalized support for sorts or certain parameters. If in the course of your analysis you discover that you need a particular sort for a particular view, the recommended course of action is to make sure that you can first fetch the desired data through vanilla requests (e.g. /works?sort=frontlistiest_onsale) and then try to achieve the same with your view. If that does not work, please contact the API team or file a JIRA ticket including a description of what your goals are and we can work together to figure out how to get the data to you.
Related titles view
A new experimental view was added, /works/{workId}/views/semantic-neighbors. This displays the content of the excellent work done by Binesh Bannerjee to identify title similarity based on their content. I say "experimental" because the representation may not be final but we wanted to make the data available so that we could start evaluating who and where might be interested in trying to consume this data. Once we have some more use cases and some more experience consuming the data, we may adjust the representation of this endpoint. Consider it a WIP.
/domains/PRH.US/works/196906/views/semantic-neighbors
{ "status": "ok", "recordCount": 69, "startTimestamp": "2016-06-20T11:00Z", "endTimestamp": "2016-06-20T11:00Z", "timeTaken": 1096, "data": { "works": [ { "workId": 247229, "hex16": "DD39", "hex32": "E1626AC7", "x": 0.5667396, "y": -0.4541904, "distance": 0.23455576079764, "hammingDistance": 1 }, { "workId": 314442, "hex16": "5D39", "hex32": "61E0AAC7", "x": 0.4750087, "y": -0.5941597, "distance": 0.28791003243223, "hammingDistance": 0 },
Searching for categories
We have added the capability to use the /search endpoint to find Category records by adding a new "category" document type to the Solr index. Currently only the 'CN' (Consumer) and 'BI' (BISAC) category sets are supported. By default, searches exclude the category documents since the normal use case of search is looking for books, authors and series. If you want to do a search for a category, you must specify "&docType=category" as part of your request.
/domains/PRH.US/search?q=romance&docType=category
{ "status": "ok", "recordCount": 43, "startTimestamp": "2016-06-20T11:18Z", "endTimestamp": "2016-06-20T11:18Z", "timeTaken": 12, "data": { "results": [ { "docType": "category", "id": "category-2000000131-CN", "key": "2000000131", "name": "Romance", "score": 9.895405, ... }, { "docType": "category", "id": "category-2000000035-CN", "key": "2000000035", "name": "Contemporary Romance", "score": 6.6383224,
Bug
- [RHAPI-477] - Remove references to WORKxAUTHOR
- [RHAPI-534] - &rows=0 is not working in alsoInSeries
- [RHAPI-535] - &rows=0 is not working in alsoInAuthor
- [RHAPI-538] - /titles/{isbn}/content returns a 404 if ISBNxMAIN is missing but TI Sheet data is present
New Feature
- [RHAPI-481] - Allow search of categories by name
- [RHAPI-518] - Add new fields into search-display
- [RHAPI-540] - Create a new sort parameter to sort works in the author-display view by title on-sale date
Task
- [RHAPI-529] - Add preferExport logic to alsoInAuthor view
- [RHAPI-530] - Add preferExport logic to alsoInSeries view
- [RHAPI-531] - Convert representations from interface/implementation back to simple classes
- [RHAPI-536] - Add propertyName filter
- [RHAPI-539] - Implement view /works/{workId}/views/semantic-neighbors
- [RHAPI-544] - Restrict PRH.US_EREADER and CAN_EREADER domains to Internal clients only
0 Comments
Please sign in to post a comment.