Goodreads Developers discussion

61 views
feature requests > API Addition: book.shelves

Comments Showing 1-2 of 2 (2 new)    post a comment »
dateUp arrow    newest »

message 1: by Grunthos (new)

Grunthos | 60 comments Background

There is an old thread talking about updating shelves in one call, but it did not seem to go very far.

Currently, to synchronize shelves between my app and goodreads I have to do the following:

- book.show (to get shelves in goodreads)
- shelves.add_to_shelf with a=remove for any shelf that is listed in goodreads but not in my collection
- shelves.add_to_shelf (without 'a') for any shelf that is in my local app but not in goodreads.

For a book on 3 shelves, this is up to 4 API calls. Just to remove a book from one shelf it is 2 API calls, one of them quite expesive-looking (book.show).

Solution

Add 'book.shelves' with a POST and a GET version, accepting a book ID and a array/list of shelf names.

POST will replace all goodreads shelves for the book with the ones passed.

GET will return an array of all goodreads shelves.

Why do this?

Fewer, and probably cheaper, API calls: for me to send an update is 1 call. For me to retrieve an update I will still just use review.list as currently.

Why have GET method

Completness & symmetry. Someone will probably ask for it. But it is by no means essential.


message 2: by Michael (new)

Michael Economy (michaeleconomy) I think we will do this someday. The path might not be book/shelves, but it's definetly a good idea.


back to top