{
    "openapi": "3.0.0",
    "info": {
        "title": "ONE一个 - API文档",
        "version": "1.0.0",
        "description": "ONE一个，本接口每日同步返回一个短小精美而优雅的句子。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/one\/index": {
            "get": {
                "summary": "ONE一个查询",
                "tags": [
                    "ONE一个"
                ],
                "description": "随机和指定日期返回ONE一个推荐的精彩句子",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "date",
                        "in": "query",
                        "description": "指定时间，默认当天",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "2019-10-18",
                            "description": "指定时间，默认当天"
                        }
                    },
                    {
                        "name": "rand",
                        "in": "query",
                        "description": "是否随机",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 0,
                            "description": "是否随机"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "date": {
                                            "type": "string",
                                            "example": "2019-10-18",
                                            "description": "时间"
                                        },
                                        "word": {
                                            "type": "string",
                                            "example": "一个人就是一片荒原，偶尔有房客，有雷声，有春暖花开。",
                                            "description": "句子"
                                        },
                                        "oneid": {
                                            "type": "int",
                                            "example": 2604,
                                            "description": "ONE一个ID"
                                        },
                                        "imgurl": {
                                            "type": "string",
                                            "example": "http:\/\/image.wufazhuce.com\/FordKXIwo_85nVFcvOn3TC8oZXXH",
                                            "description": "配图"
                                        },
                                        "wordfrom": {
                                            "type": "string",
                                            "example": "《此刻，月光洒在中年的庭院》",
                                            "description": "句子来源"
                                        },
                                        "imgauthor": {
                                            "type": "string",
                                            "example": "Emilie Cotterill",
                                            "description": "配图作者"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "date": "2019-10-18",
                                        "word": "一个人就是一片荒原，偶尔有房客，有雷声，有春暖花开。",
                                        "oneid": 2604,
                                        "imgurl": "http:\/\/image.wufazhuce.com\/FordKXIwo_85nVFcvOn3TC8oZXXH",
                                        "wordfrom": "《此刻，月光洒在中年的庭院》",
                                        "imgauthor": "EmilieCotterill"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "ONE一个查询",
                "tags": [
                    "ONE一个"
                ],
                "description": "随机和指定日期返回ONE一个推荐的精彩句子",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "date": {
                                        "type": "string",
                                        "example": "2019-10-18",
                                        "description": "指定时间，默认当天"
                                    },
                                    "rand": {
                                        "type": "int",
                                        "example": 0,
                                        "description": "是否随机"
                                    }
                                },
                                "required": [
                                    "key"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "date": {
                                            "type": "string",
                                            "example": "2019-10-18",
                                            "description": "时间"
                                        },
                                        "word": {
                                            "type": "string",
                                            "example": "一个人就是一片荒原，偶尔有房客，有雷声，有春暖花开。",
                                            "description": "句子"
                                        },
                                        "oneid": {
                                            "type": "int",
                                            "example": 2604,
                                            "description": "ONE一个ID"
                                        },
                                        "imgurl": {
                                            "type": "string",
                                            "example": "http:\/\/image.wufazhuce.com\/FordKXIwo_85nVFcvOn3TC8oZXXH",
                                            "description": "配图"
                                        },
                                        "wordfrom": {
                                            "type": "string",
                                            "example": "《此刻，月光洒在中年的庭院》",
                                            "description": "句子来源"
                                        },
                                        "imgauthor": {
                                            "type": "string",
                                            "example": "Emilie Cotterill",
                                            "description": "配图作者"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "date": "2019-10-18",
                                        "word": "一个人就是一片荒原，偶尔有房客，有雷声，有春暖花开。",
                                        "oneid": 2604,
                                        "imgurl": "http:\/\/image.wufazhuce.com\/FordKXIwo_85nVFcvOn3TC8oZXXH",
                                        "wordfrom": "《此刻，月光洒在中年的庭院》",
                                        "imgauthor": "EmilieCotterill"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}