openzim / cms

ZIM file Publishing Platform
https://cms.openzim.org
GNU General Public License v3.0
4 stars 0 forks source link

Add books' ids to response in /titles/{ident} endpoint #42

Closed anshulxyz closed 2 years ago

anshulxyz commented 2 years ago

Closes #31

tasks

codecov[bot] commented 2 years ago

Codecov Report

Merging #42 (cf4bfbe) into main (6d09d10) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #42   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         8    -1     
  Lines          221       219    -2     
=========================================
- Hits           221       219    -2     
Impacted Files Coverage Δ
backend/src/backend/routes/titles.py 100.00% <ø> (ø)
backend/src/backend/main.py 100.00% <100.00%> (ø)
backend/src/backend/models.py 100.00% <100.00%> (ø)
backend/src/backend/routes/books.py 100.00% <100.00%> (ø)
backend/src/backend/schemas.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6d09d10...cf4bfbe. Read the comment docs.

anshulxyz commented 2 years ago
Screenshot 2021-12-18 at 2 56 47 AM

@rgaudin How do you want to display metadata and zimcheck?

anshulxyz commented 2 years ago

@rgaudin

Searching a Book by its ID so that needs to be added

working on this now, let me know if the following approach is okay

  1. Frontend - a new page, with a search bar, to send the book id to the backend
  2. Backend - GET /books/{id} endpoint receives the id, and sends back the details, if book found, else 404
anshulxyz commented 2 years ago

@rgaudin here's a demo of the search

https://user-images.githubusercontent.com/6121530/147331786-1abca405-b946-4393-a4af-c9b1e9ca9ce8.mov