{
    "openapi": "3.0.0",
    "info": {
        "title": "微信文章主页 - API文档",
        "version": "1.0.0",
        "description": "绑定天行数据微信服务号后，转发微信文章到服务号，可以添加文章到系统。方便同步到自己的其他应用，接口返回文章ID、公众号名称、公众号ID、原创作者名称。当传递viewid参数时，返回包含文章全文内容的数据。src的参数值应该是天行数据系统生成的微信主页ID（添加文章后获得），表示该账号下所有的微信文章。wxid参数值是添加过的某个微信公众号文章数据。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/wxhome\/index": {
            "get": {
                "summary": "查询文章列表",
                "tags": [
                    "微信文章主页"
                ],
                "description": "",
                "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": 10,
                            "description": "返回数量"
                        }
                    },
                    {
                        "name": "src",
                        "in": "query",
                        "description": "指定来源为微信主页ID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "txd30ffae8",
                            "description": "指定来源为微信主页ID"
                        }
                    },
                    {
                        "name": "clct",
                        "in": "query",
                        "description": "推荐阅读",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 1,
                            "description": "推荐阅读"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "翻页",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 1,
                            "description": "翻页"
                        }
                    },
                    {
                        "name": "rand",
                        "in": "query",
                        "description": "随机获取",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 1,
                            "description": "随机获取"
                        }
                    },
                    {
                        "name": "word",
                        "in": "query",
                        "description": "检索关键词",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "天行数据",
                            "description": "检索关键词"
                        }
                    },
                    {
                        "name": "wxid",
                        "in": "query",
                        "description": "指定来源为微信公众号ID",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "tianapi",
                            "description": "指定来源为微信公众号ID"
                        }
                    },
                    {
                        "name": "cover",
                        "in": "query",
                        "description": "封面文章",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 1,
                            "description": "封面文章"
                        }
                    },
                    {
                        "name": "viewid",
                        "in": "query",
                        "description": "返回原文",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 3207,
                            "description": "返回原文"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "+id": {
                                            "type": "int",
                                            "example": 3351,
                                            "description": "文章ID"
                                        },
                                        "+url": {
                                            "type": "string",
                                            "example": "http:\/\/mp.weixin.qq.com\/s?__biz=MzA3OTg2NjEwNg==",
                                            "description": "文章地址"
                                        },
                                        "list": {
                                            "type": "object[]",
                                            "description": "文章列表"
                                        },
                                        "+clct": {
                                            "type": "int",
                                            "example": 0,
                                            "description": "是否设为推荐，0=>否，1=>是"
                                        },
                                        "+wxid": {
                                            "type": "string",
                                            "example": "tianapi",
                                            "description": "微信公众号"
                                        },
                                        "+cover": {
                                            "type": "int",
                                            "example": 0,
                                            "description": "是否设为封面，0=>否，1=>是"
                                        },
                                        "+ctime": {
                                            "type": "string",
                                            "example": "2019-01-11",
                                            "description": "发布时间"
                                        },
                                        "+title": {
                                            "type": "string",
                                            "example": "天行数据微信主页接口开放全文数据",
                                            "description": "文章标题"
                                        },
                                        "allnum": {
                                            "type": "int",
                                            "example": 625,
                                            "description": "结果数"
                                        },
                                        "+author": {
                                            "type": "string",
                                            "example": "宇天行",
                                            "description": "文章作者"
                                        },
                                        "+picUrl": {
                                            "type": "string",
                                            "example": "http:\/\/zxpic.gtimg.com\/infonew\/0\/wechat_pics_-667708.jpg\/640",
                                            "description": "文章封面"
                                        },
                                        "curpage": {
                                            "type": "int",
                                            "example": 1,
                                            "description": "当前页"
                                        },
                                        "+content": {
                                            "type": "text",
                                            "example": "......",
                                            "description": "文章全文，列表中为null"
                                        },
                                        "+nickname": {
                                            "type": "string",
                                            "example": "账号昵称",
                                            "description": "天行云服务"
                                        },
                                        "+copyright": {
                                            "type": "int",
                                            "example": 0,
                                            "description": "原创标识，1为原创"
                                        },
                                        "+description": {
                                            "type": "string",
                                            "example": "新的微信主页接口增加了返回文章全文、作者名称、是否原创、公众号ID，文章ID等数据。",
                                            "description": "文章描述"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "id": 3351,
                                                "url": "https:\/\/mp.weixin.qq.com\/s\/DCcT4bcFxo80ZGz_m8PlvQ",
                                                "clct": 0,
                                                "wxid": "tianapi",
                                                "cover": 0,
                                                "ctime": "2019-01-11",
                                                "title": "天行数据微信主页接口开放全文数据",
                                                "author": "",
                                                "picUrl": "http:\/\/mmbiz.qpic.cn\/mmbiz_jpg\/eDiaGVhVBTb3vUIWDMBoq5HFxbYKs2DcsQ6ks92XqsnT6Qj7oia6BzE4Wb5PAT4V1SVMoCRc5RLIoCTSjgQx4PGw\/0?wx_fmt=jpeg",
                                                "content": null,
                                                "nickname": "天行云服务",
                                                "copyright": 0,
                                                "description": "新的微信主页接口增加了返回文章全文、作者名称、是否原创、公众号ID，文章ID等数据。另外可喜的是，天行数据官网和社区支持世界最大的“同性”交友网站GitHub快捷登录了。"
                                            },
                                            {
                                                "id": 3292,
                                                "url": "http:\/\/mp.weixin.qq.com\/s?__biz=MzA4Njg1MjkzOA==&mid=202300014&idx=1&sn=0d18e7e9c3bd83e27754b94288cefbd1&mpshare=1&scene=24&srcid=11288N86KtNljFHNXvEWNyRI#rd",
                                                "clct": 0,
                                                "wxid": "tianapi",
                                                "cover": 0,
                                                "ctime": "2014-12-30",
                                                "title": "如何利用免费云存储平台做游戏？",
                                                "author": "",
                                                "picUrl": "http:\/\/mmbiz.qpic.cn\/mmbiz\/eDiaGVhVBTb1giatEvEbiaz7cicDeLIxEcZP0X2k3XW6HxGUcg3VL7PQkMSMlvowPBtLjCI6CyxTC8BV5JOwNTtoRg\/0?wx_fmt=jpeg",
                                                "content": null,
                                                "nickname": "天行云服务",
                                                "copyright": 0,
                                                "description": "回答微社区网友“爱”的问题，他问的是“怎么把游戏放在七牛云存储上”，我把这个问题扩展一下，也顺便给大家一点帮助。"
                                            },
                                            {
                                                "id": 3284,
                                                "url": "https:\/\/mp.weixin.qq.com\/s?__biz=MzA4Njg1MjkzOA==&mid=2652098005&idx=1&sn=3b741f5883330e505fbd92026dd84aa7&chksm=842539f0b352b0e6a551dbdacd8edae7dc7ada79e83a9512ebd412403a31ac396eb1d8388dba#rd",
                                                "clct": 0,
                                                "wxid": "tianapi",
                                                "cover": 0,
                                                "ctime": "2018-04-16",
                                                "title": "天行数据个人中心全新升级",
                                                "author": "",
                                                "picUrl": "http:\/\/mmbiz.qpic.cn\/mmbiz_jpg\/eDiaGVhVBTb1tr5RvYUIJqh2MibHSySy78ozHEBNfHI74DMT0iadNicsPtYDaChuuvgibHnnmpaYTG2lZbhOibX20EBA\/0?wx_fmt=jpeg",
                                                "content": null,
                                                "nickname": "天行云服务",
                                                "copyright": 0,
                                                "description": "天行数据个人中心全新升级为控制台，界面更美观，操作更友好。同时增加了新模块，解决了旧问题，小伙伴们都说好。。。（还不了解天行数据请直接拉到文章底部）"
                                            }
                                        ],
                                        "allnum": 623,
                                        "curpage": 1
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "查询文章列表",
                "tags": [
                    "微信文章主页"
                ],
                "description": "",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "num": {
                                        "type": "int",
                                        "example": 10,
                                        "description": "返回数量"
                                    },
                                    "src": {
                                        "type": "string",
                                        "example": "txd30ffae8",
                                        "description": "指定来源为微信主页ID"
                                    },
                                    "clct": {
                                        "type": "int",
                                        "example": 1,
                                        "description": "推荐阅读"
                                    },
                                    "page": {
                                        "type": "int",
                                        "example": 1,
                                        "description": "翻页"
                                    },
                                    "rand": {
                                        "type": "int",
                                        "example": 1,
                                        "description": "随机获取"
                                    },
                                    "word": {
                                        "type": "string",
                                        "example": "天行数据",
                                        "description": "检索关键词"
                                    },
                                    "wxid": {
                                        "type": "string",
                                        "example": "tianapi",
                                        "description": "指定来源为微信公众号ID"
                                    },
                                    "cover": {
                                        "type": "int",
                                        "example": 1,
                                        "description": "封面文章"
                                    },
                                    "viewid": {
                                        "type": "int",
                                        "example": 3207,
                                        "description": "返回原文"
                                    }
                                },
                                "required": [
                                    "key",
                                    "src"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "+id": {
                                            "type": "int",
                                            "example": 3351,
                                            "description": "文章ID"
                                        },
                                        "+url": {
                                            "type": "string",
                                            "example": "http:\/\/mp.weixin.qq.com\/s?__biz=MzA3OTg2NjEwNg==",
                                            "description": "文章地址"
                                        },
                                        "list": {
                                            "type": "object[]",
                                            "description": "文章列表"
                                        },
                                        "+clct": {
                                            "type": "int",
                                            "example": 0,
                                            "description": "是否设为推荐，0=>否，1=>是"
                                        },
                                        "+wxid": {
                                            "type": "string",
                                            "example": "tianapi",
                                            "description": "微信公众号"
                                        },
                                        "+cover": {
                                            "type": "int",
                                            "example": 0,
                                            "description": "是否设为封面，0=>否，1=>是"
                                        },
                                        "+ctime": {
                                            "type": "string",
                                            "example": "2019-01-11",
                                            "description": "发布时间"
                                        },
                                        "+title": {
                                            "type": "string",
                                            "example": "天行数据微信主页接口开放全文数据",
                                            "description": "文章标题"
                                        },
                                        "allnum": {
                                            "type": "int",
                                            "example": 625,
                                            "description": "结果数"
                                        },
                                        "+author": {
                                            "type": "string",
                                            "example": "宇天行",
                                            "description": "文章作者"
                                        },
                                        "+picUrl": {
                                            "type": "string",
                                            "example": "http:\/\/zxpic.gtimg.com\/infonew\/0\/wechat_pics_-667708.jpg\/640",
                                            "description": "文章封面"
                                        },
                                        "curpage": {
                                            "type": "int",
                                            "example": 1,
                                            "description": "当前页"
                                        },
                                        "+content": {
                                            "type": "text",
                                            "example": "......",
                                            "description": "文章全文，列表中为null"
                                        },
                                        "+nickname": {
                                            "type": "string",
                                            "example": "账号昵称",
                                            "description": "天行云服务"
                                        },
                                        "+copyright": {
                                            "type": "int",
                                            "example": 0,
                                            "description": "原创标识，1为原创"
                                        },
                                        "+description": {
                                            "type": "string",
                                            "example": "新的微信主页接口增加了返回文章全文、作者名称、是否原创、公众号ID，文章ID等数据。",
                                            "description": "文章描述"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "id": 3351,
                                                "url": "https:\/\/mp.weixin.qq.com\/s\/DCcT4bcFxo80ZGz_m8PlvQ",
                                                "clct": 0,
                                                "wxid": "tianapi",
                                                "cover": 0,
                                                "ctime": "2019-01-11",
                                                "title": "天行数据微信主页接口开放全文数据",
                                                "author": "",
                                                "picUrl": "http:\/\/mmbiz.qpic.cn\/mmbiz_jpg\/eDiaGVhVBTb3vUIWDMBoq5HFxbYKs2DcsQ6ks92XqsnT6Qj7oia6BzE4Wb5PAT4V1SVMoCRc5RLIoCTSjgQx4PGw\/0?wx_fmt=jpeg",
                                                "content": null,
                                                "nickname": "天行云服务",
                                                "copyright": 0,
                                                "description": "新的微信主页接口增加了返回文章全文、作者名称、是否原创、公众号ID，文章ID等数据。另外可喜的是，天行数据官网和社区支持世界最大的“同性”交友网站GitHub快捷登录了。"
                                            },
                                            {
                                                "id": 3292,
                                                "url": "http:\/\/mp.weixin.qq.com\/s?__biz=MzA4Njg1MjkzOA==&mid=202300014&idx=1&sn=0d18e7e9c3bd83e27754b94288cefbd1&mpshare=1&scene=24&srcid=11288N86KtNljFHNXvEWNyRI#rd",
                                                "clct": 0,
                                                "wxid": "tianapi",
                                                "cover": 0,
                                                "ctime": "2014-12-30",
                                                "title": "如何利用免费云存储平台做游戏？",
                                                "author": "",
                                                "picUrl": "http:\/\/mmbiz.qpic.cn\/mmbiz\/eDiaGVhVBTb1giatEvEbiaz7cicDeLIxEcZP0X2k3XW6HxGUcg3VL7PQkMSMlvowPBtLjCI6CyxTC8BV5JOwNTtoRg\/0?wx_fmt=jpeg",
                                                "content": null,
                                                "nickname": "天行云服务",
                                                "copyright": 0,
                                                "description": "回答微社区网友“爱”的问题，他问的是“怎么把游戏放在七牛云存储上”，我把这个问题扩展一下，也顺便给大家一点帮助。"
                                            },
                                            {
                                                "id": 3284,
                                                "url": "https:\/\/mp.weixin.qq.com\/s?__biz=MzA4Njg1MjkzOA==&mid=2652098005&idx=1&sn=3b741f5883330e505fbd92026dd84aa7&chksm=842539f0b352b0e6a551dbdacd8edae7dc7ada79e83a9512ebd412403a31ac396eb1d8388dba#rd",
                                                "clct": 0,
                                                "wxid": "tianapi",
                                                "cover": 0,
                                                "ctime": "2018-04-16",
                                                "title": "天行数据个人中心全新升级",
                                                "author": "",
                                                "picUrl": "http:\/\/mmbiz.qpic.cn\/mmbiz_jpg\/eDiaGVhVBTb1tr5RvYUIJqh2MibHSySy78ozHEBNfHI74DMT0iadNicsPtYDaChuuvgibHnnmpaYTG2lZbhOibX20EBA\/0?wx_fmt=jpeg",
                                                "content": null,
                                                "nickname": "天行云服务",
                                                "copyright": 0,
                                                "description": "天行数据个人中心全新升级为控制台，界面更美观，操作更友好。同时增加了新模块，解决了旧问题，小伙伴们都说好。。。（还不了解天行数据请直接拉到文章底部）"
                                            }
                                        ],
                                        "allnum": 623,
                                        "curpage": 1
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}