{
    "openapi": "3.0.0",
    "info": {
        "title": "童话故事合集 - API文档",
        "version": "1.0.0",
        "description": "收录了例如安徒生童话、格林童话、一千零一夜、世界范围内各民族经典的民间寓言故事等等，探索梦幻世界，畅游经典童话，让每一个孩子的心灵在这里绽放无限想象。童话类型ID：<a href=\"https:\/\/www.tianapi.com\/article\/197\" target=\"_blank\">童话故事合集接口所有故事类型ID<\/a>"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/fairytales\/index": {
            "get": {
                "summary": "查询故事内容",
                "tags": [
                    "童话故事合集"
                ],
                "description": "根据id查询童话故事的详细内容",
                "parameters": [
                    {
                        "name": "id",
                        "in": "query",
                        "description": "故事ID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "352fe25daf686bdb",
                            "description": "故事ID"
                        }
                    },
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "352fe25daf686bdb",
                                            "description": "故事ID"
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "狐狸和狼",
                                            "description": "故事名称"
                                        },
                                        "typeid": {
                                            "type": "int",
                                            "example": 3,
                                            "description": "故事分类"
                                        },
                                        "content": {
                                            "type": "string",
                                            "example": "在一个山洞里,住着一只狐狸和一只狼...",
                                            "description": "故事内容"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "id": "352fe25daf686bdb",
                                        "title": "狐狸和狼",
                                        "typeid": 2,
                                        "content": "在一个山洞里,住着一只狐狸和一只狼,它们早出晚归,一直过了很长的岁月.狼的本性倔强好胜,经常欺负.役使狐狸,让它侍候自己.狼不高兴了,对狐狸张口就骂.举手就打.年深日久,狐狸忍无可忍,但迫于狼的强暴,无可奈何,只好忍下去..."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "查询故事内容",
                "tags": [
                    "童话故事合集"
                ],
                "description": "根据id查询童话故事的详细内容",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "example": "352fe25daf686bdb",
                                        "description": "故事ID"
                                    },
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    }
                                },
                                "required": [
                                    "id",
                                    "key"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "352fe25daf686bdb",
                                            "description": "故事ID"
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "狐狸和狼",
                                            "description": "故事名称"
                                        },
                                        "typeid": {
                                            "type": "int",
                                            "example": 3,
                                            "description": "故事分类"
                                        },
                                        "content": {
                                            "type": "string",
                                            "example": "在一个山洞里,住着一只狐狸和一只狼...",
                                            "description": "故事内容"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "id": "352fe25daf686bdb",
                                        "title": "狐狸和狼",
                                        "typeid": 2,
                                        "content": "在一个山洞里,住着一只狐狸和一只狼,它们早出晚归,一直过了很长的岁月.狼的本性倔强好胜,经常欺负.役使狐狸,让它侍候自己.狼不高兴了,对狐狸张口就骂.举手就打.年深日久,狐狸忍无可忍,但迫于狼的强暴,无可奈何,只好忍下去..."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/fairytales\/fylist": {
            "get": {
                "summary": "查询故事列表",
                "tags": [
                    "童话故事合集"
                ],
                "description": "根据分类ID或关键词检索故事列表",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "num",
                        "in": "query",
                        "description": "数量，最大30",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 30,
                            "description": "数量，最大30"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "翻页",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 1,
                            "description": "翻页"
                        }
                    },
                    {
                        "name": "word",
                        "in": "query",
                        "description": "搜索标题关键词",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "狐狸和狼",
                            "description": "搜索标题关键词"
                        }
                    },
                    {
                        "name": "typeid",
                        "in": "query",
                        "description": "故事分类",
                        "required": true,
                        "schema": {
                            "type": "int",
                            "example": 3,
                            "description": "故事分类"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "352fe25daf686bdb",
                                            "description": "故事ID"
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "狐狸和狼",
                                            "description": "故事名称"
                                        },
                                        "typeid": {
                                            "type": "int",
                                            "example": 3,
                                            "description": "故事分类"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "id": "58238e9ae2dd305d",
                                                "title": "阿里巴巴与四十大盗",
                                                "typeid": 3
                                            },
                                            {
                                                "id": "3ad7c2ebb96fcba7",
                                                "title": "航海家辛巴达的故事",
                                                "typeid": 3
                                            },
                                            {
                                                "id": "13f9896df61279c9",
                                                "title": "阿拉丁和神灯的故事",
                                                "typeid": 3
                                            },
                                            {
                                                "id": "0bb4aec1710521c1",
                                                "title": "渔夫和雄人鱼的故事",
                                                "typeid": 3
                                            },
                                            {
                                                "id": "efe937780e955742",
                                                "title": "麦仑·沙迈追求漂亮女人的故事",
                                                "typeid": 3
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "查询故事列表",
                "tags": [
                    "童话故事合集"
                ],
                "description": "根据分类ID或关键词检索故事列表",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "num": {
                                        "type": "int",
                                        "example": 30,
                                        "description": "数量，最大30"
                                    },
                                    "page": {
                                        "type": "int",
                                        "example": 1,
                                        "description": "翻页"
                                    },
                                    "word": {
                                        "type": "string",
                                        "example": "狐狸和狼",
                                        "description": "搜索标题关键词"
                                    },
                                    "typeid": {
                                        "type": "int",
                                        "example": 3,
                                        "description": "故事分类"
                                    }
                                },
                                "required": [
                                    "key",
                                    "typeid"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "352fe25daf686bdb",
                                            "description": "故事ID"
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "狐狸和狼",
                                            "description": "故事名称"
                                        },
                                        "typeid": {
                                            "type": "int",
                                            "example": 3,
                                            "description": "故事分类"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "id": "58238e9ae2dd305d",
                                                "title": "阿里巴巴与四十大盗",
                                                "typeid": 3
                                            },
                                            {
                                                "id": "3ad7c2ebb96fcba7",
                                                "title": "航海家辛巴达的故事",
                                                "typeid": 3
                                            },
                                            {
                                                "id": "13f9896df61279c9",
                                                "title": "阿拉丁和神灯的故事",
                                                "typeid": 3
                                            },
                                            {
                                                "id": "0bb4aec1710521c1",
                                                "title": "渔夫和雄人鱼的故事",
                                                "typeid": 3
                                            },
                                            {
                                                "id": "efe937780e955742",
                                                "title": "麦仑·沙迈追求漂亮女人的故事",
                                                "typeid": 3
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}