- BIT101 API总览
- 用户模块
- 上传模块
- 交互反馈模块
- 文章模块
- 教务模块
- 课程模块
- 变量模块
- 消息模块
- 话廊模块
- 治理模块
- 学校教务接口
- 订阅模块
评论
POST
/reaction/comments
请求参数
Header 参数
fake-cookie
string
必需
示例值:
{{fake_cookie}}
Body 参数application/json
obj
string
操作对象
text
string
评论内容
reply_uid
integer
回复用户
anonymous
boolean
是否匿名
rate
integer
评分
image_mids
array[string]
配图mids
示例
{
"obj": "comment13",
"text": "laboris irure aliqua",
"image_mids": [
"http://dummyimage.com/400x400",
"http://dummyimage.com/400x400",
"http://dummyimage.com/400x400",
"http://dummyimage.com/400x400",
"http://dummyimage.com/400x400"
],
"rate": 9,
"anonymous": false,
"reply_uid": 2
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://bit101.flwfdd.xyz/reaction/comments' \
--header 'fake-cookie: {{fake_cookie}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"obj": "comment13",
"text": "laboris irure aliqua",
"image_mids": [
"http://dummyimage.com/400x400",
"http://dummyimage.com/400x400",
"http://dummyimage.com/400x400",
"http://dummyimage.com/400x400",
"http://dummyimage.com/400x400"
],
"rate": 9,
"anonymous": false,
"reply_uid": 2
}'
返回响应
🟢200成功
application/json
Body
id
integer
必需
obj
string
评论的对象
text
string
评论内容
images
array[object (图片) {3}]
配图
mid
string
图片唯一编码
url
string
原图链接
low_url
string
低分辨率图片链接
user
object (用户)
发表用户
id
integer
必需
create_time
string
注册时间
nickname
string
昵称
avatar
object (图片)
头像链接
motto
string
格言/简介
identity
object
身份
anonymous
boolean
匿名
create_time
string
发表时间
update_time
string
状态更新时间
like
boolean
点赞
like_num
integer
赞数量
comment_num
integer
子评论数量
own
boolean
是否拥有
rate
integer
评分
reply_user
object (用户)
回复的用户
reply_obj
string
回复对象
sub
array[object (评论) {16}]
子评论
id
integer
必需
obj
string
评论的对象
text
string
评论内容
images
array[object (图片) {3}]
配图
user
object (用户)
发表用户
anonymous
boolean
匿名
create_time
string
发表时间
update_time
string
状态更新时间
like
boolean
点赞
like_num
integer
赞数量
comment_num
integer
子评论数量
own
boolean
是否拥有
rate
integer
评分
reply_user
object (用户)
回复的用户
reply_obj
string
回复对象
sub
array[object (评论) {16}]
子评论
示例
{
"id": 0,
"obj": "string",
"text": "string",
"images": [
{
"mid": "string",
"url": "string",
"low_url": "string"
}
],
"user": {
"id": 0,
"create_time": "string",
"nickname": "string",
"avatar": {
"mid": "string",
"url": "string",
"low_url": "string"
},
"motto": "string",
"identity": {
"id": 0,
"color": "string",
"text": "string"
}
},
"anonymous": true,
"create_time": "string",
"update_time": "string",
"like": true,
"like_num": 0,
"comment_num": 0,
"own": true,
"rate": 0,
"reply_user": {
"id": 0,
"create_time": "string",
"nickname": "string",
"avatar": {
"mid": "string",
"url": "string",
"low_url": "string"
},
"motto": "string",
"identity": {
"id": 0,
"color": "string",
"text": "string"
}
},
"reply_obj": "string",
"sub": [
{}
]
}
🟠404记录不存在
🟠400参数不正确
🔴500服务器错误
🟠401身份验证失败