社区首页相关接口.md 12.9 KB

1、获取首页的版块轮播信息

获取首页的版块轮播信息(method=app.social.getForumCarouselInfo)

公共请求参数

参数名称 参数类型 长度 可否为空 示例 默认值 备注
client_secret string 50 5ac68f20cb18efe154be 进入接口提供的参数加密信息
app_version float 10 1 APP版本
os_version string 20 Android4.4 系统版本+机器型号
client_type string 20 iphone/android/ipad 手机型号(不区分大小写)
screen_size string 20 800x900 (手机尺寸)

请求参数

注意,通用的头部没有列出。
请求示例 http://192.168.102.205:8080/gateway?method=app.social.getForumCarouselInfo

响应

code为200即为成功,否则是失败。 响应JSON格式如下所示:

{
    "alg": "SALT_MD5",
    "code": 200,
    "data": [
    {
        "forumCode": 10001,
        "forumName": "版块1",
        "forumPic": "http://img12.static.yhbimg.com/goodsimg/2016/06/06/05/02e8b4a63c0101b1a1a8f04b53d817b9d4.png",
        "forumDesc": "版块1的说明",
        "orderBy": 1,
        "postsNum": 1,
        "commentsNum": 1,
        "praiseNum": 10,
        "oneDayAddNum": 0,
        "hotPost": null,
        "newPost": null
    },
    {
        "forumCode": 10002,
        "forumName": "版块2",
        "forumPic": "http://img12.static.yhbimg.com/goodsimg/2016/06/06/05/02e8b4a63c0101b1a1a8f04b53d817b9d4.png",
        "forumDesc": "版块2的说明",
        "orderBy": 1,
        "postsNum": 3,
        "commentsNum": 6,
        "praiseNum": 8,
        "oneDayAddNum": 3,
        "hotPost": null,
        "newPost": {
            "postId": 62,
            "authorId": 2222222,
            "postsTitle": "",
            "contentData": "啊啊啊啊啊啊SDDDDDDDD啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊哈哈哈哈哈哈哈哈啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊",
            "authorHeadIcon": "http://img10.static.yhbimg.com/yhb-img01/2016/06/28/17/01b4ab5ad41e5b2d1106915828f41c4bc6.jpg",
            "hasImgFlg": "N"
        }
    },
    {
        "forumCode": 10003,
        "forumName": "版块3",
        "forumPic": "http://img12.static.yhbimg.com/goodsimg/2016/06/06/05/02e8b4a63c0101b1a1a8f04b53d817b9d4.png",
        "forumDesc": "版块3的说明",
        "orderBy": 1,
        "postsNum": 0,
        "commentsNum": 0,
        "praiseNum": 1,
        "oneDayAddNum": 0,
        "hotPost": null,
        "newPost": null
    },
    {
        "forumCode": 10004,
        "forumName": "版块4",
        "forumPic": "http://img12.static.yhbimg.com/goodsimg/2016/06/06/05/02e8b4a63c0101b1a1a8f04b53d817b9d4.png",
        "forumDesc": "版块4的说明",
        "orderBy": 1,
        "postsNum": 5,
        "commentsNum": 4,
        "praiseNum": 0,
        "oneDayAddNum": 5,
        "hotPost": {
            "postId": 72,
            "authorId": 4444,
            "postsTitle": "",
            "contentData": "啊啊啊啊啊啊SDDDDDDDD啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊哈哈哈",
            "authorHeadIcon": "",
            "hasImgFlg": "Y"
        },
        "newPost": {
            "postId": 78,
            "authorId": 10002,
            "postsTitle": "",
            "contentData": "啊啊啊啊啊啊SDDDDDDDD啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊哈哈哈",
            "authorHeadIcon": "",
            "hasImgFlg": "Y"
        }
    }
],
    "md5": "0110f87c742a00c7ffc2f65eab559482",
    "message": "社区首页版块成功."
}

2、社区首页最热帖子列表

社区首页最热帖子列表(method=app.social.getHomePagePostList)

公共请求参数

参数名称 参数类型 长度 可否为空 示例 默认值 备注
client_secret string 50 5ac68f20cb18efe154be 进入接口提供的参数加密信息
app_version float 10 1 APP版本
os_version string 20 Android4.4 系统版本+机器型号
client_type string 20 iphone/android/ipad 手机型号(不区分大小写)
screen_size string 20 800x900 (手机尺寸)

请求参数

参数名称 参数类型 可否为空 示例 默认值 备注
authorId String 32423 0 作者id
lastedTime int 1467343834 0 时间戳
limit int 5 10 每页多少条

注意,通用的头部没有列出。
请求示例 http://192.168.102.205:8080/gateway/?method=app.social.getHomePagePostList&authorId=2222222&lastedTime=1467343834&limit=2&debug=XYZ

响应

code为200即为成功,否则是失败。 响应JSON格式如下所示:

