Goodreads Developers discussion
bugs
>
book.show JSON response different than XAML
date
newest »



I fully support the idea of smaller payloads but from everything I know of API design it's a bit confusing that when all you change is the message format you end up with different content. Most web sites that allow a variety of response formats don't change the actual content, just the packaging.
If the goal is to offer developers a way to get just the embed code why not add that as a param or a new resource (in REST speak), say book.widget? That way devs don't have to context switch back and forth between JSON or XML?
As a consolation prize can the help be updated to reflect this behavior?
It would help to know up front that currently the XML and JSON responses are different.
Indeed. :) The documentation for the book.show method will reflect this shortly.
Is the documentation only editable by the Goodreads staff? I am working to extend the Ruby API wrapper, and would love to help update documentation to reflect request/response information.
The docs. are only editable by GR staff, but we're happy to receive corrections/additions/revisions/suggestions by outside developers — as you've probably seen in other threads. That said, our time available for reviewing and incorporating submissions is pretty limited. So, I caution would-be contributors against sending us large revisions or additions. Full request/response examples for every method, for instance, might be nice, but it could be a long time before we vet them and incorporate them into the docs.
The docs. could definitely use more tending, Nate, and you are kind to offer to help. Can you tell me more about what updates you have in mind?
Indeed. :) The documentation for the book.show method will reflect this shortly.
Is the documentation only editable by the Goodreads staff? I am working to extend the Ruby API wrapper, and would love to help update documentation to reflect request/response information.
The docs. are only editable by GR staff, but we're happy to receive corrections/additions/revisions/suggestions by outside developers — as you've probably seen in other threads. That said, our time available for reviewing and incorporating submissions is pretty limited. So, I caution would-be contributors against sending us large revisions or additions. Full request/response examples for every method, for instance, might be nice, but it could be a long time before we vet them and incorporate them into the docs.
The docs. could definitely use more tending, Nate, and you are kind to offer to help. Can you tell me more about what updates you have in mind?
Publishing your notes (output examples, et cetera) on GitHub as part of the Ruby API wrapper might be a good place to start. Maybe as part of a "HACKING" file or a set of wiki pages for developers working on that library. Making them part of an existing project increases the chance that more people will see and help maintain them. That would also make them something we could also link to from here in the developers group (in a sticky forum thread).
From there, with your permission, maybe I can copy some of the examples into the official Goodreads documentation. I hesitate to dump too much more info. into our docs without first cleaning up the design to make them more readable. But it's probably worth adding examples for some of the most commonly used methods.
Is it easy for you to adapt your notes for publication on GitHub like that? Does that seem like a good plan?
Again, I think it's great you're volunteering to help improve our docs — thank you. :) I just think it's a good idea to publish your work somewhere that doesn't completely depend on Goodreads, on top of whatever you send to us.
From there, with your permission, maybe I can copy some of the examples into the official Goodreads documentation. I hesitate to dump too much more info. into our docs without first cleaning up the design to make them more readable. But it's probably worth adding examples for some of the most commonly used methods.
Is it easy for you to adapt your notes for publication on GitHub like that? Does that seem like a good plan?
Again, I think it's great you're volunteering to help improve our docs — thank you. :) I just think it's a good idea to publish your work somewhere that doesn't completely depend on Goodreads, on top of whatever you send to us.

I'm also moving to json for my mobile app. I'm particularly missing the "my_review" and "friend_reviews" fileds.

Here is another example of this:
http://www.goodreads.com/book/title?f...
The above XML formatted URL returns full book information, including image/title/author/series/etc.
You switch the format to JSON and get this:
http://www.goodreads.com/book/title?f...
Totally different stuff for "reviews_widget"
Like Michael posted near the top of this thread, offering an expanded JSON response is not something we'll be able to do soon. Sorry. :\
Here is the link I'm hitting:
http://www.goodreads.com/book/show?fo...
Thanks