{
    "openapi": "3.0.0",
    "info": {
        "title": "元曲三百首 - API文档",
        "version": "1.0.0",
        "description": "元曲三百首接口，返回词曲类型、作者、批注、翻译等。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/yuanqu\/index": {
            "get": {
                "summary": "元曲三百首查询",
                "tags": [
                    "元曲三百首"
                ],
                "description": "随机返回一句元曲三百首数据",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "num",
                        "in": "query",
                        "description": "返回数量",
                        "required": true,
                        "schema": {
                            "type": "int",
                            "example": 1,
                            "description": "返回数量"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "翻页",
                        "required": true,
                        "schema": {
                            "type": "int",
                            "example": 1,
                            "description": "翻页"
                        }
                    },
                    {
                        "name": "word",
                        "in": "query",
                        "description": "曲名或作者（支持模糊搜索）",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "折桂令",
                            "description": "曲名或作者（支持模糊搜索）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "note": {
                                            "type": "string",
                                            "example": "拟：模拟。张鸣善；元代后期散曲作家......",
                                            "description": "批注"
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "折桂令",
                                            "description": "曲名"
                                        },
                                        "author": {
                                            "type": "string",
                                            "example": "倪 瓒",
                                            "description": "作者"
                                        },
                                        "chapter": {
                                            "type": "string",
                                            "example": "散曲",
                                            "description": "词曲类型"
                                        },
                                        "content": {
                                            "type": "string",
                                            "example": "草茫茫秦汉陵阙，世代兴亡，却便似月影圆缺......",
                                            "description": "内容"
                                        },
                                        "translation": {
                                            "type": "string",
                                            "example": "秦汉皇陵一片茫茫野草，世世代代兴亡更替......",
                                            "description": "译文"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "note": "拟：模拟。张鸣善；元代后期散曲作家。从内容看，可能是模仿张鸣善《水仙子·讥时》。陵阙：指帝王的坟墓。山人家：山居的人，作者自称。堆案图书：形容藏书丰富。案，桌子。薇蕨：皆草本植物。伯夷、齐叔不食周粟，隐居首阳山、采薇而食。后世以“薇蕨”为隐者之粮。侯门。泛指官宦显贵人家。刺谒：求见、拜访。刺，类似后来的名片。",
                                                "title": "折桂令",
                                                "author": "倪 瓒",
                                                "chapter": "散曲",
                                                "content": "草茫茫秦汉陵阙，世代兴亡，却便似月影圆缺。山人室堆案图书，当窗松桂，满地薇蕨。侯门深何须刺谒，白云自可怡悦。到如今世事难说，天地间不见一个英雄，不见一个豪杰。",
                                                "translation": "秦汉皇陵一片茫茫野草，世世代代兴亡更替，就像那月影有圆有缺。山人的家里图书堆满案桌，当窗可见松桂姿影，满地都是野生薇蕨。侯门深如海何须去拜见，空中的白云尽可欣赏怡悦。到如今纷繁世事难以言说。茫茫天地之间见不到一个英雄，见不到一个豪杰。"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "元曲三百首查询",
                "tags": [
                    "元曲三百首"
                ],
                "description": "随机返回一句元曲三百首数据",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "num": {
                                        "type": "int",
                                        "example": 1,
                                        "description": "返回数量"
                                    },
                                    "page": {
                                        "type": "int",
                                        "example": 1,
                                        "description": "翻页"
                                    },
                                    "word": {
                                        "type": "string",
                                        "example": "折桂令",
                                        "description": "曲名或作者（支持模糊搜索）"
                                    }
                                },
                                "required": [
                                    "key",
                                    "num",
                                    "page"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "note": {
                                            "type": "string",
                                            "example": "拟：模拟。张鸣善；元代后期散曲作家......",
                                            "description": "批注"
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "折桂令",
                                            "description": "曲名"
                                        },
                                        "author": {
                                            "type": "string",
                                            "example": "倪 瓒",
                                            "description": "作者"
                                        },
                                        "chapter": {
                                            "type": "string",
                                            "example": "散曲",
                                            "description": "词曲类型"
                                        },
                                        "content": {
                                            "type": "string",
                                            "example": "草茫茫秦汉陵阙，世代兴亡，却便似月影圆缺......",
                                            "description": "内容"
                                        },
                                        "translation": {
                                            "type": "string",
                                            "example": "秦汉皇陵一片茫茫野草，世世代代兴亡更替......",
                                            "description": "译文"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "note": "拟：模拟。张鸣善；元代后期散曲作家。从内容看，可能是模仿张鸣善《水仙子·讥时》。陵阙：指帝王的坟墓。山人家：山居的人，作者自称。堆案图书：形容藏书丰富。案，桌子。薇蕨：皆草本植物。伯夷、齐叔不食周粟，隐居首阳山、采薇而食。后世以“薇蕨”为隐者之粮。侯门。泛指官宦显贵人家。刺谒：求见、拜访。刺，类似后来的名片。",
                                                "title": "折桂令",
                                                "author": "倪 瓒",
                                                "chapter": "散曲",
                                                "content": "草茫茫秦汉陵阙，世代兴亡，却便似月影圆缺。山人室堆案图书，当窗松桂，满地薇蕨。侯门深何须刺谒，白云自可怡悦。到如今世事难说，天地间不见一个英雄，不见一个豪杰。",
                                                "translation": "秦汉皇陵一片茫茫野草，世世代代兴亡更替，就像那月影有圆有缺。山人的家里图书堆满案桌，当窗可见松桂姿影，满地都是野生薇蕨。侯门深如海何须去拜见，空中的白云尽可欣赏怡悦。到如今纷繁世事难以言说。茫茫天地之间见不到一个英雄，见不到一个豪杰。"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}