社区首页相关接口.md
9.35 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": [
{
"forumName": "永恒的潮流",
"forumDesc": "",
"orderBy": 0,
"praiseNum": 10,
"newPost": {
"postsTitle": "解决了",
"contentData": "兔子窝",
"hasImgFlg": "N",
"postId": 84,
"user": {
"headIcon": "http://img10.static.yhbimg.com/yhb-img01/2016/06/28/17/01b4ab5ad41e5b2d1106915828f41c4bc6.jpg",
"uid": 8050826,
"name": "叶子"
}
},
"forumCode": 10001,
"oneDayAddNum": 0,
"commentsNum": 1,
"forumPic": "",
"postsNum": 2
},
{
"forumName": "复古市集会",
"forumDesc": "",
"orderBy": 0,
"praiseNum": 8,
"newPost": {
"postsTitle": "",
"contentData": "啊啊啊啊啊啊SDDDDDDDD啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊哈哈哈哈哈哈哈哈啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊",
"hasImgFlg": "N",
"postId": 62,
"user": {
"headIcon": "http://img10.static.yhbimg.com/yhb-img01/2016/06/28/17/01b4ab5ad41e5b2d1106915828f41c4bc6.jpg",
"uid": 2222222,
"signature": "你若安你若安好,便是晴天===============",
"name": "MayDay_1988"
}
},
"forumCode": 10002,
"oneDayAddNum": 0,
"commentsNum": 6,
"forumPic": "",
"postsNum": 3
},
{
"forumName": "SNEAKER",
"forumDesc": "",
"orderBy": 0,
"praiseNum": 1,
"forumCode": 10003,
"oneDayAddNum": 0,
"commentsNum": 0,
"forumPic": "",
"postsNum": 0
},
{
"forumName": "YOHO",
"forumDesc": "",
"hotPost": {
"postsTitle": "",
"contentData": "啊啊啊啊啊啊SDDDDDDDD啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊哈哈哈",
"hasImgFlg": "Y",
"postId": 72
},
"orderBy": 0,
"praiseNum": 0,
"newPost": {
"postsTitle": "",
"contentData": "啊啊啊啊啊啊SDDDDDDDD啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊哈哈哈",
"hasImgFlg": "Y",
"postId": 78
},
"forumCode": 10004,
"oneDayAddNum": 0,
"commentsNum": 4,
"forumPic": "",
"postsNum": 5
},
{
"forumName": "YOHOBUY",
"forumDesc": "",
"orderBy": 0,
"praiseNum": 0,
"forumCode": 10005,
"oneDayAddNum": 0,
"commentsNum": 0,
"forumPic": "",
"postsNum": 0
},
{
"forumName": "MARS",
"forumDesc": "",
"orderBy": 0,
"praiseNum": 0,
"forumCode": 10006,
"oneDayAddNum": 0,
"commentsNum": 0,
"forumPic": "",
"postsNum": 0
},
{
"forumName": "SHOW",
"forumDesc": "",
"orderBy": 0,
"praiseNum": 0,
"forumCode": 10007,
"oneDayAddNum": 0,
"commentsNum": 0,
"forumPic": "",
"postsNum": 0
}
],
"md5": "a8285a086d14559708a2b966332dc324",
"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 | String | 是 | 1467116660000 | 0 | 时间戳:前一次返回数据的中的lastedTime |
limit | String | 是 | 5 | 10 | 每页多少条 |
注意,通用的头部没有列出。
请求示例
http://192.168.102.205:8080/gateway/?method=app.social.getHomePagePostList&authorId=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
}