Penguin Random House Developer Blog
RSS FeedEnhanced API v1.1.7 released
On Thursday October 8, 2015, version 1.1.7 of the Enhanced PRH API was released to production. There were several bug fixes along with some enhancements for handling multiple authors and displaying series data.
If you encounter any problems with your applications as a result of these changes, please contact us at api@penguinrandomhouse.com.
Version 1.1.7 release notes
Enhancements to handle multiple authors
Even though SAP, our system of record, will have just a single author ID for a person (8240 Janet Evanovich), MyHouse may need to create a separate author ID for distribution clients to be able to attach their own content to (223351 Janet Evanovich). This distinction between core and distribution is captured in the field companyCode which is now exposed as part of the author representation. Further, the distribution author records reference the parent record from which they were created with the field clientSourceId.
/domains/PRH.US/authors/8240
"authorId": 8240, "display": "Janet Evanovich", "first": "Janet", "last": "Evanovich", "company": { "key": "R_H", "value": null }, "clientSourceId": 0, "seoFriendlyUrl": "\/authors\/8240\/janet-evanovich",
In addition the author-display view of the author resource has been expanded to include nested representations of the client authors when the core author is accessed.
/domains/PRH.US/authors/8240/views/author-display
"authorId": 8240, "display": "Janet Evanovich", ... "company": { "key": "R_H", "value": null }, "clientSourceId": 0, "clientAuthors": { "223351": { "authorId": 223351, "display": "Janet Evanovich", "ontour": false, "spotlight": null, "hasAuthorPhoto": false, "photoCredit": null, "photoDate": null, "firstInitial": "J", "lastInitial": "E",
Search was also modified to accommodate this distinction. Author documents now have the field "companyCode" which is either the text "R_H" or a distribution client's two-character division code. The search endpoint exposes the new parameter companyCode to allow PRH.com to restrict search results to just core authors (e.g. 8240 Janet Evanovich) and exclude the distribution versions of those same authors (e.g. 223351 Janet Evanovich).
Enhancements to series data
To support PRH.com development on series pages, new functionality was added around returning series data. We are now computing a number of properties of a series at load time including a series date, whether the series is numbered or not, and works that can represent the series. This data is now returned as part of the series representation.
/domains/PRH.US/series/SOO
"seriesCode": "SOO", "seriesName": "A Song of Ice and Fire", "description": "<b>An immersive entertainment experience unlike any other, A Song of Ice and Fire has earned George R. R. Martin—dubbed “the American Tolkien” by <i>Time<\/i> magazine—international acclaim and millions of loyal readers.<\/b><br><br> In a land where summers can last decades and winters a lifetime, trouble is brewing. The cold is returning, and in the frozen wastes to the North of Winterfell, sinister and supernatural forces are massing beyond the kingdom’s protective Wall. At the center of the conflict lie the Starks of Winterfell, a family as harsh and unyielding as the land they were born to. Sweeping from a land of brutal cold to a distant summertime kingdom of epicurean plenty, here is a tale of lords and ladies, soldiers and sorcerers, assassins and bastards, who come together in a time of grim omens. Amid plots and counterplots, tragedy and betrayal, victory and terror, the fate of the Starks, their allies, and their enemies hangs perilously in the balance, as each endeavors to win that deadliest of conflicts: the game of thrones.<br><br> <b>Praise for A Song of Ice and Fire<\/b><br><br> “One of the best series in the history of fantasy.”<b>—<i>Los Angeles Times<\/i><\/b><br><br> “Long live George Martin . . . a literary dervish, enthralled by complicated characters and vivid language, and bursting with the wild vision of the very best tale tellers.”<b><i>—The New York Times<\/i><\/b><br><br> “The only fantasy series I’d put on a level with J.R.R. Tolkien’s The Lord of the Rings . . . a fantasy series for hip, smart people, even those who don’t read fantasy.”<b>—<i>Chicago Tribune<\/i><\/b><br><br> “Martin has produced—is producing, since the series isn’t over—the great fantasy epic of our era.”<b>—Lev Grossman, <i>Time<\/i><\/b><br>", "seriesCount": 3, "seriesDate": "2015-10-06", "isNumbered": true, "isKids": false, "seoFriendlyUrl": "\/series\/SOO\/a-song-of-ice-and-fire",
In addition we recognized that sometimes exploding a series into its component ISBNs and selecting all of its authors or categories resulted in less than perfect results. For example there is a single ISBN in the "Little Golden Book" series that has the Young Adult consumer category even though that is not really representative of the series as a whole. So at load time we are identifying at most two authors to be considered the series authors and one representative work to serve as the source for the series' categories. This data is returned as part of the extended representation in the series-display view.
/domains/PRH.US/series/SOO/views/series-display
"seriesCode": "SOO", "seriesName": "A Song of Ice and Fire", "description": "<b>An immersive entertainment experience unlike any other, A Song of Ice and Fire has earned George R. R. Martin—dubbed “the American Tolkien” by <i>Time<\/i> magazine—international acclaim and millions of loyal readers.<\/b><br><br> In a land where summers can last decades and winters a lifetime, trouble is brewing. The cold is returning, and in the frozen wastes to the North of Winterfell, sinister and supernatural forces are massing beyond the kingdom’s protective Wall. At the center of the conflict lie the Starks of Winterfell, a family as harsh and unyielding as the land they were born to. Sweeping from a land of brutal cold to a distant summertime kingdom of epicurean plenty, here is a tale of lords and ladies, soldiers and sorcerers, assassins and bastards, who come together in a time of grim omens. Amid plots and counterplots, tragedy and betrayal, victory and terror, the fate of the Starks, their allies, and their enemies hangs perilously in the balance, as each endeavors to win that deadliest of conflicts: the game of thrones.<br><br> <b>Praise for A Song of Ice and Fire<\/b><br><br> “One of the best series in the history of fantasy.”<b>—<i>Los Angeles Times<\/i><\/b><br><br> “Long live George Martin . . . a literary dervish, enthralled by complicated characters and vivid language, and bursting with the wild vision of the very best tale tellers.”<b><i>—The New York Times<\/i><\/b><br><br> “The only fantasy series I’d put on a level with J.R.R. Tolkien’s The Lord of the Rings . . . a fantasy series for hip, smart people, even those who don’t read fantasy.”<b>—<i>Chicago Tribune<\/i><\/b><br><br> “Martin has produced—is producing, since the series isn’t over—the great fantasy epic of our era.”<b>—Lev Grossman, <i>Time<\/i><\/b><br>", "seriesDate": "2015-10-06", "count": 3, "isNumbered": true, "isKids": false, "work1": { "workId": 108336, "title": "A Game of Thrones", "author": "George R. R. Martin", "onsale": "1996-08-01", "frontlistiest": 9780553386790, "seoFriendlyUrl": "\/books\/108336\/a-game-of-thrones-by-george-r-r-martin" }, "work2": { "workId": 108335, "title": "A Feast for Crows", "author": "George R. R. Martin", "onsale": "2005-11-08", "frontlistiest": 9780553390575, "seoFriendlyUrl": "\/books\/108335\/a-feast-for-crows-by-george-r-r-martin" }, "work3": { "workId": 108334, "title": "A Dance with Dragons", "author": "George R. R. Martin", "onsale": "2011-07-12", "frontlistiest": 9781101886045, "seoFriendlyUrl": "\/books\/108334\/a-dance-with-dragons-by-george-r-r-martin" }, "featured": null, "authors": [ { "authorId": 233901, "display": "George R. R. Martin", "first": "George R. R.", "last": "Martin", "seoFriendlyUrl": "\/authors\/233901\/george-r-r-martin", "photocredit": null, "photoDate": null, "firstInitial": "G", "lastInitial": "M", "hasAuthorPhoto": false, "coverIsbn": 9780345533487 } ], "categories": [ { "catId": 2000000011, "description": "Art", "catUri": "\/art", "seq": 2 }, { "catId": 2000000059, "description": "Film", "catUri": "\/film", "seq": 3 }, { "catId": 2000000061, "description": "Games", "catUri": "\/games", "seq": 1 }, { "catId": 2000000116, "description": "Performing Arts", "catUri": "\/performing-arts", "seq": 4 } ], "seoFriendlyUrl": "\/series\/SOO\/a-song-of-ice-and-fire",
Bug
- [RHAPI-292] - /series/BPO/views/series-display generates NPE
- [RHAPI-297] - Error fetching work details without domain
- [RHAPI-298] - list works record count is wrong
- [RHAPI-300] - Error listing category sets
- [RHAPI-301] - Incorrect "icon" URL for authors
- [RHAPI-312] - Work product display view ISBNs not in frontlistiest order within format
New Feature
- [RHAPI-314] - Could we get the on sale date included in the featured hash of the series-display view
Task
- [RHAPI-304] - Expose AUTHOR.CLIENT_SOURCE_ID in author representation
- [RHAPI-305] - Add "companyCode" parameter to /search
- [RHAPI-309] - Add seriesCount to Search Display View
- [RHAPI-310] - Add division description to author representation
- [RHAPI-315] - Add seriesName and seriesNumber to work list display
Enhanced API v1.1.6 released
On Tuesday September 1, 2015, version 1.1.6 of the Enhanced PRH API was released to production. This is a minor bug fix release.
If you encounter any problems with your applications as a result of these changes, please contact us at api@penguinrandomhouse.com.
Version 1.1.6 release notes
- RHAPI-266: change how categories are derived for /series/{seriesCode}/views/series-display view.
- RHAPI-288: add photocredit, photoDate, firstInitial, lastInitial, hasAuthorPhoto and coverIsbn elements to the author object in the /series/{seriesCode}/views/series-display view.
- RHAPI-289: changed the ignoreContribRole param when used with the /works resource to exclude via a subquery instead of a direct constraint on the SQL.
- RHAPI-290: added the consumerFormat element to the title representation
Enhanced API v1.1.5 released
On Friday August 21, 2015, version 1.1.5 of the Enhanced PRH API was released to production. This is a minor bug fix release.
If you encounter any problems with your applications as a result of these changes, please contact us at api@penguinrandomhouse.com.
Version 1.1.5 release notes
- RHAPI-283: add subtitle to the /works/views/series-display representation
- RHAPI-286: order author objects in /works/{workId}/views/product-display
Enhanced API v1.1.4 released
As of this morning, version 1.1.4 of the Enhanced PRH API has been released to production. The IO Docs have been updated to reflect the new parameters, some additional fields have been added to existing representations and one new endpoint has been added, /titles/{isbn}/characters. A detailed listing of changes follows.
If you encounter any problems with your applications as a result of these changes, please contact us at api@penguinrandomhouse.com.
Version 1.1.4 release notes
- RHAPI-268: added ignoreSeries parameter
- RHAPI-270: fixed a bug where sort=award was not working in v1.1.3
- RHAPI-271: add elements to the /series/{seriesCode}/views/series-display representation: seriesNumber, format and price
- RHAPI-273: fixed a bug where ignoreAuthor was not working when listing an author's titles in v1.1.3
- RHAPI-274: added subseries to the vanilla title representation
- RHAPI-276: added ignoreContribRole parameter
- RHAPI-277: fixed a bug where the view /works/{workId}/views/also-in/author was returning nested author objects of the main work, not of the returned works themselves
- RHAPI-279: optimized the SQL behind /works/views/list-display so that all the author data is fetched in a single query rather than separately for each
- RHAPI-281: add endpoint /titles/{isbn}/characters to expose the ISBNxCHARACTER table
Additional changes without JIRA tickets
- Added seq to the category representation when an ISBN or work ID has been specified
- Added workId to the title representation; the link with the work rel-type is still available and either fetching that resource or embedding it directly in the title call is the preferred method of accessing work-level data but there are cases wher the work ID itself was the data that was needed.
- Added frontlistiest to the /works/views/list-display representation to hold the ISBN related to the specified work in the specified domain with seq=1. The existing element isbn used to have this value but now it is allowed to vary with the query parameters. For example a request such as /domains/PRH.US/works/views/list-display?formatFamily=Ebook returns work ID 84 with the Trade Paperback in frontlistiest but with the lowest sequence value e-book in the isbn. In cases like this where you are returning a list of works but for a limited set of ISBNs, it gives you access to an ISBN that can be used to display a cover that is guaranteed to be in that limited set.
"workId": 84, "title": "Catch Me If You Can", "onsale": "2000-08-01", "frontlistiest": 9780767905381, "isbn": 9780767915601,
- Added ignoreFormatCode parameter
Administrator Notes
Changes to the Mashery Platform Area for Penguin Random House
- Modified Portal CSS - basic logo font and color changes - just to provide an example
- Modified home page with standard front page content to trial info and docs
- Modified Docs page with Authors document taken from exisitng site
- added Resources service with all associated methods
- added JSON and XML response templates (as appropriate) for method definitions
- Created initial Package and Plan
- updated blog with this :-) - only accessible to administrators
- Added Thomas as an Administrator
- created and updated IO-Docs definition for Resource API - note that this is currently a straight pass through to Apiphany
- key based authentication will not currently work - there is no key available for the apiphany hosted services
- enabled forum and blog and moved IO-Docs link on to site navigation section
Feel free to add comments.
Ian
[ Previous | Page 7 of 7 ]