{
    "openapi": "3.0.0",
    "info": {
        "title": "情绪诗句 - API文档",
        "version": "1.0.0",
        "description": "古诗词中那些表达离别、人生、生活、四季更替等情绪的诗句，每次调用接口随机返回一条，同时也支持分别查询。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/moodpoetry\/index": {
            "get": {
                "summary": "情绪诗句",
                "tags": [
                    "情绪诗句"
                ],
                "description": "",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "分类查询，1离别,2人生,3生活,4四季",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 1,
                            "description": "分类查询，1离别,2人生,3生活,4四季"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "type": {
                                            "type": "int",
                                            "example": 2,
                                            "description": "分类，1离别,2人生,3生活,4四季"
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "白鹿洞二首·其一",
                                            "description": "标题"
                                        },
                                        "author": {
                                            "type": "string",
                                            "example": "王贞白",
                                            "description": "作者"
                                        },
                                        "content": {
                                            "type": "string",
                                            "example": "读书不觉已春深，一寸光阴一寸金。",
                                            "description": "内容"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "type": 2,
                                        "title": "白鹿洞二首·其一",
                                        "author": "王贞白",
                                        "content": "读书不觉已春深，一寸光阴一寸金。"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "情绪诗句",
                "tags": [
                    "情绪诗句"
                ],
                "description": "",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "type": {
                                        "type": "int",
                                        "example": 1,
                                        "description": "分类查询，1离别,2人生,3生活,4四季"
                                    }
                                },
                                "required": [
                                    "key"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "type": {
                                            "type": "int",
                                            "example": 2,
                                            "description": "分类，1离别,2人生,3生活,4四季"
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "白鹿洞二首·其一",
                                            "description": "标题"
                                        },
                                        "author": {
                                            "type": "string",
                                            "example": "王贞白",
                                            "description": "作者"
                                        },
                                        "content": {
                                            "type": "string",
                                            "example": "读书不觉已春深，一寸光阴一寸金。",
                                            "description": "内容"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "type": 2,
                                        "title": "白鹿洞二首·其一",
                                        "author": "王贞白",
                                        "content": "读书不觉已春深，一寸光阴一寸金。"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}