View Single Post
Old 03-01-2011, 04:16 PM   #14
msr
Member
msr began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Jul 2009
Device: Kindle2
Quote:
Originally Posted by kiwidude View Post
As far as getting tags from shelves is concerned, it would be a little bit quirky. The only way via the API that I can get what shelves a book is on is via a call that gets all the books for a shelf.
Really? Hmmm. I'm pretty sure that's wrong. I worked with the API a bit once a year or so ago when trying to help someone with an Android app and I thought there was another way. Did you look at the review/show_by_user_and_book.xml API call? Given a user_id (which you obviously need) and a book_id (which you get from your linking) you get a bunch of information on that book including (buried in the xml, toward the bottom) all of the shelves that user has put the book on (I'm looking at it now to confirm that my memory wasn't wrong). This works even if a book hasn't been reviewed by the user (it just has to be on one of their shelves).

You could also use this same call to fetch the user's rating for a book from Goodreads if you wanted to add that rating to Calibre, although not as a dual-way sync since it's a read only call.

Or am I missing something? If you have to do it by looking at an entire shelf, I agree that would not be worthwhile.
msr is offline   Reply With Quote