{
    "openapi": "3.0.0",
    "info": {
        "title": "二十四节气 - API文档",
        "version": "1.0.0",
        "description": "二十四节气表是中国古代订立的一种用来指导农事的补充历法，是中国古代劳动人民长期经验的积累和智慧的结晶。该接口可查询指定年份的节气信息，但year传值某个年份时，接口返回一个date对象，包含相关公历和农历年月日和属相等信息。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/jieqi\/index": {
            "get": {
                "summary": "二十四节气",
                "tags": [
                    "二十四节气"
                ],
                "description": "二十四节气查询支持指定年份查询",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "word",
                        "in": "query",
                        "description": "24节气名称",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "立春",
                            "description": "24节气名称"
                        }
                    },
                    {
                        "name": "year",
                        "in": "query",
                        "description": "指定年份",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "2020",
                            "description": "指定年份"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "day": {
                                            "type": "string",
                                            "example": "2月4日或5日",
                                            "description": "日期范围"
                                        },
                                        "date": {
                                            "type": "object",
                                            "description": "传值year后返回此对象"
                                        },
                                        "name": {
                                            "type": "string",
                                            "example": "立春",
                                            "description": "节气名称"
                                        },
                                        "yiji": {
                                            "type": "string",
                                            "example": "立春后是疾病多发的季节。春天的多发病有肺炎、肝炎、流脑、麻疹.....",
                                            "description": "宜忌"
                                        },
                                        "shiju": {
                                            "type": "string",
                                            "example": "东风带雨逐西风，大地阳和暖气生。万物苏萌山水醒，农家岁首又谋耕",
                                            "description": "诗句"
                                        },
                                        "xishu": {
                                            "type": "string",
                                            "example": "立春后，人们在春暖花开的日子里，喜欢外出游春......",
                                            "description": "习俗"
                                        },
                                        "+cnday": {
                                            "type": "string",
                                            "example": "十一",
                                            "description": "农历日"
                                        },
                                        "meishi": {
                                            "type": "string",
                                            "example": "立春时的食品主要是春饼、萝卜、五辛盘等，在南方则流行吃春卷......",
                                            "description": "美食"
                                        },
                                        "+cnyear": {
                                            "type": "string",
                                            "example": "庚子",
                                            "description": "农历年"
                                        },
                                        "jieshao": {
                                            "type": "string",
                                            "example": "立春不仅是农历二十四节气中的第一个节气......",
                                            "description": "介绍"
                                        },
                                        "nameimg": {
                                            "type": "string",
                                            "example": "lichun.jpg",
                                            "description": "节气图"
                                        },
                                        "yuanyin": {
                                            "type": "string",
                                            "example": "谓春季开始之节气",
                                            "description": "原因"
                                        },
                                        "+cnmonth": {
                                            "type": "string",
                                            "example": "正月",
                                            "description": "农历月"
                                        },
                                        "+cnzodiac": {
                                            "type": "string",
                                            "example": "鼠",
                                            "description": "农历生肖"
                                        },
                                        "+gregdate": {
                                            "type": "string",
                                            "example": "2020-02-04",
                                            "description": "公历日期"
                                        },
                                        "+lunardate": {
                                            "type": "string",
                                            "example": "2020-1-11",
                                            "description": "农历日期"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "day": "2月4日或5日",
                                        "date": {
                                            "cnday": "十一",
                                            "cnyear": "庚子",
                                            "cnmonth": "正月",
                                            "cnzodiac": "鼠",
                                            "gregdate": "2020-02-04",
                                            "lunardate": "2020-1-11"
                                        },
                                        "name": "立春",
                                        "yiji": "立春后是疾病多发的季节。春天的多发病有肺炎、肝炎、流脑、麻疹、腮腺炎、过敏性哮喘、心肌梗塞、精神病等。因此对于有肝炎、过敏性哮喘、心肌梗塞等的患者要特别注意调养预防。在养生上主要是护肝。在作息时间上，人们也应顺应自然界的规律，早睡早起。在精神养生方面，要力戒暴怒，更忌忧郁，做到心胸开阔，保持心境愉悦。立春之后的一段时间往往冷暖不定，要当心“倒春寒”的侵扰，特别是对于体弱的人来说，感冒、发烧是常有的事情。对此专家表示，要想杀菌并防寒，在饮食上可增加吃大蒜、洋葱、芹菜等“味冲”食物的次数，对预防伤寒感冒等春季多发的呼吸道感染大有益处。",
                                        "shiju": "东风带雨逐西风，大地阳和暖气生。万物苏萌山水醒，农家岁首又谋耕",
                                        "xishu": "立春后，人们在春暖花开的日子里，喜欢外出游春，俗称出城探春、踏春，是古代春游的主要形式",
                                        "meishi": "立春时的食品主要是春饼、萝卜、五辛盘等，在南方则流行吃春卷。又比如美食:春盘--主要是蔬菜取生菜瓜果饼糖放盘中为春盘（或拼成盘）馈送亲友或自食取迎春之意。盘里主要有：果品、蔬菜、糖果、饼、饵五种。蔬菜主要有：豆芽、萝卜、韭菜、菠菜、生菜、豆子、鸡蛋、土豆丝。这也是立春的美食之一。",
                                        "jieshao": "立春不仅是农历二十四节气中的第一个节气，立春是从天文上来划分的，而在自然界、在人们的心目中，春意味着风和日暖，鸟语花香;春也意味着万物生长，农家播种。立春节气一般是从2月4日或5日开始，到2月19或20日结束。有时在农历的腊月，有时在农历的正月",
                                        "nameimg": "lichun.jpg",
                                        "yuanyin": "谓春季开始之节气"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "二十四节气",
                "tags": [
                    "二十四节气"
                ],
                "description": "二十四节气查询支持指定年份查询",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "word": {
                                        "type": "string",
                                        "example": "立春",
                                        "description": "24节气名称"
                                    },
                                    "year": {
                                        "type": "string",
                                        "example": "2020",
                                        "description": "指定年份"
                                    }
                                },
                                "required": [
                                    "key",
                                    "word"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "day": {
                                            "type": "string",
                                            "example": "2月4日或5日",
                                            "description": "日期范围"
                                        },
                                        "date": {
                                            "type": "object",
                                            "description": "传值year后返回此对象"
                                        },
                                        "name": {
                                            "type": "string",
                                            "example": "立春",
                                            "description": "节气名称"
                                        },
                                        "yiji": {
                                            "type": "string",
                                            "example": "立春后是疾病多发的季节。春天的多发病有肺炎、肝炎、流脑、麻疹.....",
                                            "description": "宜忌"
                                        },
                                        "shiju": {
                                            "type": "string",
                                            "example": "东风带雨逐西风，大地阳和暖气生。万物苏萌山水醒，农家岁首又谋耕",
                                            "description": "诗句"
                                        },
                                        "xishu": {
                                            "type": "string",
                                            "example": "立春后，人们在春暖花开的日子里，喜欢外出游春......",
                                            "description": "习俗"
                                        },
                                        "+cnday": {
                                            "type": "string",
                                            "example": "十一",
                                            "description": "农历日"
                                        },
                                        "meishi": {
                                            "type": "string",
                                            "example": "立春时的食品主要是春饼、萝卜、五辛盘等，在南方则流行吃春卷......",
                                            "description": "美食"
                                        },
                                        "+cnyear": {
                                            "type": "string",
                                            "example": "庚子",
                                            "description": "农历年"
                                        },
                                        "jieshao": {
                                            "type": "string",
                                            "example": "立春不仅是农历二十四节气中的第一个节气......",
                                            "description": "介绍"
                                        },
                                        "nameimg": {
                                            "type": "string",
                                            "example": "lichun.jpg",
                                            "description": "节气图"
                                        },
                                        "yuanyin": {
                                            "type": "string",
                                            "example": "谓春季开始之节气",
                                            "description": "原因"
                                        },
                                        "+cnmonth": {
                                            "type": "string",
                                            "example": "正月",
                                            "description": "农历月"
                                        },
                                        "+cnzodiac": {
                                            "type": "string",
                                            "example": "鼠",
                                            "description": "农历生肖"
                                        },
                                        "+gregdate": {
                                            "type": "string",
                                            "example": "2020-02-04",
                                            "description": "公历日期"
                                        },
                                        "+lunardate": {
                                            "type": "string",
                                            "example": "2020-1-11",
                                            "description": "农历日期"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "day": "2月4日或5日",
                                        "date": {
                                            "cnday": "十一",
                                            "cnyear": "庚子",
                                            "cnmonth": "正月",
                                            "cnzodiac": "鼠",
                                            "gregdate": "2020-02-04",
                                            "lunardate": "2020-1-11"
                                        },
                                        "name": "立春",
                                        "yiji": "立春后是疾病多发的季节。春天的多发病有肺炎、肝炎、流脑、麻疹、腮腺炎、过敏性哮喘、心肌梗塞、精神病等。因此对于有肝炎、过敏性哮喘、心肌梗塞等的患者要特别注意调养预防。在养生上主要是护肝。在作息时间上，人们也应顺应自然界的规律，早睡早起。在精神养生方面，要力戒暴怒，更忌忧郁，做到心胸开阔，保持心境愉悦。立春之后的一段时间往往冷暖不定，要当心“倒春寒”的侵扰，特别是对于体弱的人来说，感冒、发烧是常有的事情。对此专家表示，要想杀菌并防寒，在饮食上可增加吃大蒜、洋葱、芹菜等“味冲”食物的次数，对预防伤寒感冒等春季多发的呼吸道感染大有益处。",
                                        "shiju": "东风带雨逐西风，大地阳和暖气生。万物苏萌山水醒，农家岁首又谋耕",
                                        "xishu": "立春后，人们在春暖花开的日子里，喜欢外出游春，俗称出城探春、踏春，是古代春游的主要形式",
                                        "meishi": "立春时的食品主要是春饼、萝卜、五辛盘等，在南方则流行吃春卷。又比如美食:春盘--主要是蔬菜取生菜瓜果饼糖放盘中为春盘（或拼成盘）馈送亲友或自食取迎春之意。盘里主要有：果品、蔬菜、糖果、饼、饵五种。蔬菜主要有：豆芽、萝卜、韭菜、菠菜、生菜、豆子、鸡蛋、土豆丝。这也是立春的美食之一。",
                                        "jieshao": "立春不仅是农历二十四节气中的第一个节气，立春是从天文上来划分的，而在自然界、在人们的心目中，春意味着风和日暖，鸟语花香;春也意味着万物生长，农家播种。立春节气一般是从2月4日或5日开始，到2月19或20日结束。有时在农历的腊月，有时在农历的正月",
                                        "nameimg": "lichun.jpg",
                                        "yuanyin": "谓春季开始之节气"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}