接口
关联路由
筛选参数
文章:page、limit、q、userId;评论:postId、userId
字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | number | 文章 ID |
user_id | number | 作者 ID |
title | string | 标题 |
body | string | 正文 |
tags | array | 标签 |
created_at | string | ISO 时间 |
说明
- 评论字段:id、post_id、user_id、author、body、created_at。
- 写操作只返回模拟结果,不会保存。
请求示例
curl "https://www.temp-api.com/mock/posts/1/comments"
{
"code": 200,
"message": "ok",
"data": [
{ "id": 1, "post_id": 1, "author": "李娜", "body": "这个思路很实用。" }
],
"meta": { "total": 2 }
}