{
    "openapi": "3.0.0",
    "info": {
        "title": "诗词填空 - API文档",
        "version": "1.0.0",
        "description": "适合中文教育、语言学习和文化类应用。每次调用返回一句经典诗词，返回作者、朝代、完整上下句、备注提示等数据。诗句中随机隐藏一个关键字，并附带 1 个正确答案与 3 个干扰项。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/poemfill\/index": {
            "get": {
                "summary": "查询题目",
                "tags": [
                    "诗词填空"
                ],
                "description": "随机返回诗词填字题目及干扰项和结果备注",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "diff": {
                                            "type": "int",
                                            "example": 1,
                                            "description": "难度：一般1、中等2、困难3"
                                        },
                                        "full": {
                                            "type": "string",
                                            "example": "露从今夜白，月是故乡明。",
                                            "description": "完整诗词"
                                        },
                                        "note": {
                                            "type": "string",
                                            "example": "情感投射",
                                            "description": "备注"
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "月夜忆舍弟",
                                            "description": "诗词名"
                                        },
                                        "author": {
                                            "type": "string",
                                            "example": "杜甫",
                                            "description": "作者"
                                        },
                                        "correct": {
                                            "type": "string",
                                            "example": "明",
                                            "description": "正确答案"
                                        },
                                        "dynasty": {
                                            "type": "string",
                                            "example": "唐",
                                            "description": "朝代"
                                        },
                                        "wrong_a": {
                                            "type": "string",
                                            "example": "亮",
                                            "description": "错误选项A"
                                        },
                                        "wrong_b": {
                                            "type": "string",
                                            "example": "圆",
                                            "description": "错误选项B"
                                        },
                                        "wrong_c": {
                                            "type": "string",
                                            "example": "清",
                                            "description": "错误选项C"
                                        },
                                        "category": {
                                            "type": "string",
                                            "example": "思乡",
                                            "description": "主题分类"
                                        },
                                        "question": {
                                            "type": "string",
                                            "example": "露从今夜白，月是故乡()。",
                                            "description": "题目"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "diff": 2,
                                        "full": "露从今夜白，月是故乡明。",
                                        "note": "情感投射",
                                        "title": "月夜忆舍弟",
                                        "author": "杜甫",
                                        "correct": "明",
                                        "dynasty": "唐",
                                        "wrong_a": "亮",
                                        "wrong_b": "圆",
                                        "wrong_c": "清",
                                        "category": "思乡",
                                        "question": "露从今夜白，月是故乡()。"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "查询题目",
                "tags": [
                    "诗词填空"
                ],
                "description": "随机返回诗词填字题目及干扰项和结果备注",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    }
                                },
                                "required": [
                                    "key"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "diff": {
                                            "type": "int",
                                            "example": 1,
                                            "description": "难度：一般1、中等2、困难3"
                                        },
                                        "full": {
                                            "type": "string",
                                            "example": "露从今夜白，月是故乡明。",
                                            "description": "完整诗词"
                                        },
                                        "note": {
                                            "type": "string",
                                            "example": "情感投射",
                                            "description": "备注"
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "月夜忆舍弟",
                                            "description": "诗词名"
                                        },
                                        "author": {
                                            "type": "string",
                                            "example": "杜甫",
                                            "description": "作者"
                                        },
                                        "correct": {
                                            "type": "string",
                                            "example": "明",
                                            "description": "正确答案"
                                        },
                                        "dynasty": {
                                            "type": "string",
                                            "example": "唐",
                                            "description": "朝代"
                                        },
                                        "wrong_a": {
                                            "type": "string",
                                            "example": "亮",
                                            "description": "错误选项A"
                                        },
                                        "wrong_b": {
                                            "type": "string",
                                            "example": "圆",
                                            "description": "错误选项B"
                                        },
                                        "wrong_c": {
                                            "type": "string",
                                            "example": "清",
                                            "description": "错误选项C"
                                        },
                                        "category": {
                                            "type": "string",
                                            "example": "思乡",
                                            "description": "主题分类"
                                        },
                                        "question": {
                                            "type": "string",
                                            "example": "露从今夜白，月是故乡()。",
                                            "description": "题目"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "diff": 2,
                                        "full": "露从今夜白，月是故乡明。",
                                        "note": "情感投射",
                                        "title": "月夜忆舍弟",
                                        "author": "杜甫",
                                        "correct": "明",
                                        "dynasty": "唐",
                                        "wrong_a": "亮",
                                        "wrong_b": "圆",
                                        "wrong_c": "清",
                                        "category": "思乡",
                                        "question": "露从今夜白，月是故乡()。"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}