diff --git a/README.md b/README.md index 4d44bf7..c98718d 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,10 @@ from scratch. - Catalog browsing works without an account; the catalog endpoints remain read-only. +The inventory view can be filtered by category and searched by name/class +name, and sorted by `name` (default), `category`, `quantity` (high to low) or +`updated` (most recently changed first). + Inventory rows store `(user_id, class_name, quantity, notes)`. Adding an item that is already present increments its quantity; quantity and notes can then be edited or the row removed. Responses are enriched live from the catalog. If a @@ -157,7 +161,7 @@ curl -fsS -b cookies.txt http://localhost:8080/api/v1/me/inventory cd trade-hub/backend python3 -m venv .venv .venv/bin/pip install -r requirements.txt -r requirements-dev.txt -.venv/bin/python -m pytest tests/ -q # 45 tests, no database needed +.venv/bin/python -m pytest tests/ -q # 50 tests, no database needed DATA_DIR=./data/samples .venv/bin/uvicorn main:app --port 8000 ``` @@ -186,7 +190,7 @@ POST /api/v1/auth/login {username, password} -> 200 + session c POST /api/v1/auth/logout -> 204 GET /api/v1/auth/me -> {user} -GET /api/v1/me/inventory?category=&search=&page=&page_size= +GET /api/v1/me/inventory?category=&search=&sort=&page=&page_size= GET /api/v1/me/inventory/summary POST /api/v1/me/inventory {class_name, quantity?, notes?} PATCH /api/v1/me/inventory/{class_name} {quantity?, notes?}