{
    "alg": "SALT_MD5",
    "code": 200,
    "data": {
        "list": [
            {
                "isIndexTop": 1,
                "blocks": [
                    {
                        "contentData": "啊啊啊啊啊啊SDDDDDDDD啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊哈哈哈",
                        "templateKey": "text",
                        "order": 1
                    },
                    {
                        "contentData": "http://img12.static.yhbimg.com/goodsimg/2016/06/06/05/02e8b4a63c0101b1a1a8f04b53d817b9d4.png",
                        "templateKey": "image",
                        "order": 2
                    },
                    {
                        "contentData": "http://img12.static.yhbimg.com/goodsimg/2016/06/06/05/02e8b4a63c0101b1a1a8f04b53d817b9d5.png",
                        "templateKey": "image",
                        "order": 3
                    }
                ],
                "updateTime": 0,
                "praise": 0,
                "revieweTime": 0,
                "isForumTop": 1,
                "createTime": 1467116718,
                "forumCode": 10004,
                "comment": 1,
                "id": 78,
                "revieweState": 0,
                "isHot": 1,
                "browse": 0,
                "status": 0
            },
            {
                "isIndexTop": 0,
                "blocks": [
                    {
                        "contentData": "啊啊啊啊啊啊SDDDDDDDD啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊哈哈哈",
                        "templateKey": "text",
                        "order": 1
                    },
                    {
                        "contentData": "http://img12.static.yhbimg.com/goodsimg/2016/06/06/05/02e8b4a63c0101b1a1a8f04b53d817b9d4.png",
                        "templateKey": "image",
                        "order": 2
                    },
                    {
                        "contentData": "http://img12.static.yhbimg.com/goodsimg/2016/06/06/05/02e8b4a63c0101b1a1a8f04b53d817b9d5.png",
                        "templateKey": "image",
                        "order": 3
                    }
                ],
                "updateTime": 0,
                "praise": 0,
                "revieweTime": 0,
                "isForumTop": 0,
                "createTime": 1467116713,
                "forumCode": 10004,
                "comment": 1,
                "id": 76,
                "revieweState": 0,
                "isHot": 1,
                "browse": 0,
                "status": 0
            },
            {
                "isIndexTop": 0,
                "blocks": [
                    {
                        "contentData": "啊啊啊啊啊啊SDDDDDDDD啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊哈哈哈",
                        "templateKey": "text",
                        "order": 1
                    },
                    {
                        "contentData": "http://img12.static.yhbimg.com/goodsimg/2016/06/06/05/02e8b4a63c0101b1a1a8f04b53d817b9d4.png",
                        "templateKey": "image",
                        "order": 2
                    },
                    {
                        "contentData": "http://img12.static.yhbimg.com/goodsimg/2016/06/06/05/02e8b4a63c0101b1a1a8f04b53d817b9d5.png",
                        "templateKey": "image",
                        "order": 3
                    }
                ],
                "updateTime": 0,
                "praise": 0,
                "revieweTime": 0,
                "isForumTop": 0,
                "createTime": 1467116660,
                "forumCode": 10004,
                "comment": 1,
                "id": 74,
                "revieweState": 0,
                "isHot": 1,
                "browse": 0,
                "status": 0
            },
            {
                "isIndexTop": 0,
                "blocks": [
                    {
                        "contentData": "啊啊啊啊啊啊SDDDDDDDD啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊哈哈哈",
                        "templateKey": "text",
                        "order": 1
                    },
                    {
                        "contentData": "http://img12.static.yhbimg.com/goodsimg/2016/06/06/05/02e8b4a63c0101b1a1a8f04b53d817b9d4.png",
                        "templateKey": "image",
                        "order": 2
                    },
                    {
                        "contentData": "http://img12.static.yhbimg.com/goodsimg/2016/06/06/05/02e8b4a63c0101b1a1a8f04b53d817b9d5.png",
                        "templateKey": "image",
                        "order": 3
                    }
                ],
                "updateTime": 0,
                "praise": 0,
                "revieweTime": 0,
                "isForumTop": 0,
                "createTime": 1467116650,
                "forumCode": 10004,
                "comment": 1,
                "id": 72,
                "revieweState": 0,
                "isHot": 1,
                "browse": 0,
                "status": 0
            },
            {
                "isIndexTop": 0,
                "blocks": [
                    {
                        "contentData": "http://img12.static.yhbimg.com/goodsimg/2016/06/06/05/02e8b4a63c0101b1a1a8f04b53d817b9d4.png",
                        "templateKey": "image",
                        "order": 1
                    },
                    {
                        "contentData": "http://img12.static.yhbimg.com/goodsimg/2016/06/06/05/02e8b4a63c0101b1a1a8f04b53d817b9d5.png",
                        "templateKey": "image",
                        "order": 2
                    }
                ],
                "updateTime": 0,
                "praise": 0,
                "revieweTime": 0,
                "isForumTop": 0,
                "createTime": 1467116556,
                "forumCode": 10004,
                "comment": 1,
                "id": 70,
                "revieweState": 0,
                "isHot": 1,
                "browse": 0,
                "status": 0
            },
            {
                "isIndexTop": 1,
                "blocks": [
                    {
                        "contentData": "http://img12.static.yhbimg.com/goodsimg/2016/06/06/05/02e8b4a63c0101b1a1a8f04b53d817b9d4.png",
                        "templateKey": "image",
                        "order": 1
                    },
                    {
                        "contentData": "http://img12.static.yhbimg.com/goodsimg/2016/06/06/05/02e8b4a63c0101b1a1a8f04b53d817b9d5.png",
                        "templateKey": "image",
                        "order": 2
                    }
                ],
                "updateTime": 0,
                "praise": 0,
                "revieweTime": 0,
                "isForumTop": 0,
                "createTime": 1467116548,
                "forumCode": 10001,
                "comment": 0,
                "id": 68,
                "revieweState": 0,
                "isHot": 0,
                "browse": 0,
                "status": 0
            }
        ],
        "pageSize": 10,
        "total": 6
    },
    "md5": "915fceb9999f3206b202dbc2eae96f78",
    "message": "社区最热帖子列表"
}
{
    "message": "用户ID不能为空",
    "code": 401
}