我们在《剑鱼论坛怎么通过API发跟帖》一文里面介绍了使用API发布跟帖内容,又在《剑鱼论坛怎么使用API修改跟帖内容》一文里面介绍了怎么用API来修改跟帖内容。这一篇,我们进一步来介绍怎么给已经发布的跟帖点赞。
请求方式:PATCH
请求地址:http://域名/api
是否需要鉴权信息:需要
请求数据:
{
"data": [
{
"type": "discuss",
"id": "1",
"attributes": {
"method": "like"
}
}
]
}
上面代码里面的id是跟帖的id号。
返回数据:
{
"data": [
{
"type": "discuss",
"id": "1",
"attributes": {
"result": "ok"
}
}
]
}
点赞成功后会返回上面所示的信息,表示已经成功点赞。如果失败会返回errors错误信息。
论坛主帖
236
论坛跟帖
250
在线访客
0
今日主帖
0
今日跟帖
0
今日注册
0
283
http://jianyuluntan.com/gentie.html
http://jianyuluntan.com/postzan.html
http://jianyuluntan.com/postcai.html
http://jianyuluntan.com/postshoucang.html
http://jianyuluntan.com/gentiezan.html
http://jianyuluntan.com/gentiecai.html
http://jianyuluntan.com/huifu.html
http://jianyuluntan.com/xiugai.html
http://jianyuluntan.com/shanchugentie.html
1
XzA=
1
© 2019 - 2021 剑鱼论坛 版权所有
Powered by JianYuLunTan

976666861
http://jianyuluntan.com/feedback.html
http://jianyuluntan.com/qiandao.html
http://jianyuluntan.com/denglu.html
0
http://jianyuluntan.com/adenglu.html
0