@echo off
title WeChat History API
cd /d "%~dp0.."

set PYTHON=python

echo ========================================
echo   WeChat History REST API Server
echo   Port: 19001
echo ========================================
echo.
echo Starting history API server...
echo Endpoints:
echo   GET  http://localhost:19001/
echo   GET  http://localhost:19001/health
echo   GET  http://localhost:19001/api/contacts
echo   GET  http://localhost:19001/api/recent
echo   GET  http://localhost:19001/api/history?wxid=wxid_xxx^&count=20
echo   POST http://localhost:19001/api/history
echo ========================================
echo.

set PYTHONHOME=
%PYTHON% api\history_api.py --port 19001

if %errorlevel% neq 0 (
    pause
)
