Goodreads Developers discussion

371 views
bugs > Can't remove a book from shelf

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

message 1: by Yavor (new)

Yavor Yanev | 9 comments I can't remove a book from shelf once it is marked as 'read'.
I use https://www.goodreads.com/shelf/add_t... with the optional parameter 'a' set to 'remove'. When executed the server returns it is removed but when book data is fetched again, it is still associated with 'read' shelf.

Note: it works fine when a book is in 'to-read' shelf.


message 2: by Yavor (new)

Yavor Yanev | 9 comments Guys I'm sure you have a lot of work to do but please provide me with some feedback about this one.


message 3: by Ettore (new)

Ettore Pasquini Hi Yavor, can you post the request you're submitting. Does the result change if you use tools like Postman ( https://www.getpostman.com ) ?

Some background: 'read' is an "exclusive" shelf so you can't just remove the book from that shelf without assigning it to another exclusive shelf (such as to-read and currently-reading). Instead of using the a=remove param, did you try to simply add it to another exclusive shelf? The server will automatically remove it from the existing exclusive shelf and assign it to the new one you'll be sending.


message 4: by Yavor (new)

Yavor Yanev | 9 comments Hi Ettore, thank you for your reply.
I use Fiddler to sniff my requests and when reissue the 'add-to-shelf' request I receive the same response.

Thank you for the workaround with assigning it to another shelf. Actually I already use this approach - first add it to another shelf and then try to remove it. It works for most of the books but not for all. For example:
1. Move to 'to-read' shelf
POST https://www.goodreads.com/shelf/add_t... HTTP/1.1
book_id=17286699&name=to-read
Response:
<?xml version="1.0" encoding="UTF-8"?>

1027555261
1285121394
2015-07-07T08:59:37+00:00
2015-07-07T08:59:37+00:00
6
132476783
to-read
true

2. Remove from 'to-read' shelf
POST https://www.goodreads.com/shelf/add_t... HTTP/1.1
book_id=17286699&name=to-read&a=remove
Response:
<?xml version="1.0" encoding="UTF-8"?>

to-read
removed


Then when I fetch book info again, it is in 'read' shelf.


message 5: by Yavor (new)

Yavor Yanev | 9 comments Hi Ettore, have you been able to check what could be wrong with this book in particular?


message 6: by Jeff (new)

Jeff (jeffwong) | 75 comments Mod
Hi Yavor, is the book on "to-read" after the first request?


message 7: by Yavor (new)

Yavor Yanev | 9 comments Hi Jeff, yes it is on 'to-read' after the first request and then when I try to remove it from there it is marked as 'read' again


message 8: by Ettore (new)

Ettore Pasquini i think the reason is that you can't *completely* remove a book from your shelves with the /shelf/add_to_shelf api. You can move it from one shelf to another, or remove it from a non-exclusive shelf, but if the book is only on an exclusive shelf you can't remove it from that.


message 9: by Yavor (new)

Yavor Yanev | 9 comments I guess you are right.

Is there a way to achieve the same behavior as in the android app? There it's possible to remove a book from all shelves.


message 10: by Ettore (new)

Ettore Pasquini Hey Yavor, unfortunately we don't expose that api. I'm really sorry!


back to top