Wow.. okay.. I guess I need a new dump that provides me Editions and Authors not Works and Authors.. If such a thing exists. I’ll take a look.
I looked at the API but as of yet no direct correlation that I can leverage. I’ll keep hacking away.. Thanks On Dec 30, 2014, at 7:01 PM, Karen Coyle <[email protected]> wrote: > Note that there is no correspondence between the "W" keys and the "M" keys -- > they are unrelated, so you can't change a "W" to "M" and get anything > sensible. > > Also, it's possible that the information you need is in the documentation for > the RESTFul API, here: > > https://openlibrary.org/dev/docs/restful_api > > kc > > On 12/30/14 6:52 PM, Chris wrote: >> Thanks Karen.. That does help, since I’m completely new here. >> >> Basically, I guess the question is if given only a ‘W’ Works key how do >> I get to the Edition or ‘M’ key. It looks like all the works have a >> unique ‘W’ key, so there should be a way. >> >> As a little more of background: >> >> I extracted a dump, which gives me a lot OLID’s that end in ‘W’ that I >> can use on the web. >> >> For example: >> >> https://openlibrary.org/works/OL15346679W.json >> >> works and gives me this: >> >> {"title": "Adventures of Tom Sawyer", "created": {"type": "/type/datetime", >> "value": "2010-08-20T09:50:50.944421"}, "last_modified": {"type": >> "/type/datetime", "value": "2012-07-07T03:04:45.302947"}, "latest_revision": >> 2, "key": "/works/OL15346679W", "authors": [{"type": {"key": >> "/type/author_role"}, "author": {"key": "/authors/OL18319A"}}], "type": >> {"key": "/type/work"}, "revision": 2} >> >> But the info I need is in an edition so, I need a key that ends in ‘M’ so >> I’m having trouble finding books. No results are returned with OLIDs that >> end in ‘W’. >> >> Example this works: >> >> https://openlibrary.org/api/books?bibkeys=OLID:OL15346679M >> >> var _OLBookInfo = {"OLID:OL15346679M": {"bib_key": "OLID:OL15346679M", >> "preview": "noview", "preview_url": >> "https://openlibrary.org/books/OL15346679M/Raghuvam\u015ba_cantos_14_15.", >> "info_url": >> "https://openlibrary.org/books/OL15346679M/Raghuvam\u015ba_cantos_14_15."}}; >> >> but this yields nothing: >> >> https://openlibrary.org/api/books?bibkeys=OLID:OL15346679W >> >> var _OLBookInfo = {}; >> >> >> I’m puzzled. t >> >> Thanks. >> Chris >> On Dec 30, 2014, at 6:44 PM, Karen Coyle <[email protected] >> <mailto:[email protected]>> wrote: >> >>> I can give you some info, but others with more experience with the API >>> will need to give you more. >>> >>> There are two types of bibliographic entities in OL: Works and >>> Editions. The OLIDs that end in "W" are for works; the OLIDs that end >>> in "M" are for editions. (Yes, there's a reason why M=edition, but >>> it's a long story.) >>> >>> A work is a general record linking to all of the books of the same >>> content, e.g. all of the versions of Tom Sawyer. Individual books are >>> editions. Editions can be retrieved using the API: >>> >>> https://openlibrary.org/api/books?bibkeys=OLID:OL24367990M >>> >>> They can also be retrieved with the OLID, the ISBN or the OCLC number. >>> >>> I don't know how you format a query to retrieve all of the editions >>> starting with a Work OLID -- can somewhere here answer that question? >>> >>> Thanks, >>> kc >>> >>> On 12/30/14 5:41 PM, Chris wrote: >>>> Hi all, >>>> I’m new to OL. I’m excited about it’s vast potential. >>>> >>>> I had a quick question. >>>> >>>> I recently downloaded a dump and extracted it to a sql database. When I >>>> query this database I retrieve a OL id for a given book, but when I turn >>>> around and use this ID against open library directly with an API call, I >>>> get no results. >>>> >>>> For example, this row extracted from the Dump >>>> >>>> Adventures of Tom SawyerMark TwainOL15346679W >>>> >>>> returns no results >>>> >>>> https://openlibrary.org/api/books?bibkeys=OLID:OL15346679W >>>> >>>> Other entries I’ve noticed that do work correctly end with ‘M’ as the >>>> last character of the OLID instead of ‘W’ >>>> >>>> I’m hoping the OL ids have not all changed. It took a good while to >>>> pull down the 100gig dump and build a database that I could query and >>>> consume. >>>> >>>> I’m hoping someone can lend some light on this problem for me. >>>> >>>> Thanks >>>> >>>> -Chris Flynn >>>> >>>> >>>> _______________________________________________ >>>> Ol-tech mailing list >>>> [email protected] >>>> http://mail.archive.org/cgi-bin/mailman/listinfo/ol-tech >>>> Archives: http://www.mail-archive.com/[email protected]/ >>>> To unsubscribe from this mailing list, send email to >>>> [email protected] >>>> >>> >>> -- >>> Karen Coyle >>> [email protected] http://kcoyle.net >>> m: 1-510-435-8234 >>> skype: kcoylenet/+1-510-984-3600 >>> _______________________________________________ >>> Ol-tech mailing list >>> [email protected] >>> http://mail.archive.org/cgi-bin/mailman/listinfo/ol-tech >>> Archives: http://www.mail-archive.com/[email protected]/ >>> To unsubscribe from this mailing list, send email to >>> [email protected] >> > > -- > Karen Coyle > [email protected] http://kcoyle.net > m: 1-510-435-8234 > skype: kcoylenet/+1-510-984-3600
_______________________________________________ Ol-tech mailing list [email protected] http://mail.archive.org/cgi-bin/mailman/listinfo/ol-tech Archives: http://www.mail-archive.com/[email protected]/ To unsubscribe from this mailing list, send email to [email protected]
