社区首页相关接口.md
21.7 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、社区首页最热帖子列表(增加了size字段)
社区首页最热帖子列表(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=0&limit=2&debug=XYZ
响应
code为200即为成功,否则是失败。 响应JSON格式如下所示:
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"lastedTime": 1516176688370,
"list": [
{
"authorInfo": {
"bgPic": "",
"uid": 123
},
"blocks": [
{
"contentData": "123123",
"order": 1,
"postsId": 108822,
"templateKey": "text"
},
{
"contentData": "http://img11.static.yhbimg.com/yhb-img01/2017/02/04/18/01385744720200ad56364517345c2cfab1.jpg?imageMogr2/auto-orient/thumbnail/!{width}x{height}r",
"order": 2,
"postsId": 108822,
"size": "1024x768",
"templateKey": "image"
},
{
"contentData": "http://img11.static.yhbimg.com/yhb-img01/2017/02/04/18/0152bd635f35f862aafabb39058e6f85b5.jpg?imageMogr2/auto-orient/thumbnail/!{width}x{height}r",
"order": 3,
"postsId": 108822,
"size": "1024x768",
"templateKey": "image"
}
],
"browse": 0,
"comment": 2,
"createTime": 1486203158096,
"forumCode": 10002,
"forumName": "聚焦潮鞋",
"hasPraise": "N",
"id": 108822,
"indexTopTime": 1517988262626,
"isForumTop": 0,
"isHot": 0,
"isIndexTop": 1,
"postsTitle": "123123",
"praise": 3,
"revieweState": 0,
"revieweTime": 0,
"status": 0,
"updateTime": 1486740421615,
"voteInfo": {
"counts": 737,
"deadline": 8,
"hasVoted": "N",
"optionImages": [
"http://img11.static.yhbimg.com/yhb-img01/2017/02/10/16/01e864e6c15ac6aeb8e574aacff1b6a977.jpg?imageView/{mode}/w/{width}/h/{height}",
"http://img10.static.yhbimg.com/yhb-img01/2017/02/09/15/01218a391757ea5891f4a0639f9d61b28d.jpg?imageView/{mode}/w/{width}/h/{height}",
"http://img11.static.yhbimg.com/yhb-img01/2017/02/09/16/01e3622231e41556c36c7bc329d314f63c.jpg?imageView/{mode}/w/{width}/h/{height}",
"http://img10.static.yhbimg.com/yhb-img01/2017/02/07/10/015108d93ca9015af898471e40734544a7.jpg?imageView/{mode}/w/{width}/h/{height}"
],
"type": 2
}
},
{
"authorInfo": {
"bgPic": "",
"uid": 21191634
},
"blocks": [
{
"contentData": "吃吧",
"order": 1,
"postsId": 4508,
"templateKey": "text"
}
],
"browse": 0,
"comment": 4,
"createTime": 1484640367689,
"forumCode": 10001,
"forumName": "潮流风向",
"hasPraise": "N",
"id": 4508,
"indexTopTime": 1516176688370,
"isForumTop": 0,
"isHot": 0,
"isIndexTop": 1,
"postsTitle": "我去?",
"praise": 9,
"revieweState": 0,
"revieweTime": 0,
"status": 0,
"updateTime": 1484816373516,
"voteInfo": {
"counts": 0,
"deadline": 11,
"hasVoted": "N",
"optionImages": [
"http://img10.static.yhbimg.com/yhb-img01/2017/02/09/15/0148ebc1884367bf388a800bc842b339e0.jpg?imageView/{mode}/w/{width}/h/{height}",
"http://img11.static.yhbimg.com/yhb-img01/2017/02/09/15/01bbae6e224c5b0018cd4d75c77e53f875.jpg?imageView/{mode}/w/{width}/h/{height}"
],
"type": 1
}
}
],
"pageSize": 2,
"total": 69
},
"md5": "a2c89f37e985b7e98399a21a8914b7e9",
"message": "社区最热帖子列表"
}
{
"message": "用户ID不能为空",
"code": 401
}
3、获取首页的版块轮播信息(新接口,V5.2以后使用)
获取首页的版块轮播信息(method=app.social.getNewForumCarouselInfo
公共请求参数
参数名称 | 参数类型 | 长度 | 可否为空 | 示例 | 默认值 | 备注 |
---|---|---|---|---|---|---|
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.getNewForumCarouselInfo
响应
code为200即为成功,否则是失败。 响应JSON格式如下所示:
{
"alg": "SALT_MD5",
"code": 200,
"data":
{
"forumInfo":
[
{
"blocks":
[
{
"contentData": "http://img10.static.yhbimg.com/yhb-img01/2016/12/12/20/01acd72baa1317cfdebdb1c338b3979396.jpg?imageView/{mode}/w/{width}/h/{height}",
"order": 2,
"postsId": 4210,
"size": "750x750",
"templateKey": "image"
},
{
"contentData": "http://img11.static.yhbimg.com/yhb-img01/2016/12/12/20/0125c85591f960842459742f02d3a24632.jpg?imageView/{mode}/w/{width}/h/{height}",
"order": 3,
"postsId": 4210,
"size": "1024x1024",
"templateKey": "image"
},
{
"contentData": "http://img10.static.yhbimg.com/social/2016/11/30/17/0174d2dfc78a2ac5d217fa5ecbc9f601e4.jpg?imageView/{mode}/w/{width}/h/{height}",
"order": 2,
"postsId": 4172,
"size": "4128x2322",
"templateKey": "image"
}
],
"commentsNum": 595,
"forumCode": 10001,
"forumDesc": "潮流新鲜事24时讲不停!",
"forumName": "潮流风向",
"forumPic": "http://img10.static.yhbimg.com/yhb-img01/2016/08/18/14/0176d79b939810951e47738818f508d33d.jpg",
"notice": false,
"noticeTitile": ""这是社区版块1的文字公告"",
"oneDayAddNum": 12,
"orderBy": 1,
"postsNum": 184,
"praiseNum": 1242
},
{
"blocks":
[
{
"contentData": "http://img11.static.yhbimg.com/social/2016/12/14/14/0112bf652b3924ea8bee3f36e84dff9b88.png?imageView/{mode}/w/{width}/h/{height}",
"order": 1,
"postsId": 4282,
"size": "750x1334",
"templateKey": "image"
},
{
"contentData": "http://img12.static.yhbimg.com/social/2016/08/16/15/02a8d08f743a6c2e915a684c1272e39ef7.jpg?imageView/{mode}/w/{width}/h/{height}",
"order": 1,
"postsId": 3478,
"size": "818x818",
"templateKey": "image"
},
{
"contentData": "http://img13.static.yhbimg.com/social/2016/08/19/13/021eb209286fd4eb7cd38d2a4bd0213c3f.jpg?imageView/{mode}/w/{width}/h/{height}",
"order": 2,
"postsId": 3478,
"size": "440x440",
"templateKey": "image"
}
],
"commentsNum": 214,
"forumCode": 10002,
"forumDesc": "直击!最IN球鞋限时放送!",
"forumName": "聚焦潮鞋",
"forumPic": "http://img10.static.yhbimg.com/yhb-img01/2016/08/18/14/014b2ea5d16908114f4e170b30f2f6fd3c.jpg",
"notice": false,
"noticeTitile": "这会第一个标题",
"oneDayAddNum": 18,
"orderBy": 2,
"postsNum": 90,
"praiseNum": 754
},
{
"blocks":
[
{
"contentData": "http://img10.static.yhbimg.com/social/2016/07/23/19/01fd57b626e115aae21a78b1e55f8eef65.jpg?imageView/{mode}/w/{width}/h/{height}",
"order": 2,
"postsId": 1034,
"size": "2988x5312",
"templateKey": "image"
},
{
"contentData": "http://img11.static.yhbimg.com/social/2016/07/23/19/01c3b0e62373d263fe657c2b502b8001a1.jpg?imageView/{mode}/w/{width}/h/{height}",
"order": 3,
"postsId": 834,
"size": "2988x5312",
"templateKey": "image"
},
{
"contentData": "http://img10.static.yhbimg.com/social/2016/07/23/19/0152d88210e2a562ac32ed792487424551.jpg?imageView/{mode}/w/{width}/h/{height}",
"order": 4,
"postsId": 834,
"size": "1520x443",
"templateKey": "image"
}
],
"commentsNum": 108,
"forumCode": 10003,
"forumDesc": "分享爱物,好品味集结地",
"forumName": "爱享潮物",
"forumPic": "http://img10.static.yhbimg.com/yhb-img01/2016/08/18/14/018df45aa8dc379fc728541a611fc035bf.jpg",
"notice": false,
"noticeTitile": ""这是社区版块3的文字公告"",
"oneDayAddNum": 4,
"orderBy": 3,
"postsNum": 66,
"praiseNum": 370
},
{
"blocks":
[
{
"contentData": "http://img11.static.yhbimg.com/sns/2016/09/30/16/0190ba618c0986718aa70355a3f270c8f7.jpg?imageView/{mode}/w/{width}/h/{height}",
"order": 2,
"postsId": 4020,
"templateKey": "image"
},
{
"contentData": "http://img11.static.yhbimg.com/sns/2016/09/30/16/01059b5cea615e5c1d7440ece46b8dc307.jpg?imageView/{mode}/w/{width}/h/{height}",
"order": 2,
"postsId": 4016,
"templateKey": "image"
},
{
"contentData": "http://img12.static.yhbimg.com/sns/2016/08/31/20/025982449e8e6016f4d0dc282539be4169.jpg?imageView/{mode}/w/{width}/h/{height}",
"order": 2,
"postsId": 3992,
"templateKey": "image"
}
],
"commentsNum": 314,
"forumCode": 10004,
"forumDesc": "你与达人只差一张自拍",
"forumName": "潮人自曝",
"forumPic": "http://img10.static.yhbimg.com/yhb-img01/2016/08/18/14/0181735155c91a728392a3fc24ba64b86d.jpg",
"notice": false,
"noticeTitile": "有货晒单分享",
"oneDayAddNum": 1,
"orderBy": 4,
"postsNum": 80,
"praiseNum": 830
}
],
"resourceList":
{
"textNoticeList":
{
"list":
[
],
"open": "N",
"time": "3"
}
}
},
"md5": "73adc67977740f3325b419022da60977",
"message": "社区首页版块成功."
}