Goodreads Developers discussion

21 views
questions > Know if a resource has been liked

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

message 1: by Peter (new)

Peter Mitri (petermitri) | 50 comments Hi

In your API you provide a way to like and a way to unlike a resource, but you do not provide a way to know if the user has already liked tge resource (let's say a friend's status update) in order to provide him the choice to unlike it; am I missing something?


message 2: by Jeff (last edited Jan 06, 2015 01:54PM) (new)

Jeff (jeffwong) | 75 comments Mod
There will be tag <liked>true</liked>, which will be present in the XML of the resource if the thing is liked.

If it's not liked, the tag will not be there.


message 3: by Peter (new)

Peter Mitri (petermitri) | 50 comments Great. Thank you!


message 4: by Peter (last edited Jan 29, 2015 09:57AM) (new)

Peter Mitri (petermitri) | 50 comments I just tried out the updates.friends and user.show method for updates and had two issues:
- there is no id field for the updates (unless it's the integer at the end of the url)
- I did not get the tag for updates I already liked through the website

Can you help?


message 5: by Ettore (new)

Ettore Pasquini it might not be part of those api responses. Can you please post those two responses? Make sure to black out sensitive info.


message 6: by Peter (last edited Feb 23, 2015 10:40AM) (new)

Peter Mitri (petermitri) | 50 comments Here it is

Image and video hosting by TinyPic
Image and video hosting by TinyPic

(I liked the first "readstatus" update on GoodReads but there is no "liked" tag, nor an ID to be able to like it using the API)


message 7: by [deleted user] (last edited Feb 25, 2015 04:12PM) (new)

Thanks Peter. Looks like is not getting included. I'll open a ticket for that.

As for the id field, to like an update's resource, the like should happen on the resource, not the update. For example, if there's an update for a read_status, you'd need to pass the read_status id to the like api endpoint. You'll notice inside your posted output that there is an node inside ...that's what you would use.


message 8: by Peter (new)

Peter Mitri (petermitri) | 50 comments Understood, thanks!


message 9: by Paul (new)

Paul Nuñez (paulnunezm) | 19 comments Hi, i'll like to say that the "friend" update type is not comming with a review id, so i can't get liked an update of this type.


message 10: by Ettore (new)

Ettore Pasquini Hi Paul, for friendship types, the element describes the resource that one can like. So, look for the under that node. Review id is not related to friendships.


back to top