{
    "openapi": "3.0.0",
    "info": {
        "title": "中国老黄历 - API文档",
        "version": "1.0.0",
        "description": "根据公历查询date参数可传递时间戳、公历日期。根据农历查询请传农历日期如2019-1-14（日期不得有前导零）并指定type参数为1。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/lunar\/index": {
            "get": {
                "summary": "老黄历查询",
                "tags": [
                    "中国老黄历"
                ],
                "description": "查询指定日期的黄历信息",
                "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": "2018-12-08",
                            "description": "查询日期，为空默认公历当天"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "按农历查询该值为1且日期不能有前导零",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 0,
                            "description": "按农历查询该值为1且日期不能有前导零"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "jieqi": {
                                            "type": "string",
                                            "description": "节气"
                                        },
                                        "taboo": {
                                            "type": "string",
                                            "example": "开市.安床.安葬.入宅.破土",
                                            "description": "不宜"
                                        },
                                        "pengzu": {
                                            "type": "string",
                                            "example": "庚不经络戌不吃犬",
                                            "description": "彭祖"
                                        },
                                        "suisha": {
                                            "type": "string",
                                            "example": "岁煞北",
                                            "description": "岁煞"
                                        },
                                        "xingsu": {
                                            "type": "string",
                                            "example": "南方星日马-凶",
                                            "description": "星宿"
                                        },
                                        "fitness": {
                                            "type": "string",
                                            "example": "祭祀.求财.签约.嫁娶.订盟",
                                            "description": "适宜"
                                        },
                                        "shenwei": {
                                            "type": "string",
                                            "example": "喜神：西北 福神：西南 财神：正东 阳贵...",
                                            "description": "神位"
                                        },
                                        "taishen": {
                                            "type": "string",
                                            "example": "碓磨莫移动,鸡栖,床栖胎神在外东北停留6天",
                                            "description": "胎神"
                                        },
                                        "chongsha": {
                                            "type": "string",
                                            "example": "狗日冲(甲辰)龙",
                                            "description": "冲煞"
                                        },
                                        "festival": {
                                            "type": "string",
                                            "description": "公历节日"
                                        },
                                        "jianshen": {
                                            "type": "string",
                                            "example": "收",
                                            "description": "见神"
                                        },
                                        "lunarday": {
                                            "type": "string",
                                            "example": "初八",
                                            "description": "农历日"
                                        },
                                        "lunardate": {
                                            "type": "Date",
                                            "example": "2018-12-8",
                                            "description": "农历日期"
                                        },
                                        "shengxiao": {
                                            "type": "string",
                                            "example": "狗",
                                            "description": "生肖"
                                        },
                                        "lmonthname": {
                                            "type": "string",
                                            "example": "季冬",
                                            "description": "季节"
                                        },
                                        "lubarmonth": {
                                            "type": "string",
                                            "example": "腊月",
                                            "description": "农历月"
                                        },
                                        "wuxingjiazi": {
                                            "type": "string",
                                            "example": "木",
                                            "description": "五行甲子"
                                        },
                                        "wuxingnayear": {
                                            "type": "string",
                                            "example": "平地木",
                                            "description": "五行年"
                                        },
                                        "gregoriandate": {
                                            "type": "Date",
                                            "example": "2019-01-13",
                                            "description": "公历日期"
                                        },
                                        "wuxingnamonth": {
                                            "type": "string",
                                            "example": "海中金",
                                            "description": "五行月"
                                        },
                                        "lunar_festival": {
                                            "type": "string",
                                            "example": "腊八节",
                                            "description": "农历节日"
                                        },
                                        "tiangandizhiday": {
                                            "type": "string",
                                            "example": "庚戌",
                                            "description": "天干地支日"
                                        },
                                        "tiangandizhiyear": {
                                            "type": "string",
                                            "example": "戊戌",
                                            "description": "天干地支年"
                                        },
                                        "tiangandizhimonth": {
                                            "type": "string",
                                            "example": "乙丑",
                                            "description": "天干地支月"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "jieqi": "",
                                        "taboo": "开市.安床.安葬.入宅.破土",
                                        "pengzu": "庚不经络戌不吃犬",
                                        "suisha": "岁煞北",
                                        "xingsu": "南方星日马-凶",
                                        "fitness": "祭祀.求财.签约.嫁娶.订盟",
                                        "shenwei": "喜神：西北 福神：西南 财神：正东 阳贵：东北 阴贵：西南",
                                        "taishen": "碓磨莫移动,鸡栖,床栖胎神在外东北停留6天",
                                        "chongsha": "狗日冲(甲辰)龙",
                                        "festival": "",
                                        "jianshen": "收",
                                        "lunarday": "初八",
                                        "lunardate": "2018-12-8",
                                        "shengxiao": "狗",
                                        "lmonthname": "季冬",
                                        "lubarmonth": "腊月",
                                        "wuxingjiazi": "木",
                                        "wuxingnayear": "平地木",
                                        "gregoriandate": "2019-01-13",
                                        "wuxingnamonth": "海中金",
                                        "lunar_festival": "腊八节",
                                        "tiangandizhiday": "庚戌",
                                        "tiangandizhiyear": "戊戌",
                                        "tiangandizhimonth": "乙丑"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "老黄历查询",
                "tags": [
                    "中国老黄历"
                ],
                "description": "查询指定日期的黄历信息",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "date": {
                                        "type": "string",
                                        "example": "2018-12-08",
                                        "description": "查询日期，为空默认公历当天"
                                    },
                                    "type": {
                                        "type": "int",
                                        "example": 0,
                                        "description": "按农历查询该值为1且日期不能有前导零"
                                    }
                                },
                                "required": [
                                    "key"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "jieqi": {
                                            "type": "string",
                                            "description": "节气"
                                        },
                                        "taboo": {
                                            "type": "string",
                                            "example": "开市.安床.安葬.入宅.破土",
                                            "description": "不宜"
                                        },
                                        "pengzu": {
                                            "type": "string",
                                            "example": "庚不经络戌不吃犬",
                                            "description": "彭祖"
                                        },
                                        "suisha": {
                                            "type": "string",
                                            "example": "岁煞北",
                                            "description": "岁煞"
                                        },
                                        "xingsu": {
                                            "type": "string",
                                            "example": "南方星日马-凶",
                                            "description": "星宿"
                                        },
                                        "fitness": {
                                            "type": "string",
                                            "example": "祭祀.求财.签约.嫁娶.订盟",
                                            "description": "适宜"
                                        },
                                        "shenwei": {
                                            "type": "string",
                                            "example": "喜神：西北 福神：西南 财神：正东 阳贵...",
                                            "description": "神位"
                                        },
                                        "taishen": {
                                            "type": "string",
                                            "example": "碓磨莫移动,鸡栖,床栖胎神在外东北停留6天",
                                            "description": "胎神"
                                        },
                                        "chongsha": {
                                            "type": "string",
                                            "example": "狗日冲(甲辰)龙",
                                            "description": "冲煞"
                                        },
                                        "festival": {
                                            "type": "string",
                                            "description": "公历节日"
                                        },
                                        "jianshen": {
                                            "type": "string",
                                            "example": "收",
                                            "description": "见神"
                                        },
                                        "lunarday": {
                                            "type": "string",
                                            "example": "初八",
                                            "description": "农历日"
                                        },
                                        "lunardate": {
                                            "type": "Date",
                                            "example": "2018-12-8",
                                            "description": "农历日期"
                                        },
                                        "shengxiao": {
                                            "type": "string",
                                            "example": "狗",
                                            "description": "生肖"
                                        },
                                        "lmonthname": {
                                            "type": "string",
                                            "example": "季冬",
                                            "description": "季节"
                                        },
                                        "lubarmonth": {
                                            "type": "string",
                                            "example": "腊月",
                                            "description": "农历月"
                                        },
                                        "wuxingjiazi": {
                                            "type": "string",
                                            "example": "木",
                                            "description": "五行甲子"
                                        },
                                        "wuxingnayear": {
                                            "type": "string",
                                            "example": "平地木",
                                            "description": "五行年"
                                        },
                                        "gregoriandate": {
                                            "type": "Date",
                                            "example": "2019-01-13",
                                            "description": "公历日期"
                                        },
                                        "wuxingnamonth": {
                                            "type": "string",
                                            "example": "海中金",
                                            "description": "五行月"
                                        },
                                        "lunar_festival": {
                                            "type": "string",
                                            "example": "腊八节",
                                            "description": "农历节日"
                                        },
                                        "tiangandizhiday": {
                                            "type": "string",
                                            "example": "庚戌",
                                            "description": "天干地支日"
                                        },
                                        "tiangandizhiyear": {
                                            "type": "string",
                                            "example": "戊戌",
                                            "description": "天干地支年"
                                        },
                                        "tiangandizhimonth": {
                                            "type": "string",
                                            "example": "乙丑",
                                            "description": "天干地支月"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "jieqi": "",
                                        "taboo": "开市.安床.安葬.入宅.破土",
                                        "pengzu": "庚不经络戌不吃犬",
                                        "suisha": "岁煞北",
                                        "xingsu": "南方星日马-凶",
                                        "fitness": "祭祀.求财.签约.嫁娶.订盟",
                                        "shenwei": "喜神：西北 福神：西南 财神：正东 阳贵：东北 阴贵：西南",
                                        "taishen": "碓磨莫移动,鸡栖,床栖胎神在外东北停留6天",
                                        "chongsha": "狗日冲(甲辰)龙",
                                        "festival": "",
                                        "jianshen": "收",
                                        "lunarday": "初八",
                                        "lunardate": "2018-12-8",
                                        "shengxiao": "狗",
                                        "lmonthname": "季冬",
                                        "lubarmonth": "腊月",
                                        "wuxingjiazi": "木",
                                        "wuxingnayear": "平地木",
                                        "gregoriandate": "2019-01-13",
                                        "wuxingnamonth": "海中金",
                                        "lunar_festival": "腊八节",
                                        "tiangandizhiday": "庚戌",
                                        "tiangandizhiyear": "戊戌",
                                        "tiangandizhimonth": "乙丑"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}