剑鱼论坛怎么使用API实现把帖子放入回收桶

 剑鱼论坛 发表于 2021年03月23日 剑鱼API教程  56
剑鱼论坛
LV 8 研究生
最后在线:1年前
加入时间:4年前
主帖:143  跟帖:100

这一篇我们来介绍如何用API实现把一个帖子放入回收桶。

请求方式:DELETE

请求地址:http://域名/api

是否需要鉴权信息:需要

请求数据:

{
"data": [
{
"type": "post",
"id": "1",
"attributes": {
"method": "trash"
}
}
]
}

上面代码里面的id是指帖子的id号。

返回数据:

{
"data": [
{
"type": "post",
"id": "1",
"attributes": {
"result": "ok"
}
}
]
}

操作成功会返回如上信息,表示已经把帖子放入回收桶,如果失败会返回errors错误信息。


论坛主帖
288
论坛跟帖
316
在线访客
0
今日主帖
0
今日跟帖
0
今日注册
0
289
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 - 2023 剑鱼论坛 版权所有
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
剑鱼论坛