后端插件api文档
- 获取站点信息
URL: http://yourdomain.com/?api_site_info
Method: GET
Response:
{
"name": "Site Name",
"description": "Site Description",
"version": "4.0"
} - 获取版块列表
URL: http://yourdomain.com/?api_forum_list
Method: GET
Response:
[
{
"fid": 1,
"name": "Forum Name",
...
},
...
] - 获取帖子列表
URL: http://yourdomain.com/?api_thread_list&fid={forum_id}
Method: GET
Response:
[
{
"tid": 1,
"subject": "Thread Subject",
...
},
...
] - 获取帖子详情
URL: http://yourdomain.com/?api_thread_detail&tid={thread_id}
Method: GET
Response:
{
"tid": 1,
"subject": "Thread Subject",
...
} - 获取用户列表
URL: http://yourdomain.com/?api_user_list
Method: GET
Response:
[
{
"uid": 1,
"username": "Username",
...
},
...
] - 获取用户信息
URL: http://yourdomain.com/?api_user_info&uid={user_id}
Method: GET
Response:
{
"uid": 1,
"username": "Username",
...
} - 用户登录
URL: http://yourdomain.com/?api_login
Method: POST
Parameters:
username: 用户名
password: 密码
Response:
{
"status": "success",
"user": {
"uid": 1,
"username": "Username",
...
}
} - 用户注册
URL: http://yourdomain.com/?api_register
Method: POST
Parameters:
username: 用户名
password: 密码
email: 邮箱
Response:
{
"uid": 1,
"username": "Username",
...
} - 创建帖子
URL: http://yourdomain.com/?api_create_post
Method: POST
Parameters:
fid: 版块ID
subject: 帖子标题
message: 帖子内容
uid: 用户ID
Response:
{
"status": "success",
"tid": 1
} - 创建回复
URL: http://yourdomain.com/?api_create_reply
Method: POST
Parameters:
tid: 帖子ID
message: 回复内容
uid: 用户ID
Response:
{
"status": "success",
"pid": 1
}
完全到时候自己用的时候直接拿出文档可以去写
资源源于网络
评论 (0)