BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

Favourites accessible via API

Open bytepoets-ssi opened this issue 3 years ago • 2 comments

API Endpoint or Feature

At the moment the favourites of a user are not visible in the API. The status should be visible in the following calls as isFavourite: boolean:

  • GET /api/[shelves|books|chapters|pages]
  • GET /api/[shelves|books|chapters|pages]/{id}

In addition a user should be able to set/unset them

  • PUT /api/[shelves|books|chapters|pages]/{id}/favourite
{
    isFavourite: boolean
}

Use-Case

Feature completeness of the API. Make all the information stored in Bookstack available over the API

Additional context

No response

bytepoets-ssi avatar Jun 01 '22 06:06 bytepoets-ssi

Thanks for the request @bytepoets-ssi. Are you able to detail your specific use-case for these details? Knowing this helps think about implementation options outside of the ones proposed, while still thinking what works well for your usage. It also helps ensure efforts are going to actually required features, A use-case of "Feature completeness" is generic and could apply to any endpoints added.

ssddanbrown avatar Jun 01 '22 08:06 ssddanbrown

The use case here is to gather the information that is stored in Bookstack and other places in a central system. Show all e.g. unread emails, Bookstack pages,... Favourite entries are highlighted accordingly and can be updated from there.

I thought of a joint endpoint but decided that adding it to the available route to retrieve a page is the more RESTful approach.

bytepoets-ssi avatar Jun 20 '22 12:06 bytepoets-ssi