这个API允许您获取社区论坛中的帖子列表。以下是如何使用此API的详细说明。
请求方法
- GET
请求路径
/community-forum/tools/api-docs/posts/get-posts
参数说明
page
: 当前页码,默认为1。limit
: 每页显示的帖子数量,默认为10。
示例请求
curl -X GET "https://community-forum.com/community-forum/tools/api-docs/posts/get-posts?page=1&limit=10"
示例响应
{
"status": "success",
"data": {
"total": 100,
"posts": [
{
"id": 1,
"title": "社区活动通知",
"content": "本周六我们将举办一场线下聚会,欢迎大家参加。",
"author": "管理员",
"created_at": "2023-01-01T00:00:00Z"
},
// ... 更多帖子
]
}
}
注意事项
- 请确保您有权限访问此API。
- 如果您需要更多信息,请访问我们的API文档中心。