Files
web-page/public/lotto-api.md
gahusb c44bcb4a0f lotto lab API 정리
- API 스펙 정리 문서 업로드
 - 스펙 다운로드 기능 추가

나스 배포 오류 수정
2026-01-25 17:05:16 +09:00

64 lines
1.2 KiB
Markdown

# Lotto API 스펙 (프론트 참고)
## 추천 1개 생성
요청:
GET /api/lotto/recommend?recent_window=200&recent_weight=2.0&avoid_recent_k=5&sum_min=120&sum_max=180&max_overlap_latest=1
응답 핵심:
{
"id": 123,
"saved": true,
"deduped": false,
"numbers": [1,2,3,4,5,6],
"based_on_latest_draw": 1145,
"explain": {...},
"metrics": {...},
"recent_overlap": {...},
"params": {...}
}
## 히스토리 목록 (페이지/필터/검색)
기본: GET /api/history?limit=30&offset=0
즐겨찾기만: GET /api/history?favorite=true
태그 필터: GET /api/history?tag=jeju
메모 검색: GET /api/history?q=맛집
정렬: GET /api/history?sort=favorite_desc
응답:
{
"items": [
{
"id": 123,
"created_at": "...",
"numbers": [...],
"params": {...},
"based_on_draw": 1145,
"favorite": false,
"note": null,
"tags": [],
"metrics": {...},
"recent_overlap": {...}
}
],
"limit": 30,
"offset": 0,
"filters": {...}
}
## 히스토리 수정 (즐겨찾기/메모/태그)
요청:
PATCH /api/history/{id}
{
"favorite": true,
"note": "이번주는 이 조합",
"tags": ["jeju","safe"]
}