{
    "openapi": "3.0.0",
    "info": {
        "title": "精选宋词 - API文档",
        "version": "1.0.0",
        "description": "宋词是指以古体诗、近体诗和格律词为代表的中国古代传统诗歌。亦是汉字文化圈的特色之一。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/songci\/index": {
            "get": {
                "summary": "精选宋词查询",
                "tags": [
                    "精选宋词"
                ],
                "description": "随机返回精彩宋词可指定数量",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "num",
                        "in": "query",
                        "description": "返回数量，1-10",
                        "required": true,
                        "schema": {
                            "type": "int",
                            "example": 5,
                            "description": "返回数量，1-10"
                        }
                    },
                    {
                        "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": {
                                        "tags": {
                                            "type": "string",
                                            "example": "宋词精选,初中古诗,高中古诗,豪放,中秋节,月亮,怀人,祝福,卷四",
                                            "description": "关键字"
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "水调歌头明月几时有",
                                            "description": "词名"
                                        },
                                        "yiwen": {
                                            "type": "string",
                                            "example": "丙辰年的中秋节，高兴地喝酒直到第二天早晨......",
                                            "description": "译文或释义"
                                        },
                                        "author": {
                                            "type": "string",
                                            "example": "苏轼",
                                            "description": "作者"
                                        },
                                        "content": {
                                            "type": "string",
                                            "example": "明月几时有？把酒问青天。不知天上宫阙，今夕是何年。......",
                                            "description": "内容"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "tags": "宋词精选,初中古诗,高中古诗,豪放,中秋节,月亮,怀人,祝福,卷四",
                                                "title": "水调歌头明月几时有",
                                                "yiwen": " 丙辰年的中秋节，高兴地喝酒直到第二天早晨，喝到大醉，写了这首词，同时思念弟弟苏辙。",
                                                "author": "苏轼",
                                                "content": "丙辰中秋，欢饮达旦，大醉，作此篇，兼怀子由。 明月几时有？把酒问青天。不知天上宫阙，今夕是何年。我欲乘风归去，又恐琼楼玉宇，高处不胜寒。起舞弄清影，何似在人间？(何似 一作：何时；又恐 一作：惟 唯恐)转朱阁，低绮户，照无眠。不应有恨，何事长向别时圆？人有悲欢离合，月有阴晴圆缺，此事古难全。但愿人长久，千里共婵娟。长向 一作：偏向) "
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "精选宋词查询",
                "tags": [
                    "精选宋词"
                ],
                "description": "随机返回精彩宋词可指定数量",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "num": {
                                        "type": "int",
                                        "example": 5,
                                        "description": "返回数量，1-10"
                                    },
                                    "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": {
                                        "tags": {
                                            "type": "string",
                                            "example": "宋词精选,初中古诗,高中古诗,豪放,中秋节,月亮,怀人,祝福,卷四",
                                            "description": "关键字"
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "水调歌头明月几时有",
                                            "description": "词名"
                                        },
                                        "yiwen": {
                                            "type": "string",
                                            "example": "丙辰年的中秋节，高兴地喝酒直到第二天早晨......",
                                            "description": "译文或释义"
                                        },
                                        "author": {
                                            "type": "string",
                                            "example": "苏轼",
                                            "description": "作者"
                                        },
                                        "content": {
                                            "type": "string",
                                            "example": "明月几时有？把酒问青天。不知天上宫阙，今夕是何年。......",
                                            "description": "内容"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "tags": "宋词精选,初中古诗,高中古诗,豪放,中秋节,月亮,怀人,祝福,卷四",
                                                "title": "水调歌头明月几时有",
                                                "yiwen": " 丙辰年的中秋节，高兴地喝酒直到第二天早晨，喝到大醉，写了这首词，同时思念弟弟苏辙。",
                                                "author": "苏轼",
                                                "content": "丙辰中秋，欢饮达旦，大醉，作此篇，兼怀子由。 明月几时有？把酒问青天。不知天上宫阙，今夕是何年。我欲乘风归去，又恐琼楼玉宇，高处不胜寒。起舞弄清影，何似在人间？(何似 一作：何时；又恐 一作：惟 唯恐)转朱阁，低绮户，照无眠。不应有恨，何事长向别时圆？人有悲欢离合，月有阴晴圆缺，此事古难全。但愿人长久，千里共婵娟。长向 一作：偏向) "
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}