Javascript API returning wrong results on book collections when collection is empty

TalkBug Collectors

Join LibraryThing to post.

Javascript API returning wrong results on book collections when collection is empty

1cvedovini
Nov 22, 2010, 6:04 am

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

2timspalding
Jan 12, 2011, 8:50 pm

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.

3conceptDawg
Mar 2, 2023, 2:49 pm

closing. This is terribly out of date and our APIs are currently closed anyway.