Javascript API returning wrong results on book collections when collection is empty
Talk Bug Collectors
Join LibraryThing to post.
1cvedovini
Hi,
I think there's an issue with the "books_collections" parameter in the Javascript API. I know this is not supported but I though it was worth logging :)
When the API is used with the "books_collections" parameter on an empty collection then all the books are returned instead of an empty resultset. Here is an example: http://www.librarything.com/api_getdata.php?userid=cvedovini&books_collectio...
The API works well when the collection is not empty, eg: http://www.librarything.com/api_getdata.php?userid=cvedovini&books_collectio...
Regards,
Claude
I think there's an issue with the "books_collections" parameter in the Javascript API. I know this is not supported but I though it was worth logging :)
When the API is used with the "books_collections" parameter on an empty collection then all the books are returned instead of an empty resultset. Here is an example: http://www.librarything.com/api_getdata.php?userid=cvedovini&books_collectio...
The API works well when the collection is not empty, eg: http://www.librarything.com/api_getdata.php?userid=cvedovini&books_collectio...
Regards,
Claude
2timspalding
Update on why this isn't fixed yet (see http://www.librarything.com/topic/107331).
Related to the widget issue elsewhere, since the API was designed for the widget. Probably it should actually return nothing when it's being used solely for the API.
Related to the widget issue elsewhere, since the API was designed for the widget. Probably it should actually return nothing when it's being used solely for the API.

