Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APIv1: Bookmarks #659

Open
fmartingr opened this issue Jul 21, 2023 · 2 comments
Open

APIv1: Bookmarks #659

fmartingr opened this issue Jul 21, 2023 · 2 comments
Labels
component:backend component:frontend The bug is in front-end type:enhancement New feature or request
Milestone

Comments

@fmartingr
Copy link
Member

fmartingr commented Jul 21, 2023

Migrate the legacy bookmarks API to the new router and API specification

Acceptance criteria

  • /api/v1/bookmarks: GET for list, POST for creation.
    • Bookmark creation should allow all current features (create archive/readable) plus ebook creation. But all these fields should be put inside another (_creation_options?) instead of mixed with the object attributes.
  • /api/v1/bookmarks/:id: PUT/PATCH for modification, GET for retrieving information, DELETE for deletion.
  • /api/v1/bookmarks/:id/cache: POST call that allows a single bookmark cache regeneration (re-download archive, rebuild ebook, ...).
  • /api/v1/bookmarks/cache: POST call that allows multiple bookmarks cache regeneration (re-download archive, rebuild ebook, ...).
  • Logic should be moved to domains
  • All endpoints should be properly tested.
  • All endpoints should use swagger definitions.
  • All endpoints require the user to be authenticated, only owners can create, modify and delete bookmarks.

Relates to: #640
Fixes: #634

@Monirzadeh
Copy link
Collaborator

Hi.
I don't know how you want to impeliment API for adding bookmark but if it possible please return something that we can distinguish between internal error and bookmark exist.
Currently shiori return status 500 if bookmark exist.

@fmartingr
Copy link
Member Author

Hi. I don't know how you want to impeliment API for adding bookmark but if it possible please return something that we can distinguish between internal error and bookmark exist. Currently shiori return status 500 if bookmark exist.

Yeah, on successful creation the response would be 201 and on duplicated 409.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:backend component:frontend The bug is in front-end type:enhancement New feature or request
Projects
Status: To do
Development

No branches or pull requests

2 participants