wiki:bestbuy

Version 22 (modified by zhangguangwen, 10 years ago) (diff)

--

批量查询爆料点赞、踩、收藏数、评论数

线上: http://best.pconline.com.cn/action/topic/getTopics.jsp

说明

根据爆料ID出爆料点赞、踩、收藏数、评论数,批量查询

提交方式

post

是否需要登录

false

缓存方式

缓存时间

参数

参数名 参数含义 类型 默认值 是否必须
ids爆料id,已英文逗号隔开string""

返回

result {
    "data":[
        {
            "badCount":1,//踩次数
            "commentCount":0,//评论数
            "favoriteCount":1,//收藏数
            "goodCount":7,//点赞数
            "topicId":2//爆料id
        },
        {
            "badCount":5,
            "commentCount":0,
            "favoriteCount":0,
            "goodCount":4,
            "topicId":11
        },
        {
            "badCount":0,
            "commentCount":0,
            "favoriteCount":0,
            "goodCount":4,
            "topicId":22
        }
    ],
    "msg":"success", 
    "status":1
}

返回状态

status msg 说明
1success请求成功
0null结果为空
-1parameter error参数错误

收藏接口

线上: http://best.pconline.com.cn/action/collect/collect.jsp

说明

收藏接口,支持跨域,限制每个用户1秒内请求一次

提交方式

post

是否需要登录

true

缓存方式

缓存时间

参数

参数名 参数含义 类型 默认值 是否必须
topicId爆料idstring""
num原有收藏数string""
isCollect/收藏或取消收藏 0取消收藏 1收藏string""

返回

result {
    "count":1,//收藏数
    "status":1
}

返回状态

status desc 说明
1已收藏1收藏成功
2 收藏不成功
3 爆料不存在
4 取消收藏成功
0正在收藏,请稍候!已收藏不能再收藏
-1 未登录

点赞点踩接口

线上: http://best.pconline.com.cn/action/topic/like_and_dislike.jsp

说明

点赞点踩接口,支持跨域

提交方式

post

是否需要登录

true

缓存方式

缓存时间

参数

参数名 参数含义 类型 默认值 是否必须
topicId爆料idstring""
num原有收藏数string""
operate 0 赞 1 踩string""

返回

result {
    "code":1,
    "desc":"投票成功"
}

返回状态

code desc
1已收藏
0亲,您已经投过票了!
-1投票失败!
-2参数不对!
-3爆料不存在!
error不合法的请求方式!

加金币加积分接口

线上: http://best.pconline.com.cn/intf/addGoldAndScore.jsp

说明

点赞点踩接口,支持跨域

提交方式

post

是否需要登录

true

缓存方式

缓存时间

参数

参数名 参数含义 类型 默认值 是否必须
gold金币int""
score原有收藏数int""
userid 用户idlong""

返回

result {
    "status":1,
    "msg":"添加成功"
}

返回状态

status msg 说明
1添加成功添加成功
0未找到该用户:+userid 未找到该用户
-1你当前的ip:+ip地址+没有权限访问 非百科,没有权限访问
-2请求方式错误 请求方式错误