I take it this will break the current Books API, but that is fine with 
me if it will solve larger issues. OpenBook 2 uses the old API and 
OpenBook 3 is not yet released so I can adapt to this. Please advise if 
you are going ahead and your ETA. I will put OpenBook 3 changes on hold 
till this is ready. Regards, John


Anand Chitipothu wrote:
> The Open Library Books API was introduced to provide a Google Books  
> compatible API for Open Library.
>
> http://openlibrary.org/dev/docs/api/books
>
> Unlike the other APIs, the Books API can be queried for multiple keys  
> (isbns, oclc numbers, etc.).
>
> I propose adding some extensions to the API to make it fit nicely into  
> various use cases.
>
> JSON EXTENSION:
>
> By default, the output of this API is javascript. It will be nice to  
> support JSON so that it can be used at the server-side.
>
> I propose supporting an optional "format" argument.
>
> http://openlibrary.org/api/books?bibkeys=ISBN:0451526538&jscmd=viewapi&format=json
>
> DATA EXTENSION:
>
> There is already an extension to provide the data of the matching  
> editions by adding "&details=true" to the URL. With this, any change  
> to the data model will break the API. That can be solved by  
> maintaining multiple versions of the API, but it will nice if we can  
> come up with a format independent of the data model.
>
> Here is what I have in my mind.
>
> Sample URL: 
> http://openlibrary.org/api/books?bibkeys=ISBN:0451526538&jscmd=data&format=json
> Sample Response:
>
> {
>      "ISBN:0931137071": {
>          "key": "/books/OL1M",
>          "title": "...",
>          "subtitle": "...",
>          "authors": {
>           "key": "/authors/OL1A",
>              "name": "Foo"
>          },
>          "publishers": [{
>              "name": "Foo",
>          }],
>          "publish_date": "1024",
>          "publish_places": [{
>              "name": "New York"
>          }],
>          "identifiers": {
>              "isbn": [...],
>              "lccn": [...],
>              "goodreads": [...],
>          },
>          "classifications": {
>              "lc_classifications": [...],
>          },
>          "cover": {
>              "small": "http://covers.openlibrary.org/b/id/1234-S.jpg";,
>              "medium": "http://covers.openlibrary.org/b/id/1234-M.jpg";
>              "large": "http://covers.openlibrary.org/b/id/1234-L.jpg";
>          },
>          "description": "...",
>          "excepts": [...],
>          "links": [{
>              "title": "Author's website",
>              "url": "http://....";
>          }],
>          "table_of_contents": [...],
>         "ebooks": [{
>            "info_url": "http://www.archive.org/details/...";,
>            "formats": ["pdf", "epub"],
>         }],
>         "subject": [...],
>         "subject_places": [...],
>         "subject_people": [...],
>         "subject_times": [...],
>      }
> }
>
> I moved all the identifiers together and classifications together. For  
> author, both name and key are provided. For publishers and  
> publish_places, only the name is provided. Other attributes can be  
> added in future with breaking the API.
>
> Notice that some information from work record is also presented here  
> (description, excerpts, links, subjects etc.). Also ebooks is made  
> into a list of objects with "info_url" and available formats.
>
> What do you think about this approach?
>
> Anand
>
> _______________________________________________
> Ol-tech mailing list
> [email protected]
> http://mail.archive.org/cgi-bin/mailman/listinfo/ol-tech
> To unsubscribe from this mailing list, send email to 
> [email protected]
>
>
>   
_______________________________________________
Ol-tech mailing list
[email protected]
http://mail.archive.org/cgi-bin/mailman/listinfo/ol-tech
To unsubscribe from this mailing list, send email to 
[email protected]

Reply via email to