Goodreads Developers discussion
review.update and PUT question
date
newest »



If I have already added the the book to the a shelf, I am returned "Request failed with code 422: Book has already been reviewed by this user", but if I choose a book that isn't in any of my shelves I get a "Request failed with code 500: ".
Maybe there's something wrong with my params?
I've tried calling it in 2 different ways, but both return the same 422 or 500 error.
$req = new OAuthRequester(
"http://www.goodreads.com/review.xml",
"POST",
array(
'shelf' => $shelf_name,
'book_id' => $book_id,
'review' => array(
'review' => $review_text,
'read_at' => $review_date,
'rating' => $rating
)
)
);
and
$req = new OAuthRequester(
"http://www.goodreads.com/review.xml",
"POST",
array(
'shelf' => $shelf_name,
'book_id' => $book_id,
'review' => $review_text,
'read_at' => $review_date,
'rating' => $rating
)
);
I know there must be some obvious mistake in there, but I haven't been able to suss it out.

'shelf' => $shelf_name,
'book_id' => $book_id,
'review' => $review_text,
'read_at' => $review_date,
'rating' => $rating
try
'shelf' => $shelf_name,
'book_id' => $book_id,
'review[review:]' => $review_text,
'review[read_at:]' => $review_date,
'review[rating:]' => $rating
**for some reason it is adding : into the [ :] ... don't do those

A little more detail beyond "Invalid OAuth Request" would be wonderful. I've tried the request several times, so it's not the old case of the APIs just randomly failing and the same request working later.
The 401 response does not include a WWW-Authenticate header (which the HTTP RFC says it MUST have). What's going on here?



The documentation says that the call needs to be a PUT method, but if I'm unsure what should be in the put file.
My guess would be XML containing the update to the review. But what would be the syntax?
An example url with params, and put file would be greatly appreciated.
Thanks
-Ben