feat(api): implement notebook management CRUD endpoints
Implement Sprint 1: Notebook Management CRUD
- Add NotebookService with full CRUD operations
- Add POST /api/v1/notebooks (create notebook)
- Add GET /api/v1/notebooks (list with pagination)
- Add GET /api/v1/notebooks/{id} (get by ID)
- Add PATCH /api/v1/notebooks/{id} (partial update)
- Add DELETE /api/v1/notebooks/{id} (delete)
- Add Pydantic models for requests/responses
- Add custom exceptions (ValidationError, NotFoundError, NotebookLMError)
- Add comprehensive unit tests (31 tests, 97% coverage)
- Add API integration tests (26 tests)
- Fix router prefix duplication
- Fix JSON serialization in error responses
BREAKING CHANGE: None
This commit is contained in:
71
docs/README.md
Normal file
71
docs/README.md
Normal file
@@ -0,0 +1,71 @@
|
||||
# Documentation
|
||||
|
||||
Benvenuto nella documentazione di NotebookLM Agent API.
|
||||
|
||||
## Indice
|
||||
|
||||
- [API Reference](./api/) - Documentazione completa delle API (TODO)
|
||||
- [Examples](./examples/) - Esempi di utilizzo (TODO)
|
||||
|
||||
## Panoramica
|
||||
|
||||
NotebookLM Agent API fornisce:
|
||||
|
||||
1. **REST API** per gestire notebook, fonti, chat e generazione contenuti
|
||||
2. **Webhook System** per notifiche event-driven
|
||||
3. **AI Skill** per integrazione con agenti AI
|
||||
|
||||
## Endpoint Principali
|
||||
|
||||
### Notebook Management
|
||||
- `POST /api/v1/notebooks` - Creare notebook
|
||||
- `GET /api/v1/notebooks` - Listare notebook
|
||||
- `GET /api/v1/notebooks/{id}` - Ottenere notebook
|
||||
- `DELETE /api/v1/notebooks/{id}` - Eliminare notebook
|
||||
|
||||
### Source Management
|
||||
- `POST /api/v1/notebooks/{id}/sources` - Aggiungere fonte
|
||||
- `GET /api/v1/notebooks/{id}/sources` - Listare fonti
|
||||
- `POST /api/v1/notebooks/{id}/sources/research` - Ricerca web
|
||||
|
||||
### Content Generation
|
||||
- `POST /api/v1/notebooks/{id}/generate/audio` - Generare podcast
|
||||
- `POST /api/v1/notebooks/{id}/generate/video` - Generare video
|
||||
- `POST /api/v1/notebooks/{id}/generate/quiz` - Generare quiz
|
||||
- `POST /api/v1/notebooks/{id}/generate/flashcards` - Generare flashcard
|
||||
|
||||
### Webhooks
|
||||
- `POST /api/v1/webhooks` - Registrare webhook
|
||||
- `GET /api/v1/webhooks` - Listare webhook
|
||||
- `POST /api/v1/webhooks/{id}/test` - Testare webhook
|
||||
|
||||
## Autenticazione
|
||||
|
||||
Tutte le richieste API richiedono header `X-API-Key`:
|
||||
|
||||
```bash
|
||||
curl http://localhost:8000/api/v1/notebooks \
|
||||
-H "X-API-Key: your-api-key"
|
||||
```
|
||||
|
||||
## Webhook Security
|
||||
|
||||
I webhook includono firma HMAC-SHA256 nell'header `X-Webhook-Signature`:
|
||||
|
||||
```python
|
||||
import hmac
|
||||
import hashlib
|
||||
|
||||
signature = hmac.new(
|
||||
secret.encode(),
|
||||
payload.encode(),
|
||||
hashlib.sha256
|
||||
).hexdigest()
|
||||
```
|
||||
|
||||
## Risorse
|
||||
|
||||
- [README](../README.md) - Panoramica progetto
|
||||
- [PRD](../prd.md) - Requisiti prodotto
|
||||
- [SKILL.md](../SKILL.md) - Skill per agenti AI
|
||||
- [CONTRIBUTING](../CONTRIBUTING.md) - Come contribuire
|
||||
Reference in New Issue
Block a user