BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
15.25k stars 1.9k forks source link

API: Include cover image details for book & shelf list responses #5180

Open ln-ws opened 2 months ago

ln-ws commented 2 months ago

Describe the feature you'd like

When making a READ request to the /books/{id} endpoint, the response includes a cover object containing the cover image data for the specified book. However, when making a LIST request to the /books endpoint, the response does not include this cover object.

Including the cover object in the LIST response would allow users to retrieve cover image data for all books in a single request, rather than needing to make separate requests for each book's cover image. This enhancement would reduce the overhead of fetching cover images and improve the efficiency of implementing book search functionalities.

Describe the benefits this would bring to existing BookStack users

Can the goal of this request already be achieved via other means?

Yes, it is currently possible to achieve this by making individual requests for each book's cover image. However, this method increases the number of API calls and associated overhead.

Have you searched for an existing open/closed issue?

How long have you been using BookStack?

3 months to 1 year

Additional context

No response

ssddanbrown commented 2 weeks ago

Thanks for the request @ln-ws, I agree with this addition it's something we already do in the UI (list books with cover images). I'm going to update this to also mention shelves since it's the same scenario there. I've assigned this for the next feature release.