- koa-simple-template
- koa-project-template
- 1、用户接口
- 2、登录接口
- 3、动态接口
- 4、评论接口 —— 1 : n
- 5、标签接口 —— n : n
- 6、文件接口
单个动态-评论详情
开发中
GET
/moment/details/{momentId}
请求参数
Path 参数
momentId
string
必需
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'http://localhost:8000/moment/details/'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
object
必需
id
integer
必需
content
string
必需
creatAt
string
必需
updateAt
string
必需
user
object
必需
moments
array [object {7}]
必需
示例
{
"code": 0,
"message": "获取动态详细成功!!!",
"data": {
"id": 2,
"content": "我以为吕布已经天下无敌了",
"creatAt": "2023-10-20T13:49:36.000Z",
"updateAt": "2023-10-20T14:53:10.000Z",
"user": {
"id": 6,
"name": "admin1",
"creatAt": "2023-10-19 17:10:44.000000",
"updateAt": "2023-10-23 18:40:52.000000"
},
"moments": [
{
"id": 1,
"user": {
"id": 5,
"name": "admin"
},
"content": "当年你退出文坛,我是极力反对的!",
"creatAt": "2023-10-21 16:16:19.000000",
"momentId": 2,
"updataAt": "2023-10-21 16:16:19.000000",
"parentCommentId": null
},
{
"id": 3,
"user": {
"id": 5,
"name": "admin"
},
"content": "先生好眼光!",
"creatAt": "2023-10-21 16:29:24.000000",
"momentId": 2,
"updataAt": "2023-10-21 16:29:24.000000",
"parentCommentId": 1
},
{
"id": 4,
"user": {
"id": 5,
"name": "admin"
},
"content": "惭愧惭愧,当然海选没选你~~",
"creatAt": "2023-10-21 16:32:05.000000",
"momentId": 2,
"updataAt": "2023-10-21 16:32:05.000000",
"parentCommentId": 1
}
]
}
}