{
    "openapi": "3.0.0",
    "info": {
        "title": "名人名言 - API文档",
        "version": "1.0.0",
        "description": "按类型区分的古今中外名人名言，typeid参数可以指定返回的类型。<a href=\"https:\/\/www.tianapi.com\/article\/93\" target=\"_blank\">类型ID对应的中文名称<\/a>"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/mingyan\/index": {
            "get": {
                "summary": "名人名言查询",
                "tags": [
                    "名人名言"
                ],
                "description": "根据名言类型typeid查询名人名言",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "num",
                        "in": "query",
                        "description": "返回数量",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 1,
                            "description": "返回数量"
                        }
                    },
                    {
                        "name": "typeid",
                        "in": "query",
                        "description": "名言类型ID",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 1,
                            "description": "名言类型ID"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "author": {
                                            "type": "string",
                                            "example": "沃尔波斯",
                                            "description": "作者"
                                        },
                                        "typeid": {
                                            "type": "int",
                                            "example": 24,
                                            "description": "类型ID"
                                        },
                                        "content": {
                                            "type": "string",
                                            "example": "所有的科学都是错误先真理而生，错误在先比错误在后好",
                                            "description": "内容"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "author": "沃尔波斯",
                                                "typeid": 24,
                                                "content": "所有的科学都是错误先真理而生，错误在先比错误在后好"
                                            },
                                            {
                                                "author": "巴甫洛夫",
                                                "typeid": 24,
                                                "content": "科学没有国界，科学家却有国界"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "名人名言查询",
                "tags": [
                    "名人名言"
                ],
                "description": "根据名言类型typeid查询名人名言",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "num": {
                                        "type": "int",
                                        "example": 1,
                                        "description": "返回数量"
                                    },
                                    "typeid": {
                                        "type": "int",
                                        "example": 1,
                                        "description": "名言类型ID"
                                    }
                                },
                                "required": [
                                    "key"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "author": {
                                            "type": "string",
                                            "example": "沃尔波斯",
                                            "description": "作者"
                                        },
                                        "typeid": {
                                            "type": "int",
                                            "example": 24,
                                            "description": "类型ID"
                                        },
                                        "content": {
                                            "type": "string",
                                            "example": "所有的科学都是错误先真理而生，错误在先比错误在后好",
                                            "description": "内容"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "author": "沃尔波斯",
                                                "typeid": 24,
                                                "content": "所有的科学都是错误先真理而生，错误在先比错误在后好"
                                            },
                                            {
                                                "author": "巴甫洛夫",
                                                "typeid": 24,
                                                "content": "科学没有国界，科学家却有国界"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/mingyan\/mytypelist": {
            "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": {
                                        "name": {
                                            "type": "string",
                                            "example": "道德",
                                            "description": "类型名称"
                                        },
                                        "typeid": {
                                            "type": "int",
                                            "example": 2,
                                            "description": "分类ID"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "name": "爱情",
                                                "typeid": 1
                                            },
                                            {
                                                "name": "道德",
                                                "typeid": 2
                                            },
                                            {
                                                "name": "青春",
                                                "typeid": 3
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "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": {
                                        "name": {
                                            "type": "string",
                                            "example": "道德",
                                            "description": "类型名称"
                                        },
                                        "typeid": {
                                            "type": "int",
                                            "example": 2,
                                            "description": "分类ID"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "name": "爱情",
                                                "typeid": 1
                                            },
                                            {
                                                "name": "道德",
                                                "typeid": 2
                                            },
                                            {
                                                "name": "青春",
                                                "typeid": 3
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}