{
    "status": "success",
    "message": "API接口文档",
    "version": "1.0.0",
    "endpoints": [
        {
            "method": "POST",
            "endpoint": "\/register.php",
            "description": "用户注册",
            "parameters": [
                "username",
                "password",
                "email"
            ]
        },
        {
            "method": "POST",
            "endpoint": "\/login.php",
            "description": "用户登录",
            "parameters": [
                "username",
                "password"
            ]
        },
        {
            "method": "GET",
            "endpoint": "\/profile.php",
            "description": "获取用户信息",
            "headers": [
                "Authorization: Bearer <token>"
            ]
        },
        {
            "method": "PUT",
            "endpoint": "\/profile.php",
            "description": "更新用户信息",
            "headers": [
                "Authorization: Bearer <token>"
            ],
            "parameters": [
                "username (可选)",
                "email (可选)"
            ]
        },
        {
            "method": "POST",
            "endpoint": "\/change_password.php",
            "description": "修改密码",
            "headers": [
                "Authorization: Bearer <token>"
            ],
            "parameters": [
                "old_password",
                "new_password"
            ]
        },
        {
            "method": "GET",
            "endpoint": "\/api\/announcements.php",
            "description": "获取公告列表"
        },
        {
            "method": "POST",
            "endpoint": "\/api\/announcements.php",
            "description": "创建公告（管理员）",
            "headers": [
                "X-API-KEY: <api_key>"
            ],
            "parameters": [
                "title",
                "content",
                "status (可选，默认1)"
            ]
        },
        {
            "method": "PUT",
            "endpoint": "\/api\/announcements.php",
            "description": "更新公告（管理员）",
            "headers": [
                "X-API-KEY: <api_key>"
            ],
            "parameters": [
                "id",
                "title (可选)",
                "content (可选)",
                "status (可选)"
            ]
        },
        {
            "method": "DELETE",
            "endpoint": "\/api\/announcements.php",
            "description": "删除公告（管理员）",
            "headers": [
                "X-API-KEY: <api_key>"
            ],
            "parameters": [
                "id"
            ]
        }
    ]
}