社区首页相关接口.md
11.4 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 | (手机尺寸) |
请求参数
参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
---|---|---|---|---|---|
appType | String | 是 | 1 | 1:有货APP,2:YOHO! | |
clientType | String | 是 | H5 | 客户端类型 |
注意,通用的头部没有列出。
请求示例
http://192.168.102.205:8095/social?method=app.social.getForumCarouselInfo
响应
code为200即为成功,否则是失败。 响应JSON格式如下所示:
{
"code": 200,
"message": "社区首页版块成功.",
"md5": "ba37e0e08616d1e7a8de1e40d4cc6540",
"alg": "SALT_MD5",
"data": {
"forumInfo": [
{
"forumCode": 10004,
"forumName": "SHOW",
"forumPic": "http://img03.res.yohoshow.com/headimg/2014/08/11/08/01ff9975fd0998afe1596d8d65cb13b959.jpg",
"forumDesc": "这是版块4的简介",
"orderBy": 0,
"postsNum": 19,
"commentsNum": 2,
"praiseNum": 54,
"oneDayAddNum": 6,
"hotPost": null,
"newPost": {
"postId": 488,
"postsTitle": "123",
"contentData": "456",
"user": {
"nickName": "倦意浓",
"headIcon": "http://img01.res.yohoshow.com/headimg/2014/01/11/18/01938e5c3142504ac8c73d576432ac796d.jpg",
"uid": 18108371,
"signature": null,
"bgPic":"http://img03.res.yohoshow.com/headimg/2014/08/11/08/01701f83b911bc874fb9435d311db0aaf2.jpg"
},
"hasImgFlg": "Y"
}
},
{
"forumCode": 10001,
"forumName": "复古市集会",
"forumPic": "http://img03.res.yohoshow.com/headimg/2014/08/11/08/017140b215ec8b11bfe8001beee9042899.jpg",
"forumDesc": "这是版块1的简介",
"orderBy": 1,
"postsNum": 30,
"commentsNum": 5,
"praiseNum": 50,
"oneDayAddNum": 13,
"hotPost": {
"postId": 512,
"postsTitle": "%E4%BD%A0%E6%82%A8%E5%92%AF%E5%92%AF%E5%92%AF",
"contentData": "%E4%BD%A0%E6%82%A8%E5%8F%AF%E4%BA%86%E8%82%AF%E4%BA%86%F0%9F%98%9B%F0%9F%98%A3%F0%9F%98%A26455646",
"user": {
"nickName": "冈仁波奇",
"headIcon": "http://img02.res.yohoshow.com/headimg/2014/01/11/18/02b587455b0537e403ab93608f1d354131.jpg",
"uid": 18148711,
"signature": null,
"bgPic":"http://img03.res.yohoshow.com/headimg/2014/08/11/08/01701f83b911bc874fb9435d311db0aaf2.jpg"
},
"hasImgFlg": "Y"
},
"newPost": {
"postId": 514,
"postsTitle": "",
"contentData": "阿瑟测试",
"user": {
"nickName": "Nichola",
"headIcon": "http://img02.res.yohoshow.com/headimg/2014/01/11/18/02725f4a8ada8daa31f6be94cdeda11c2d.jpg",
"uid": 20000068,
"signature": null,
"bgPic":"http://img03.res.yohoshow.com/headimg/2014/08/11/08/01701f83b911bc874fb9435d311db0aaf2.jpg"
},
"hasImgFlg": "Y"
}
},
{
"forumCode": 10002,
"forumName": "SNEAKER",
"forumPic": "http://img03.res.yohoshow.com/headimg/2014/08/11/08/017187b41db085fe8cbf490dc40096c7f5.jpg",
"forumDesc": "这是版块2的简介",
"orderBy": 2,
"postsNum": 11,
"commentsNum": 39,
"praiseNum": 42,
"oneDayAddNum": 35,
"hotPost": {
"postId": 816,
"postsTitle": "Haode",
"contentData": "Yyyyyyyyyyyyyyu",
"user": {
"nickName": null,
"headIcon": null,
"uid": 18148719,
"signature": null,
"bgPic":"http://img03.res.yohoshow.com/headimg/2014/08/11/08/01701f83b911bc874fb9435d311db0aaf2.jpg"
},
"hasImgFlg": "Y"
},
"newPost": {
"postId": 300,
"postsTitle": "",
"contentData": "",
"user": {
"nickName": "棉花也是花",
"headIcon": "http://img03.res.yohoshow.com/headimg/2014/08/11/08/01701f83b911bc874fb9435d311db0aaf2.jpg",
"uid": 8657461,
"signature": "这是一个无关紧要的签名",
"bgPic":"http://img03.res.yohoshow.com/headimg/2014/08/11/08/01701f83b911bc874fb9435d311db0aaf2.jpg"
},
"hasImgFlg": "Y"
}
},
{
"forumCode": 10003,
"forumName": "YOHO",
"forumPic": "http://img03.res.yohoshow.com/headimg/2014/08/11/08/01dddad6ce2295dd18d117dba99816266a.jpg",
"forumDesc": "这是版块3的简介",
"orderBy": 3,
"postsNum": 7,
"commentsNum": 0,
"praiseNum": 0,
"oneDayAddNum": 1,
"hotPost": {
"postId": 822,
"postsTitle": "",
"contentData": "You'd%20usurer%0A",
"user": {
"nickName": null,
"headIcon": null,
"uid": 9701721,
"signature": null,
"bgPic":"http://img03.res.yohoshow.com/headimg/2014/08/11/08/01701f83b911bc874fb9435d311db0aaf2.jpg"
},
"hasImgFlg": "Y"
},
"newPost": {
"postId": 828,
"postsTitle": "aa",
"contentData": "aaaa+%0A1",
"user": {
"nickName": "冈仁波奇",
"headIcon": "http://img02.res.yohoshow.com/headimg/2014/01/11/18/02b587455b0537e403ab93608f1d354131.jpg",
"uid": 18148711,
"signature": null,
"bgPic":"http://img03.res.yohoshow.com/headimg/2014/08/11/08/01701f83b911bc874fb9435d311db0aaf2.jpg"
},
"hasImgFlg": "N"
}
}
],
"resourceList": {
"advertList": [
{
"bgColor": "",
"src": "http://img11.static.yhbimg.com/yhb-img01/2016/07/19/17/01ebe06914f83d8a4c180b03d109d779d4.jpg?imageView2/{mode}/w/{width}/h/{height}",
"title": "机能穿衣舒适又加分",
"url": "http://feature.yoho.cn/0408APPSEASON/index.html?title=机能穿衣舒适又加分&share_id=916"
},
{
"bgColor": "",
"src": "http://img11.static.yhbimg.com/yhb-img01/2016/07/19/17/01fd90d948b8f770f5860555c4c2a82912.jpg?imageView2/{mode}/w/{width}/h/{height}",
"title": "潮流清单",
"url": "http://feature.yohobuy.com/0/0/896/index.html?title=潮流清单&share_id=918"
}
],
"textNoticeList": {
"open": "Y",
"time": "3",
"list": [
{
"title": "这是社区首页的文字公告",
"url": "http://url.cn"
}
]
}
}
}
}
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 | (手机尺寸) |
请求参数
参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
---|---|---|---|---|---|
uid | String | 是 | 32423 | 0 | 作者id |
lastedTime | String | 是 | 1467116660000 | 0 | 时间戳:前一次返回数据的中的lastedTime |
limit | String | 是 | 5 | 10 | 每页多少条 |
注意,通用的头部没有列出。
请求示例
http://192.168.102.205:8095/social/?method=app.social.getHomePagePostList&uid=2222222&lastedTime=1467116660000&limit=2&debug=XYZ
响应
code为200即为成功,否则是失败。 响应JSON格式如下所示:
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"lastedTime": 1467116660000,
"list": [
{
"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,
"forumName": "YOHO",
"createTime": 1467116713000,
"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,
"forumName": "YOHO",
"createTime": 1467116660000,
"forumCode": 10004,
"comment": 1,
"id": 74,
"revieweState": 0,
"isHot": 1,
"browse": 0,
"status": 0
}
],
"pageSize": 2,
"total": 10
},
"md5": "02ea425ddba4ba534b5fdca266f6c4a2",
"message": "社区最热帖子列表"
}
{
"message": "用户ID不能为空",
"code": 401
}